Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1057 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona