minor fix

This commit is contained in:
wilson gomez sanchez 2021-03-30 14:07:27 -05:00
parent 1b6fae6152
commit 738ba34c83
2 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@ -224,13 +224,13 @@ class Operation(Workflow, ModelSQL, ModelView):
def get_unit_price_w_tax(self, name=None):
Tax = Pool().get('account.tax')
res = 0
if self.unit_price and self.accommodation:
res = self.unit_price
if self.unit_price and self.accommodation and not self.taxes_exception:
values = Tax.compute(
self.accommodation.template.customer_taxes_used,
self.unit_price or _ZERO, 1
)
if values:
if len(values) > 0:
value = values[0]
res = value['base'] + value['amount']
return round(res, Operation.total_amount.digits[1])