- Jun 07, 2023
-
-
Alvaro Fuentes authored
When there are too many (millions) of POS order lines associated to opened POS sessions we get too many taxes, most are duplicated. This causes a MemorryError. Example queries from a real DB: ``` > select count(distinct r.account_tax_id) from pos_order_line l join pos_order o on o.id = l.order_id join pos_session s on s.id = o.session_id join account_tax_pos_order_line_rel r on r.pos_order_ line_id = l.id where s.state != 'closed' +-------+ | count | |-------| | 24 | +-------+ > select count(r.account_tax_id) from pos_order_line l join pos_order o on o.id = l.order_id join pos_session s on s.id = o.session_id join account_tax_pos_order_line_rel r on r.pos_order_line_id = l.id where s.state != 'closed' +---------+ | count | |---------| | 2504539 | +---------+ ``` opw-3295467 closes odoo/odoo#124180 X-original-commit: 45d19b265033aa626e110e51d8b1d01408717a3e Signed-off-by:
Christophe Simonis (chs) <chs@odoo.com>
-
- Jun 30, 2020
-
-
Martin Trigaux authored
This commit fixes all issues detected by the new pylint gettext-variable test. It converts some calls to the new syntax _("Foo %s", bar) to progressively migrate the code to the new syntax. A few calls were not technically incorrect but still detected by the linter. _("Foo" + "Bar") has been converted to _("Foo" "Bar") as it has the same effect and make sure the argument is of type asteroid.Const instead of BinOp). closes odoo/odoo#53683 Related: odoo/enterprise#11467 Signed-off-by:
Raphael Collet (rco) <rco@openerp.com>
-
- Aug 27, 2019
-
-
Pierre Masereel authored
Since implementation of repartition lines on tax in accounting, the amount on the tax is not always the effective amount to apply on price of a product. You can have a tax with amount of 20% for example, and two repartition lines of 100% and -100%, that will lead to have to apply 0% on the tax. So we are computing the effective amount on the tax by multiplying the amount of tax by the sum of repartition lines factor. closes odoo/odoo#36140 Signed-off-by:
Laurent Smet <smetl@users.noreply.github.com>
-
- Jul 17, 2019
-
-
Adrian Torres authored
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
-
- Jun 19, 2018
-
-
Nicolas Martinelli authored
Prevent the modification of a tax which is used in an opened POS session. This avoids inconsistency between the payment and the order accounting entries. opw-1859092
-