For timesheets i am trying to only show projects that the user is a member of in the team of the project. Using odoo 11.
For setting team of a project i use project_team, which stores members like this:
members = fields.Many2many('res.users', 'project_user_rel', 'project_id',
'uid', 'Project Members', help="""Project's
Now in my own addon i try to set domain so that user is in the members:
_inherit = 'account.analytic.line'
project_id = fields.Many2one('project.project', 'Project', domain=[('allow_timesheets', '=', True), ('user_id', 'in', 'members')], delegate=True)
But now it shows no projects at all, even if the user is in the members.
I also tried it another way using
api.constrains('project_id')... but this method is not called at all.
Anyone has an idea what is going on? Thanks
Push