summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_renderer.js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2020-06-08 16:32:37 +0000
committerNicolas Martinelli <nim@odoo.com>2020-06-09 12:46:18 +0000
commite3b22264d85aba157483dcf637bcc99fb1660a32 (patch)
treef4caa6aef5a2536683a40223317a0c432fbe35c5 /addons/web/static/src/js/views/basic/basic_renderer.js
parentd1c38bbf0fd48509180ea36b2ebde4deb0738326 (diff)
[FIX] point_of_sale: mix of sale and refund
- Set rounding policy to 'Round Globally' - Create a Tax T Amount: 21.0% Different tax tags for invoice and credit notes Set any account Repartition Line Advanced Options => Included in Price - Create a Product P1 Sales Price: 11.8 Customer Taxes: T - Create a Product P2 Sales Price: 15.3 Customer Taxes: T - Create a new POS Session - Create a POS order: P1, Quantity: -6, Discount: 5% P2, Quantity: 6, Discount: 5% - Validate and close the session A difference of 0.01 prevents from closing the session. The error arises because the tax tags are different for an invoice and a refund. In the following: https://github.com/odoo/odoo/blob/1a9e147639012cc847099e69fc964f3669a36cbb/addons/point_of_sale/models/pos_session.py#L394 Both lines have different `tag_ids`, therefore their amount is not summed when closing the session. On the other hand, the POS UI is not aware of the `tag_ids`, so it sums then round the amounts. The situation is quite unusual: from SO or Invoices, it is possible to create either an invoice or a refund, but not a mixed object as the POS is doing. Moreover, if a user invoices the POS order, there is no problem to close the session since a regular invoice is created and tax amounts are summed. We consider a refund if all lines have negative quantities. We only do it in 'Round Globally' configuration to avoid impacting non-problematic use cases. opw-2254211 closes odoo/odoo#52704 X-original-commit: 5f25be8eef9a9efc18a995f2c6405d08a657ac96 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
0 files changed, 0 insertions, 0 deletions