Skip to content

Commit

Permalink
[FIX] product_price_taxes_included: recursion check in price list
Browse files Browse the repository at this point in the history
  • Loading branch information
lef-adhoc committed Mar 8, 2024
1 parent 0bf540e commit 2b2bfb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions product_price_taxes_included/models/product_pricelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import models
from odoo import models, fields


class ProductPricelist(models.Model):
Expand Down Expand Up @@ -46,8 +46,8 @@ def check_for_product_pack_parent(self, product):
return result

def _get_product_price(self, product, quantity, uom=None, date=False, **kwargs):
res = super()._get_product_price(product, quantity, uom, date, **kwargs)
if self._context.get('taxes_included'):
res = super(ProductPricelist, self.with_context(is_recursive=True))._get_product_price(product, quantity, uom=uom, date=date, **kwargs)
if self._context.get('taxes_included') and not self._context.get('is_recursive'):
company_id = (self._context.get('company_id')
or self.env.company.id)
res = product.taxes_id.filtered(
Expand Down

0 comments on commit 2b2bfb5

Please sign in to comment.