Skip to Content
Menu
This question has been flagged
3 Replies
7526 Views

 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?


 



 


Avatar
Discard
Author

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

Best Answer

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.

Avatar
Discard
Author Best Answer

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>
Avatar
Discard
Related Posts Replies Views Activity
2
Mar 23
1105
0
Nov 24
50
1
Sep 21
2110
1
Sep 21
2858
2
Dec 24
123