콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
9112 화면

 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
2764
0
11월 24
1284
1
9월 21
3394
1
9월 21
4097
1
5월 25
1807