mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[MIG] web_dashboard_tile from 12.0 to 16.0
- remove 12.0 migration scripts - bump version to 16.0 - use new api convention @api.model_create_multi ; new compute function logic ; - add dependency to spreasheet_dashboard to use 'Dashboard' main menu item - use new way to include assets - remove totally useless controllers - distinct different errors, depending on domain or format errors - fix : _compute_data depends on many fields - update : documentation and printscreens
This commit is contained in:
@@ -82,12 +82,11 @@ class TileCategory(models.Model):
|
||||
if category.action_id:
|
||||
category.action_id.unlink()
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
category = super().create(vals)
|
||||
if category.active:
|
||||
category._create_ui()
|
||||
return category
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
categories = super().create(vals_list)
|
||||
categories.filtered(lambda x: x.active)._create_ui()
|
||||
return categories
|
||||
|
||||
def write(self, vals):
|
||||
res = super().write(vals)
|
||||
@@ -105,4 +104,4 @@ class TileCategory(models.Model):
|
||||
|
||||
def unlink(self):
|
||||
self._delete_ui()
|
||||
super().unlink()
|
||||
return super().unlink()
|
||||
|
||||
Reference in New Issue
Block a user