Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow creating Item as is_fixed_asset in Quick Entry. #37645

Closed
wants to merge 1 commit into from

Conversation

bosue
Copy link
Contributor

@bosue bosue commented Oct 23, 2023

is_fixed_asset currently wasn‘t included in the Quick Entry form.
As the field is set_only_once and the doc is being saved, there‘s no way to check the box later.
Effectively, it currently isn‘t possible to create a fixed asset via the Quick Entry form.

Fixing this was slightly less straightforward than expected, but in the second revision could be sufficiently solved:

  1. Obviously is_fixed_asset had to be added to Quick Entry.
  2. However, Asset Category is mandatory for Fixed Assets, so needs to be added too if we don‘t want to leave the Item in an incorrect state.
  3. Now, is_fixed_asset and is_stock_item are mutually exclusive. An informed decision in the Quick Entry form is only possible if we‘re adding the latter as well, so people can easily grasp the mutual exclusivity and choose one or the other.
  4. If need be, is_stock_item may stay on by default, so is_fixed_asset is initially disabled. To enable is_fixed_asset, you first need to disable is_stock_item. That’s halfway acceptable. However, is_stock_item should not bounce back when disablingis_fixed_asset again.
  5. Regarding the full form: showing/enabling and hiding/disabling quite distant, mutually exclusive checkboxes is rather confusing. I‘m therefore moving is_fixed_asset together with its dependent fields to the top, so it is closer to is_stock_item. With the two mutually exclusive fields next to each other from the start, the mutual exclusivity is way easier to grasp.
RPReplay_Final1698128191.mov

All in all, I think this revised approach is a clear UX improvement and a good compromise, particularly if the tests are passing, so BC is given. In a followup we may discuss whether is_stock_item should be on by default or not.

It also fixes #37505.

@bosue bosue marked this pull request as draft October 23, 2023 19:51
@bosue bosue force-pushed the quick_entry_fixed_asset branch from 3d918d8 to 13f9093 Compare October 24, 2023 06:19
@bosue
Copy link
Contributor Author

bosue commented Oct 24, 2023

Failing test case (Asset with CWIP accounting) may seem related but isn‘t.
Finally we‘re only changing JS directly and JS via JSON.

Furthermore, that very same test case has been failing on every other test run as well.
Needs to be fixed, but not here.

Ready for review.

@bosue bosue marked this pull request as ready for review October 24, 2023 06:59
@s-aga-r
Copy link
Contributor

s-aga-r commented Oct 26, 2023

@bosue

As the field is set_only_once and the doc is being saved, there‘s no way to check the box later.

Let's remove the set_only_once property and use a similar validation we use for Maintain Stock. Users can check and uncheck the is_fixed_asset until any transaction is made against that item.

is_fixed_asset currently wasn‘t included in the Quick Entry form.

Quick Entry Form should have fewer fields. Although, the user can add the same if needed(?)

@bosue

This comment was marked as off-topic.

@bosue

This comment was marked as off-topic.

@bosue
Copy link
Contributor Author

bosue commented Oct 27, 2023

I‘m just wondering whether my last proposal may actually be perfectly compatible with @s-aga-r‘s proposal, while being quite a bit out of scope of the actual bugfix.

I‘ll start implementing the former, and may then launch a followup issue. 👍

@bosue bosue marked this pull request as draft October 27, 2023 08:18
Copy link

stale bot commented Nov 11, 2023

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added inactive and removed inactive labels Nov 11, 2023
Copy link

stale bot commented Nov 27, 2023

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Nov 27, 2023
@stale stale bot closed this Dec 1, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Item may not be marked a Fixed Asset after saving
2 participants