[16.0][MIG] - base_time_window

pull/2559/head
sbejaoui 2023-02-21 22:49:26 +01:00
parent 3ac0ab55b6
commit d01e665eeb
4 changed files with 12 additions and 5 deletions

View File

@ -3,7 +3,7 @@
{
"name": "Base Time Window",
"summary": "Base model to handle time windows",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Technical Settings",
"author": "ACSONE SA/NV, Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",

View File

@ -45,11 +45,11 @@ class TimeWeekday(models.Model):
def _get_id_by_name(self, name):
return self.search([("name", "=", name)], limit=1).id
@api.model
def create(self, vals):
result = super().create(vals)
@api.model_create_multi
def create(self, vals_list):
records = super().create(vals_list)
self._get_id_by_name.clear_cache(self)
return result
return records
def write(self, vals):
result = super().write(vals)

View File

@ -0,0 +1 @@
../../../../base_time_window

View File

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)