我有这个XML规范的问题(odoo 9):XML上下文默认One2many在odoo9
the var "groups_ref" is a Many2many relation with res.groups.
<record id="some_id" model="ir.actions.act_window">
....
<field name="context">{'groups_ref': self.env.ref('security.basic_user')}</field>
....
</record>
XML Basic User from module security
<record id="basic_user" model="res.groups">
<field name="name">Base User</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
,给我一个错误:
NameError: self is not defined
我的问题是如何使用此xml d将默认值传递给One2many关系定义,我不想将它传递给py中的字段声明。谢谢。
有关使用'REF( 'security.base_user')'是什么? – CZoellner