0

I tried Domain ---------> ('message_follower_ids', 'in', [user.partner_id.id]) but it does not work

ValueError: "name 'user' is not defined" while evaluating "[('message_partner_ids', 'in', [user.partner_id.id])]"

Eduardo
  • 9
  • 2

1 Answers1

0

It gives error because user is not defined , if you want to get current login user us self.env.user instead of just user

('message_follower_ids', 'in', [self.env.user.partner_id.id])
Heroic
  • 980
  • 4
  • 12
  • Thanks Heroic, but if i write that in domain, i get the same error: name 'self' is not defined – Eduardo Sep 14 '17 at 09:06
  • Sorry, not code. I just added the domain attribute in the window action. Setting > Technical > Action > Window Actions > Filter Domain - Object: sale.order - View: sale.order.tree – Eduardo Sep 14 '17 at 11:09
  • SOLUTION: [('message_is_follower','=',1)] in domain. It's work. Thanks!! – Eduardo Sep 18 '17 at 08:13