Skip to Content
Menu
This question has been flagged
2604 Views

Hello,

I am new in odoo, trying to develop a module. 

In xml file, i am trying to create a record to show on my module's menu like this:


Pending Confirmations
ir.actions.act_window
my.new_module

kanban,tree,form
['|',
'&',('state','=','manager_approved'), (user.has_group('group_my_module_fin_manager'), '=', True),
'&','&',('employee_id.user_id.id', '!=', uid),('state','=','sent'), ('\department_id.manager_id.id', '=', uid)
]




Create New Record



As you see in domain field, i want to achieve that:

Condition 1: A AND B should be True

     A)  current user has group named  'group_my_module_fin_manager' 

     B)  my records state is 'manager_approved'

Condition 2: C AND D AND E should be True

    C) the current user cannot be employee's user_id on table

    D) state should be 'sent'

    E) the current user should be department manager


Finally Condition 1 Or Condition 2 should Be true.

In this example i cant use '&' here. xml error.

And 

user.has_group('group_my_module_fin_manager')  is  not  valid  statement.

And i dont know whether  "and or" conditions are true here.


Thanks 

Avatar
Discard