Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4563 Weergaven
<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

Avatar
Annuleer

Hello Sir. Did you find a solution for this ?

Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mrt. 22
2461
2
jan. 21
4332
2
jun. 19
3489
0
mrt. 24
1176
5
sep. 24
51791