Skip to Content
Menu
This question has been flagged
3 Replies
3784 Views

I want to have the source document(s) of purchase order to be clickable so that they can open the related record(Sale order). how can we achieve such feature?


Avatar
Discard
Best Answer

Hi Dagina,

By default, we cant able to map. But its having some customizations, simply we can implement. I can share one logic here. 

For a quick tracking of Sales order from a Purchase Order, add custom selection on the purchase order line and add one more button for creating a sales order from the PO model (purchase.order). Then have to trigger it on a wizard, and put the basic fields for selecting the customer (m20 type field from res.partner). Add one more button on the same wizard in the name of "Generate SO" for creating a SO record against that PO. 

On Sales Order model, add m2o/m2m type field for writing the PO reference Number. Then we can able to point with default Sales module workflow. 

Add one smart button on the PO model (purchase.order), for the direct access to the Sales order from the Purchase.

Please try this way. Hopefully guess you can fulfill your requirement.


Avatar
Discard
Best Answer

Hi,

Source Document in purchase order is a char fields ie a Character field and this doesn't open any links to other models as you prefer.

In order to achieve your requirement, 

(Scenario ONE SO - ONE PO)

1. You need a custom many2one field in  PO  which  points  to  sale.order  

2.When  PO  is  created  based  on  the  Make  to  order  and  BUY  configuration  in  Routes,  you  need  to  pass  the  sale order  id  into  this  custom many2one  field  in   PO 

So that you can open the sale order from PO 

OR 

(Scenario MULTIPLE SO - ONE PO)

1. You need a custom button  in PO  which calls a python code to open the sales orders from  a  single  PO .


Hope it helps,

Thanks

 

Avatar
Discard
Author Best Answer

Thank you Jain and Sarath for your help. i will try them accordingly

Avatar
Discard
Related Posts Replies Views Activity
3
Dec 24
2360
1
Jul 24
705
1
Jun 24
773
2
Jun 24
897
1
Mar 24
536