跳至内容
菜单
此问题已终结

Hi,

I have the following model :

Teams are composed of users, and related to projects and sprints.

Sprints have a responsible (a user), teams and a parent project element.

Projects have teams and child sprint element.


What I want to do is :

  • filter the sprint team having only the one linked to the parent project

  • filter the users to have only those who are in a team linked to the project (or directly the sprint)

I think those two conditions are very similar and could be done with domain filter, so I tried something like :

class sprint

team_ids = fields.Many2many('my_module.team',domain=lambda self: [('project_ids', '=', self.project_id)])

And a lot of other syntax, using function or not, in python file or in view...

The best I can have when I don't juste have an error is a filter that doesn't apply (it display either all the team or none)

I hope someone can help me, I really don't have a clue what to try next.

Best regards

形象
丢弃
相关帖文 回复 查看 活动
2
2月 22
8292
2
7月 19
10363
5
9月 20
12936
2
3月 15
7667
1
3月 15
5452