diff --git a/addons/hr_expense/models/product_template.py b/addons/hr_expense/models/product_template.py index 25c4719a612..614c02898b5 100644 --- a/addons/hr_expense/models/product_template.py +++ b/addons/hr_expense/models/product_template.py @@ -9,13 +9,14 @@ class ProductTemplate(models.Model): can_be_expensed = fields.Boolean(string="Can be Expensed", help="Specify whether the product can be selected in an expense.") - @api.model - def create(self, vals): - # When creating an expense product on the fly, you don't expect to - # have taxes on it - if vals.get('can_be_expensed', False): - vals.update({'supplier_taxes_id': False}) - return super(ProductTemplate, self).create(vals) + @api.model_create_multi + def create(self, vals_list): + 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): + vals.update({'supplier_taxes_id': False}) + return super(ProductTemplate, self).create(vals_list) @api.onchange('type') def _onchange_type_for_expense(self):