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: can't change valuation_method on item #28876

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

ankush
Copy link
Member

@ankush ankush commented Dec 14, 2021

But the underlying cause is in some cases NULL is set as default value and then the frontend adds '' empty string as the valuation method from select field's first value. While most of the code works fine with both of them framework treats None != '' for constant field validation. This kinda feels weird to me. NULL implies unset so set only field validation shouldn't kick in here.

Changes:

  1. Remove set only once from item's valuation method. The valuation method can now be changed as long as there are no transactions against it.

closes #16799
closes #26369

@ankush ankush marked this pull request as ready for review December 14, 2021 11:42
@ankush ankush merged commit 66960cf into frappe:develop Dec 14, 2021
@ankush ankush deleted the fix/item_wise_valuation_method branch December 14, 2021 11:42
mergify bot pushed a commit that referenced this pull request Dec 14, 2021
ankush added a commit that referenced this pull request Dec 14, 2021
(cherry picked from commit 66960cf)

Co-authored-by: Ankush Menat <ankush@frappe.io>
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
fproldan added a commit to fproldan/erpnext that referenced this pull request Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant