Cyril Dutrieux (cydu) 26cfd920ea [FIX] account: Fix tax recomputation with tax cash rounding
Step to reproduce:

    1. Set up Cash rounding for Tax: Accounting> Configuration > cash
       rounding
    2. Set up recurrent product: Service type - Prepaid - tax VAT 7.7
    3. Create an order with that product - set price of 45 (to have the
       rounding) > confirm order > Create an invoice
    4. In the new invoice > "Other info" tab > add the rounding method
    5. Change the quantity

    Current behavior: tax doesn't update if there is a rounding line
    Expected: tax should be updated.

    Why:
    What happens is that odoo trying to update the new tax amount on the
    wrong line (the rounded tax amount line).

    That's because the `existing_after` dict is poorly defined. It is
    defined by the `existing()` inner function of `_sync_dynamic_line`
    thanks to the "tax_key" of each line.​

    The two account move lines (VAT line and rounding on the VAT line) share
    the same tax_key,​ and because of that the VAT line is overwritten by
    the rounding line in the dict returned by`existing()`.

    Then the cash rounding is recomputed from the VAT line(that still holds
    the outdated values) and overwrites the updated values on the rounding
    line.

    Solution:
    Adding the type of line in the tax_key to differentiate between a VAT
    line and a rounding VAT line

    opw-3224743

closes odoo/odoo#121426

X-original-commit: c27236d49d4f60940d79471e0ae66a0aed3c572d
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-05-16 13:37:30 +02:00
2023-05-11 12:01:49 +02:00
2023-05-16 13:37:22 +02:00
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%