跳至內容
選單
此問題已被標幟
3 回覆
8807 瀏覽次數

 Right now, i am customizing the contacts -> Create form aka "res.partner.form" with additional fields and also some overrides to make fields required etc.

It works nice!

The problem, i am facing is, that when i want to add another contact to a partner / using the create button on bottom of page, a new form pops up in a modal window. My Customization is not inherited there, so i need to customize those views as well.

In Debug Mode i can not find the name of this view, so i get a chance to extend this view.

Can someone please help me, how to find those views and how to extend // override them?


 



 


頭像
捨棄
作者

Sorry about the html - links . i am not allowed to change it .

最佳答案

The view you want to change is the standard Partner form view:

base.view_partner_form


Look for the section:

<notebook colspan="4">                        
<page string="Contacts &amp; Addresses" autofocus="autofocus">
<field name="child_ids" mode="kanban"
context="{'default_parent_id': active_id, 'default_street': street,
'default_street2': street2, 'default_city': city, 'default_state_id': state_id,
'default_zip': zip, 'default_country_id': country_id,
'default_supplier': supplier, 'default_customer': customer,
'default_lang': lang,}">
...
<form string="Contact / Address">

<!-- this is where the form view that pops up is defined -->


You can define a Form view for a child record inside the Form view for the parent record.

頭像
捨棄
作者 最佳答案

Oh nice! 

Thanks for your help. I could get there by using this expression and manipulate it:

<xpath expr="//notebook[1]//form[1]//group[1]//group[2]//field[@name='name']" position="replace">
<field name="name" invisible="1" />
</xpath>
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
3月 23
2495
0
11月 24
1066
1
9月 21
3126
1
9月 21
3860
1
5月 25
1428