diff --git a/migration_report.ods b/migration_report.ods index 499d354..8f61281 100644 Binary files a/migration_report.ods and b/migration_report.ods differ diff --git a/operation.py b/operation.py index 1e25ac9..e97a165 100644 --- a/operation.py +++ b/operation.py @@ -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])