تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4581 أدوات العرض
<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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
Chatter in models تم الحل
1
مارس 22
2496
2
يناير 21
4358
2
يونيو 19
3504
0
مارس 24
1183
5
سبتمبر 24
51905