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

hi

In project.task we have created a new many2one field file_no.

when we create a new file no, using create and edit in file_no, a new form pops up

What i need is when we create a new file no, i wanna fetch the customer name (partner_id) that i have given in project.task form to the new form.

i have given a partner_id field in the new form too

thanks in advance

아바타
취소
베스트 답변

In XML,
<field name="field_no" context={'default_partner_id': partner_id} />

To pass a value available at your FORM to another pop-up, you need to pass the value through CONTEXT.
{'default_FIELDNAME': value @ FORM}  ==> Sets FIELDNAME with value @ FORM

For reference, you can check the Customer window, in which if you try to create a new company for a contact, the values are set using CONTEXT.

아바타
취소
작성자

Thanks my friend it did work