تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1045 أدوات العرض

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

الصورة الرمزية
إهمال