Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2366 Представления

Hello. I am trying to create an automatic action that sets the value of a field depending on the value of a different model.


Main model is stock.production.lot and secondary is qc.inspection (from a OCA module). The automatic action is triggered when a new lot number is created, then it creates a new registry in qc.inspection; until here it is no problem.

The stock.production.lot model has a field named product_id which the is the id from product.product model; also qc.inspection model has a field named product_id which is also the id from product.product model. I want to fill automatically qc.inspection field using the product_id from stock.production.lot using a python expression.

For the field product_id (qc.inspection) I tried the expression record.product_id.id but it doesnt work. Which is my error?


Thank you

Аватар
Отменить
Related Posts Ответы Просмотры Активность
5
дек. 23
23904
0
июн. 16
3335
2
мар. 15
11622
2
февр. 23
2603
0
мар. 24
2064