(self, price, prod_taxes, line_taxes)
return price
Subtract tax amount from price when corresponding "price included" taxes do not apply
Subtract tax amount from price when corresponding "price included" taxes do not apply
Subtract tax amount from price when corresponding price included taxes do not apply
def _fix_tax_included_price(self, price, prod_taxes, line_taxes):
        """Subtract tax amount from price when corresponding "price included" taxes do not apply"""
        # FIXME get currency in param?
        prod_taxes = prod_taxes._origin
        line_taxes = line_taxes._origin
        incl_tax = prod_taxes.filtered(lambda tax: tax not in line_taxes and tax.price_include)
        if incl_tax:
            return incl_tax.compute_all(price)['total_excluded']
        return price
def _fix_tax_included_price ( self , price , prod_taxes , line_taxes ) : # FIXME get currency in param? prod_taxes = prod_taxes . _origin line_taxes = line_taxes . _origin incl_tax = prod_taxes . filtered ( lambda tax : tax not in line_taxes and tax . price_include ) if incl_tax : return incl_tax . compute_all ( price ) [ 'total_excluded' ] return price