I created a Module "A" that inherits the odoo module "projects"
odoo projects has a field "allowed_user_ids" that is computed and depends on 2 fields.
Inheriting the compute method works fine but changing the @api.depends annotation to add 1 additional field has no effect, the overrided method still only depends on the 2 old fields.
the project module:
allowed_user_ids = fields.Many2many('res.users', compute='_compute_allowed_users', inverse='_inverse_allowed_user')
allowed_internal_user_ids=fields.Many2many('res.users','project_allowed_internal_users_rel', string="Allowed Internal Users", default=lambdaself: self.env.user, domain=[('share', '=', False)])
allowed_portal_user_ids = fields.Many2many('res.users', 'project_allowed_portal_users_rel', string="Allowed Portal Users", domain=[('share', '=', True)])
@api.depends('allowed_internal_user_ids', 'allowed_portal_user_ids') def_compute_allowed_users(self):
for project in self:
users = project.allowed_internal_user_ids | project.allowed_portal_user_ids project.allowed_user_ids = users
my module:
@api.depends('allowed_internal_user_ids','allowed_portal_user_ids','myfield') def_compute_allowed_users(self):
print('override')
Would be great if someone can point me in the right direction on what i might be understanding or doing worng.