Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4545 มุมมอง
<xpath expr="//tree" position="attributes">
<attribute
name="decoration-danger">product_id ==</attribute>
</xpath>

In Odoo 12, I would like to pass a value of a certain product id, that i have defined in data.xml and i would like to use self.env.ref('my_module.my_product_id).id  for this equation. This way the order line product would stand out with a red color, the code works if i go for 'product_id == 420' but i cant use a function? Any idea for this solution? Thank you

อวตาร
ละทิ้ง

Hello Sir. Did you find a solution for this ?

คำตอบที่ดีที่สุด

i think you can't do that.

what you can do is give a context to the action, and the action decides which view will be use based on the data stored in the context

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Chatter in models แก้ไขแล้ว
1
มี.ค. 22
2426
2
ม.ค. 21
4299
2
มิ.ย. 19
3467
0
มี.ค. 24
1140
How to delete a website? แก้ไขแล้ว
5
ก.ย. 24
51719