diff --git a/account_global_discount/README.rst b/account_global_discount/README.rst index c872aab27cfd..921301286ac1 100644 --- a/account_global_discount/README.rst +++ b/account_global_discount/README.rst @@ -50,6 +50,13 @@ You can assign global discounts to partners as well: #. In section purchase (if the partner is a supplier), you can set purchase discounts. +Known issues / Roadmap +====================== + +* Global Discount move lines are created for a common base amount. If that + wasn't the case, we should split discount move lines between bases and + assign proper taxes accordingly. + Bug Tracker =========== diff --git a/account_global_discount/models/account_invoice.py b/account_global_discount/models/account_invoice.py index dc77d8b3d856..2be112647351 100644 --- a/account_global_discount/models/account_invoice.py +++ b/account_global_discount/models/account_invoice.py @@ -154,6 +154,9 @@ def invoice_line_move_line_get(self): 'price': discount.discount_amount * -1, 'account_id': discount.account_id.id, 'account_analytic_id': discount.account_analytic_id.id, + # TODO: If the base wasn't common to all invoice lines, + # we should split discount lines across bases. + 'tax_ids': self.invoice_line_ids.mapped('tax_ids'), 'invoice_id': self.id, }) return res diff --git a/account_global_discount/readme/ROADMAP.rst b/account_global_discount/readme/ROADMAP.rst new file mode 100644 index 000000000000..e16b0b610dc8 --- /dev/null +++ b/account_global_discount/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* Global Discount move lines are created for a common base amount. If that + wasn't the case, we should split discount move lines between bases and + assign proper taxes accordingly.