-
-
Notifications
You must be signed in to change notification settings - Fork 688
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
[16.0][MIG] account invoice fixed discount: Migration to 16.0 #1481
[16.0][MIG] account invoice fixed discount: Migration to 16.0 #1481
Conversation
Currently translated at 100.0% (6 of 6 strings) Translation: account-invoicing-12.0/account-invoicing-12.0-account_invoice_fixed_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-12-0/account-invoicing-12-0-account_invoice_fixed_discount/de/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-13.0/account-invoicing-13.0-account_invoice_fixed_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_invoice_fixed_discount/
Odoo has changed the signature of the method `_get_fields_onchange_balance_model`.
d09c80b
to
ca5752c
Compare
ca5752c
to
84d1635
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.
Please reaname the module in your PR subject to account_invoice_fixed_discount.
There is also a second PR ongoing here. #1488
def test_01_discounts_fixed(self): | ||
"""Tests multiple discounts in line with taxes.""" | ||
invoice = self._create_invoice(discount_fixed=57) | ||
with self.assertRaises(ValidationError): | ||
invoice.invoice_line_ids.discount = 50 | ||
invoice.invoice_line_ids._onchange_discount_fixed() | ||
self.assertEqual(invoice.invoice_line_ids.discount, 0.00) | ||
invoice.invoice_line_ids._onchange_price_subtotal() | ||
invoice.line_ids.write({"recompute_tax_line": True}) | ||
invoice._onchange_invoice_line_ids() | ||
# compute amount total (200 - 57) * 10% | ||
self.assertEqual(invoice.amount_total, 157.3) | ||
self.assertEqual(invoice.invoice_line_ids.price_unit, 200.00) | ||
self.assertEqual(invoice.invoice_line_ids.price_subtotal, 143.00) | ||
if not cls.tax_account_id: | ||
raise Exception("No account with user_type_id of type 'Revenue' found") | ||
|
||
def test_02_discounts(self): | ||
invoice = self._create_invoice(discount=50) | ||
invoice.invoice_line_ids._onchange_discount() | ||
self.assertEqual(invoice.invoice_line_ids.discount_fixed, 0.00) | ||
self.assertEqual(invoice.invoice_line_ids.price_unit, 200.00) | ||
self.assertEqual(invoice.invoice_line_ids.price_subtotal, 100.00) |
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.
Why did you remove these tests? There is no test left in this file.
@TITUS6304658 @CRogos In fact, the module has to be refactored due to core changes. See #1488 (comment) comments. Tests are passing but in fact... not tested. So, this one is invalid at this time being |
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.
To be refactored or superseded by #1488
/ocabot migration account_invoice_fixed_discount |
superseded by #1488 |
16.0 mig account invoice fixed discount
Migration to version 16.0