Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3964 มุมมอง

Hello,

I wanted that my object have a relation  many2one with email.template and the domain of this field is just the email.template that have the model_id with the value 'hr.evaluation.interview'. 

I tryed like this:

<field name="template_id" domain="[('model_id','=','hr.evaluation.interview')]" context="{'default_model_id':'hr.evaluation.interview' }"/>

But it craches: 

invalid input syntax for integer: "hr.evaluation.interview"

I try like this <field name="template_id" domain="[('model_id','=','hr.evaluation.interview')]" context="{'default_model_id':ref('hr.evaluation.interview') }"/>

and like this : 

<field name="template_id" domain="[('model_id','=',[ref('mb_boldint_hr_evaluation.model_hr_evaluation_interview')])]" context="{'default_model_id': [ref('mb_boldint_hr_evaluation.model_hr_evaluation_interview')] }"/>

But it doesn't know the ref. 

Do you know how can I do this? 

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
มี.ค. 15
10797
0
มี.ค. 15
3383
1
มี.ค. 15
8959
Default values for Users แก้ไขแล้ว
1
ก.พ. 24
13520
1
มี.ค. 15
7633