-
Notifications
You must be signed in to change notification settings - Fork 0
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] sale_triple_discount: restore original discount field's precision by using change_digit function #1
base: 12.0-fix-sale_triple_discount-round_discount
Are you sure you want to change the base?
Conversation
@@ -113,7 +113,7 @@ def triple_discount_preprocess(self): | |||
# more digits than allowed from field's precision, | |||
# so let's increase it just for saving it correctly in cache | |||
discount_field = self._fields['discount'] | |||
discount_original_digits = discount_field._digits | |||
discount_original_digits = dp.get_precision("Discount")(self.env.cr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see SimoRubi/account-invoicing#1 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks!
…ion in order to avoid to have always (16, 10) as precision in case of any errors.
f5020b6
to
094fb5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm proposing this PR (paired with SimoRubi/account-invoicing#1) to fix a strange behaviour that happend to one of our customers which is using OCA#1618 + OCA/account-invoicing#876
In this way the attribute By using this PR (paired with SimoRubi/account-invoicing#1) seems the problem was solved. |
Use change_digit function to restore original discount field's precision in order to avoid to have always (16, 10) as precision in case of any errors.