Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
8719 Tampilan

 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
Buang
Penulis

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

Jawaban Terbai

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
Buang
Penulis Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Mar 23
2399
0
Nov 24
1018
1
Sep 21
3039
1
Sep 21
3776
1
Mei 25
1293