summaryrefslogtreecommitdiff
path: root/addons/hr_expense
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2021-01-28 09:51:45 +0000
committerGoffin Simon <sig@odoo.com>2021-02-02 12:03:43 +0000
commite66ef561d9b75eca307a1702fac4f8e4ada6237f (patch)
treeb428b1edaeebd68072a2cf1fc32713f1055262f7 /addons/hr_expense
parent3c082b9a47be35579a454f13edc230ac3029922d (diff)
[FIX] hr_expense: Create an expense product with vendor taxes
Steps to reproduce the bug: When trying to import or create a expense product with supplier taxes, the supplier taxes were removed. PS: The field vendor taxes is available in the expense product view opw:2444551 closes odoo/odoo#65399 X-original-commit: 02d0591b73f5acd8c94e65cda3af1158c3a2254a Signed-off-by: Simon Goffin (sig) <sig@openerp.com> Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_expense')
-rw-r--r--addons/hr_expense/models/product_template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_expense/models/product_template.py b/addons/hr_expense/models/product_template.py
index a9e81959b0d..d053a800313 100644
--- a/addons/hr_expense/models/product_template.py
+++ b/addons/hr_expense/models/product_template.py
@@ -15,7 +15,7 @@ class ProductTemplate(models.Model):
for vals in vals_list:
# When creating an expense product on the fly, you don't expect to
# have taxes on it
- if vals.get('can_be_expensed', False):
+ if vals.get('can_be_expensed', False) and not self.env.context.get('import_file'):
vals.update({'supplier_taxes_id': False})
return super(ProductTemplate, self).create(vals_list)