[FIX] web_widget_one2many_product_picker: fix pre-commit

This commit is contained in:
Daniel Reis
2024-05-18 15:54:10 +01:00
parent 53db71bc65
commit f0f9216a13

View File

@@ -46,11 +46,17 @@ class BaseModel(models.BaseModel):
@api.model_create_multi
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)
return super().create(vals_list)
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])
return super().write(values)