[FIX] web_widget_one2many_product_picker: fix pre-commit

pull/2828/head
Daniel Reis 2024-05-18 15:54:10 +01:00
parent 53db71bc65
commit f0f9216a13
1 changed files with 8 additions and 2 deletions

View File

@ -46,11 +46,17 @@ class BaseModel(models.BaseModel):
@api.model_create_multi @api.model_create_multi
def create(self, vals_list): def create(self, vals_list):
"""Avoid create lines that have a product currently used when use the product picker""" """
Avoid create lines that have a product currently used
when use the product picker
"""
self._check_product_picker_duplicated_products(vals_list) self._check_product_picker_duplicated_products(vals_list)
return super().create(vals_list) return super().create(vals_list)
def write(self, values): def write(self, values):
"""Avoid write lines that have a product currently used when use the product picker""" """
Avoid write lines that have a product currently used
when use the product picker
"""
self._check_product_picker_duplicated_products([values]) self._check_product_picker_duplicated_products([values])
return super().write(values) return super().write(values)