Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
8770 Vizualizări

 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?


 



 


Imagine profil
Abandonează
Autor

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

Cel mai bun răspuns

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.

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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>
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mar. 23
2459
0
nov. 24
1039
1
sept. 21
3088
1
sept. 21
3836
1
mai 25
1411