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

Hello,


In our multi company workflow we create purchase orders in one company that become sales orders in another company (vendor company). I want to show the status of the sales order on the originating purchase order. 

How can I show the sales order status field (‘state’) on the purchase order which created it?


thanks in advance

Аватар
Отменить
Лучший ответ

Hi,

If you don't have a Many2one field to the Sale Order in the Purchase Order create one.

sale_order_id = fields.Many2one('sale.order', string='Sales Order')
sale_order_state = fields.Char('Sale Order Status', related='sale_order_id.state')

Then, in the code after creating the Sale Order from Purchase Order, write the id of the new Sale Order in the Purchase Order. Add these fields in the Purchase Order view to see them in the Purchase Order.

Regards

Аватар
Отменить