Skip to content

Commit

Permalink
[FIX] account_global_discount: link line taxes to discount move line
Browse files Browse the repository at this point in the history
  • Loading branch information
chienandalu committed Jun 30, 2020
1 parent 30efc4a commit 048122d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions account_global_discount/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
===========

Expand Down
3 changes: 3 additions & 0 deletions account_global_discount/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions account_global_discount/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 048122d

Please sign in to comment.