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] account_move_tier_validation: do not overwrite line values #1880

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions account_move_tier_validation/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ def _compute_hide_post_button(self):
def _get_under_validation_exceptions(self):
return super()._get_under_validation_exceptions() + ["needed_terms_dirty"]

def _get_validation_exceptions(self, extra_domain=None, add_base_exceptions=True):
res = super()._get_validation_exceptions(extra_domain, add_base_exceptions)
# we need to exclude amount_total,
# otherwise editing manually the values on lines dirties the field at onchange
# since it's not in readonly because readonly="not(review_ids)", it's then
# sent at save, and will override the values set by the user
return res + ["amount_total"]

def _get_to_validate_message_name(self):
name = super()._get_to_validate_message_name()
if self.move_type == "in_invoice":
Expand Down
Loading