跳至内容
菜单
此问题已终结
1 回复
3692 查看

i need form view like the view in base.res_partner_view.xml but i should use different model.so anyone can help me..

形象
丢弃
最佳答案

you have to inherit the resource partner class on your new module like this way: _inherit = 'res.partner' and in a columns section you can add the fields which you wanted in your module.

now you have to inherit the resource partner view also in xml like this way.. <record id="view_partner_form" model="ir.ui.view"> <field name="name">res.partner.form</field> <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form"/> <field name="arch" type="xml">

now you have to give your custom filed position in to this view like this

<field name="email" position="replace"> <field name="gmail"/> <field name="skype"/> </field>

形象
丢弃
相关帖文 回复 查看 活动
1
3月 20
3428
12
12月 18
34754
1
7月 16
7063
2
3月 15
5907
0
3月 15
3852