跳至內容
選單
此問題已被標幟
1 回覆
4571 瀏覽次數
<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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 22
2464
2
1月 21
4337
2
6月 19
3493
0
3月 24
1178
5
9月 24
51822