Browse Source

publish muk_utils - 12.0

pull/9/head
MuK IT GmbH 6 years ago
parent
commit
3e13b02cfc
  1. 2
      muk_utils/__manifest__.py
  2. 12
      muk_utils/models/mixins_hierarchy.py

2
muk_utils/__manifest__.py

@ -19,7 +19,7 @@
{ {
"name": "MuK Utils", "name": "MuK Utils",
"summary": """Utility Features""", "summary": """Utility Features""",
"version": '12.0.1.1.20',
"version": '12.0.1.1.21',
"category": 'Extra Tools', "category": 'Extra Tools',
"license": "AGPL-3", "license": "AGPL-3",
"author": "MuK IT", "author": "MuK IT",

12
muk_utils/models/mixins_hierarchy.py

@ -91,3 +91,15 @@ class Hierarchy(models.AbstractModel):
'parent_path_json': json.dumps(path_json), 'parent_path_json': json.dumps(path_json),
}) })
#----------------------------------------------------------
# Create, Update, Delete
#----------------------------------------------------------
@api.multi
def write(self, vals):
res = super(Hierarchy, self).write(vals)
if self._rec_name_fallback() in vals:
domain = [('id', 'child_of', self.ids)]
self.search(domain).modified(['parent_path'])
return res
Loading…
Cancel
Save