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

I need to make this (pre_sale_date) field mandatory only in stage ("ESCOPO") but because all the stages have the same ID I'm not working. This field I'm creating a new module on CRM

Link code XML --->
https://prnt.sc/iy0yc0

Link View Odoo --->
https://prnt.sc/iy10w5

아바타
취소
베스트 답변

Try this one

<field name="field1" attrs="{'required':[('make_that_field_required_when_your_stage_is_Department','=','Department')]}"/>
아바타
취소

You can use attrs attributes to make a field visible, invisible, read-only and required. For more detail please visit: http://learnopenerp.blogspot.com/2016/10/how-to-visible-and-invisible-fields-in.html

Hope this helps you and others :)

베스트 답변

try:

<field name="pre_sale_date" position="attributes">
<attribute name="attrs">{'required': [(your_condition)]}</attribute>
</field>

아바타
취소
작성자 베스트 답변

what should I fill in (your_condition)? for this field is not mandatory in Estonian I would need an ID however by stage it is a field it does not have ID

아바타
취소
관련 게시물 답글 화면 활동
1
3월 15
7400
2
12월 23
2062
0
6월 22
1866
1
10월 19
5113
1
7월 17
6091