Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007202Openbravo ERP07. Sales managementpublic2009-01-28 17:062011-02-04 09:15
emartinez 
rmorley 
normalminoralways
acknowledgedopen 
5
2.40 
 
Core
No
0007202: Automatic creation of a Sales Order from a Purchase Order
Imagine the following case for understanding why this feature is requested. Let's say we have different organizations A and B which correspond to different companies. In this situation, let's imagine company A buys a product to company B. By means of this automation, when company A completes a Purchase Order where its provides is organization B, a Sales Order would be automatically generated in organization B.

We have developed this automatization for a client. Contact us in case you need.
To develop this automation you would have to:

*Modify the process which is executed when "completing" a purchase order.
*We suggest to leave in state "Draft" the sales order generated automatically. Thus, a user of company B should validate it personally, even it has been generated automatically.
*In case that company A reactivates the purchase order (already completed), the changes will not be transferred automatically to the sales order in company B (already created).
*In order to inform users in company B that new sales order have been generated automatically, new alerts can be created.
Then, going to more technical details:

In the procedure C_ORDER_POST you will have to add the following:

*If it is a purchase order
*which is being complete
*and there is not a sales order already related to it (you should add a new column in C_ORDER in order to inform of the Sales Order ID related to the current purchase order)
*and it is a transaction between two organizations belonging to the same client (the business partner of the purchase document, organization B, is related to an organization in AD_ORGINFO)

Then:

**Then create the header of the sales order
**Create the lines with the same products in the lines the purchase order lines contain. For this, the products should be defined by organization "*", in order to see them in both organizations A and B.

Finally, when the sales order is generated in organization B, you should inform the field POREFERENCE with the DocumentNo of the purchase order of organization A. In the same way, you will have to inform the POREFERENCE field of the purchase order of organization A with the DocumentNo of the sales order of organization B.
No tags attached.
related to feature request 0007205 acknowledged rmorley Automatic creation of a Goods Receipt from a Goods Shipment 
blocks feature request 0007248 acknowledged rmorley Intercompany shipments 
Issue History
2009-01-28 17:06emartinezNew Issue
2009-01-28 17:06emartinezAssigned To => rafaroda
2009-01-28 17:06emartinezsf_bug_id0 => 2543310
2009-01-29 11:04rafarodaRelationship addedrelated to 0007205
2009-01-29 11:05rafarodaAssigned Torafaroda => pjuvara
2009-01-29 21:53pjuvaraStatusnew => acknowledged
2009-01-29 21:53pjuvaraRelationship addedblocks 0007248
2011-02-04 09:15jpabloaeAssigned Topjuvara => rmorley

There are no notes attached to this issue.