577eb578b01782ecc189dfb98ed2fd9723f81f7a
real_amount field
To be able to compute the taxes offline, the POS JS code mimicked the `compute_all` function in `account_tax.py`. At some point, the POS added an extra field on `account.tax` (see: https://github.com/odoo/odoo/commit/8fb53c53c3128e8cea7ef20b9ab4946ac2f9b7d9): `real_amount` which is defined as: real_amount = tax.amount * sum(tax.repartition_line.factor) Then, when fetching the data from the server to the client, the `real_amount` was passed in place of the `amount`. But then, the `amount` field in the JS is no longer the same as in the python code and it is very error prone. In addition, it's easy to get rid of this extra field by using the sum of the factors from the repartition lines. Now, we pass the sum(tax.repartition_lines.factor_percent)/100, which is equivalent to sum(tax.repartition_line.factor) to the client, and use it in the `compute_all` as done in the python function, and leave `tax.amount` untouched. Both `compute_all` functions now operate using the same `tax.amount` and we get rid of the `real_amount` field. closes odoo/odoo#112063 Related: odoo/upgrade#4307 Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%