Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4579 Lượt xem
<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

Ảnh đại diện
Huỷ bỏ

Hello Sir. Did you find a solution for this ?

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
Chatter in models Đã xử lý
1
thg 3 22
2481
2
thg 1 21
4351
2
thg 6 19
3502
0
thg 3 24
1182
5
thg 9 24
51895