Commit Graph
12 Commits
Author SHA1 Message Date
Nicolas Martinelli 5d088e6a90 [FIX] account_tax_python: product is a template
- Create a new tax, using the 'Python Code' tax computation
- In 'Applicable Code' field, use a field only available on the
`product.product` model (e.g. `product.code`)
- Attach this new tax to a product that is available in the eCommerce
- Access the eCommerce, search for the product if not displayed.

The template `website_sale.products_item` crashes at rendering because
`code` is not available on a `product.template`.

`product` is supposed to be a `product.product` recordset. However, the
method `_get_combination_info` of `sale` is made in such a way that we
can fetch the information of a template, not a product. Utlimately,
methods `compute_all` and `_compute_amount` are called with the wrong
object.

We fall back on the first variant in this case.

opw-2056722

closes odoo/odoo#36134

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-27 13:30:41 +00:00
qdp-odoo 2dab340717 [IMP] account_tax_python: add the possibility to use some extra info
For example fields from the invoice. This might be needed by some localization using the python taxes.
Was task 40282
2017-12-04 15:12:05 +01:00
Christophe Simonis 268cf9d04a [MERGE] forward port branch saas-15 up to 127dea7f66 2017-09-13 18:45:07 +02:00
Christophe Simonis 3d2a7a0d12 [MERGE] forward port branch 10.0 up to 5b69f1a333 2017-09-13 17:48:37 +02:00
Christophe Simonis 5b69f1a333 [FIX] account_tax_python: correctly forward-port 7eb7e9fd6e 2017-09-13 17:47:34 +02:00
Christophe Simonis c8194a7647 [MERGE] forward port branch 10.0 up to c8b5c01340 2017-09-13 16:55:42 +02:00
Christophe Simonis c8b5c01340 [MERGE] forward port branch 9.0 up to 7eb7e9fd6e 2017-09-13 16:49:16 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
David Arnold 155e74a377 [REF] account: improve inheritability in chart template generation.
This commit moves some code in order to compute all values of taxes from the tax template in _get_tax_vals(), to allow easier overwritting in localization. Courtesy of David Arnold. Was PR # 14982
2017-01-13 13:26:56 +01:00
Yannick Tivisse d6e1d41128 [MIG] account: Migrate remaining old API chuncks of code 2016-08-08 12:24:40 +02:00
fwi-odoo 3121ced650 [MIG] account_tax_python: remove openerp tag, add license, clean imports and lint spaces 2016-08-03 11:18:48 +02:00
fwi-odoo aeafbb75aa [MOV] account_tax_python: reorganize files according to guidelines 2016-08-03 11:18:48 +02:00