Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Server actions in menuItem

Avatar
odoo
Avatar
Discard
1 Answer
0
Avatar
odoo
Best Answer

I think, you should call custom method from your model, which will return nessesary view. In custom method you can get access to fields you need. For example:

<record id="action_server_leave_filter" model="ir.actions.server">

          <field name="name">Leave Filter</field>

          <field name="model_id" ref="model_hr_holidays"/>

          <field name="state">code</field>

          <field name="code">action =  env.get('hr.holidays').leave_filter_act()</field>

 </record>

More info here: https://www.odoo.com/ru_RU/forum/pomoshch-1/how-to-call-ir-actions-act-window-from-python-to-menuitem-142855

Avatar
Discard