Skip to Content
Menu
This question has been flagged
2 Replies
3579 Views

My POs are linked to my Sales Orders when the Sales orders are confirmed. This is my normal business process.

However, in certain instances I need to manually link a PO to a Sales Order. 

I've added the Sales Order number into the "Source Document" field of the PO, but that doesn't seem to create the link.

How can one achieve this?

Thanks



Avatar
Discard
Best Answer

It's been some time since I worked with that area but I seem to recall that the purchase.order.line model has a field sale_line_id. If you add that field into your purchase order form, it should do the trick and link the purchase order to the sale order you set manually.

Avatar
Discard

Thanks Jan, I also face the same issue, I have found the field sale_line_id under the purchase.order.line model and since it is a base field when I remove the read-only tick, it gave the following error message:

Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon.

Best Answer

I guess you are using Make To Order process, since PO is automatic linked to Sales order.  If a purchase order is created without the trigger from MTO, it is only possible to enter the sales order as information in the purchase order.

The field Source Document is a Text field, without any relations.  With Studio app it is possible to create a Many to one field with relation to a sales order. Enter in the sales order manually in that field.  And the same can be done on the sales order, for information of what purchase order is created. And you will have to update it manually.

But this will only be for information.  Since the Make to Order link is not there.

Avatar
Discard
Related Posts Replies Views Activity
0
Apr 19
2571
2
Dec 23
1702
0
Oct 24
1200
1
Nov 23
2558
0
Nov 23
1315