Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1059 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează