تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3375 أدوات العرض

I am trying to filter the records based on their group id. I have write a domain filter in menu actionlike this

[('pending_approver','in',[g.id for g in user.groups_id])]

pending_approver is a Many2one field with res.groups

Have a look on this for more clarification.

def _default_approver(self):
    obj = self.env['approval_heirarchy.approval_rules'].search([('id', '=', 1)], limit=1)
if obj.x_approver_ids:
val = obj.x_approver_ids[0].x_user_ids
return obj.x_approver_ids[0].x_user_ids.id
pending_approver = fields.Many2one('res.groups', string="Pending Approver", readonly=True,default=_default_approver)

I didn't get why it always prompt an Odoo Client Error:

Uncaught Error: Expected "]", got "(name)" 

I've searched a lot but didn't find any solution. Any help will be a great regard for me. Thanks in Advance!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
فبراير 25
18
2
مايو 25
4065
1
يوليو 15
4653
1
مارس 15
3693
2
مارس 15
6811