Hello everyone,
i want to use the method decorator `@api.depends` on an inherited model and I want to depend on two super fields, namely: `project.task_count` and `project.issue_count`
I got the following code so far:
class xyz_project_management_project(models.Model):
_inherit = 'project.project'
# ...
@api.one
@api.depends('task_count')
def _set_color_from_task_and_issue_count(self):
print 'Hello API World'
But this method is never called. What I am doing wrong here?
Regards
i think you have to call the function in a button.
It is actually possible to create a new computed field which does not store the result and which gets the values out of the fields I want and everytime it changes it fires a function. Not the cleanest method but a safe workaround.