Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4569 Представления
<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
2461
2
янв. 21
4336
2
июн. 19
3491
0
мар. 24
1177
5
сент. 24
51805