Search 1.9 billion lines of Odoo code on GitHub

sale_amendment

Author: Camptocamp,Odoo Community Association (OCA)
License: AGPL-3
Branch: 8.0-abi_master
Repository: acsone/sale-workflow
Dependencies: decimal_precision, sale_stock, and stock_split_picking
Languages: Python (716, 77.4%), XML (74, 8.0%), and reStructuredText (135, 14.6%)
Other branches: 8.0-sale_amendment-with-setup, and abi_master
Other repositories: AntonioOERP/odoo-oca, DudhatShivam/odoo-oca, HarshalBhoir/odoo-oca, Ubaid-UrRehman/odoo-oca, augustodinizl/odoo-oca, guewen/sale-workflow, gurneyalex/sale-workflow, leodoooca/ppts-odoo-oca, marcelsavegnago/odoo-oca, mgielissen/odoo-oca, moltisinc/odoo-oca, niulinlnc/odoo-oca, ppts-odoo/odoo-oca, ruter-lyu/odoo-oca, shiftctrl-io/odoo-oca, sm2x/odoo-oca, tate11/odoo-oca, vidtsin/odoo-oca, and westlyou/odoo-oca

<a name="sale-amendment"></a> <h2>Sale Amendment</h2> <p>This module is meant to assist the users in handling the cases when a customer changes his mind about a sale order. See also <cite>purchase_amendment</cite> (in <a class="reference external" href="https://github.com/OCA/purchase-workflow">https://github.com/OCA/purchase-workflow</a>), which will help cover similar cases when you are using drop shipping, or for make to order products.</p> <a name="background-information"></a> <h2>Background information</h2> <p>This describes the problem the module solves. Feel free to skip if you are only interested in the solution.</p> <p>Common situations faced in real life by end users:</p> <ol class="arabic"> <li><p class="first">the Customer wants to decrease the quantity to be shipped for an ordered product.</p> <p>There is a remaining quantity to be shipped and the customer wants less than initial order (but he still wants some, so you can't blindly cancel the sale order)</p> <p>When asked, the supplier or the logistics department, they say OK.</p> <p>The end user is stuck with the system and can't do anything. The only way out: cancel the remaining deliveries, the sale order goes in exception, click &quot;manually corrected&quot;, do the same for the purchase order if necessary, make a new sale order (and a new purchase order for MTO / drop shipment). That's not really good but it works.</p> <p>However, this does not work with an order for 1000 products, and of which 200 were already shipped the customer wants only to receive 600 instead of the remaining 800: it is not possible to split a picking in order to cancel the proper quantity. Canceled sale order line do not cancel their linked delivery and even worse: if you cancel a sale order line on a draft sale order, and then confirm the order, the line gets to confirmed...</p> </li> <li><p class="first">the Customer wants to increase the quantity to be shipped of an ordered product.</p> <p>There is a remaining quantity to be shipped and the customer wants more of the product.</p> <p>When asked, the supplier or the logistics department, they say OK.</p> <p>The end user is blocked with the system and can't do anything. The only way out: make a new sale order (and purchase order for MTO / drop shipment). That's not really good but it works.</p> </li> <li><p class="first">the Customer wants to cancel the remaining quantity of a product</p> <p>There is a remaining quantity to be shipped and the customer wants to cancel it. The only way to go is to is to cancel all remaining, and regenerate (and if there are other lines to be shipped, the same issue than in point 4 are there...)</p> <ul class="simple"> <li>When asked, the supplier or the logistics department, they say OK.</li> <li>Cancel the remaining picking</li> <li>the sale order goes in exception, user clicks &quot;manually corrected&quot;</li> <li>Same for purchase order</li> </ul> <p>Problems with this solution: the historical values are lost. They can be logged in the chatter, but this is not ideal.</p> </li> <li><p class="first">the Customer wants to cancel a whole line of a product, not yet shipped</p> <p>On the sale order, some lines have already been shipped, there are still some lines to ship.</p> <p>When asked, the supplier or the logistics department, they say OK.</p> <p>The end user is stuck with the system and can't do anything. It is not possible to split a delivery so it is not possible to can cancel the proper line. The only work around: make note in the chatter. Once only the line to be cancelled is the only remaining line to be delivered, it is possible to cancel it like in point 3 above.</p> </li> <li><p class="first">the Customer wants to cancel a sale order, no yet shipped</p> <p>This one works:</p> <ul class="simple"> <li>When asked, the supplier or the logistics department, they say OK.</li> <li>Cancel the pickings of the sale order</li> <li>Cancel the purchase order</li> <li>Cancel the sale order</li> </ul> </li> <li><p class="first">the Customer wants to add a new product in an existing confirmed sale order</p> <p>Create a new sale order :)</p> </li> </ol> <p>Conclusion</p> <ul class="simple"> <li><cite>5.</cite> and <cite>6.</cite> are ok</li> <li><cite>1.</cite> and <cite>2.</cite> are ok, but tedious</li> <li><cite>3.</cite> is tedious if there are no other products, but otherwise, it's like <cite>4.</cite>...</li> <li><cite>4.</cite> it may work, but is really error prone</li> </ul> <p>The solution proposed by Sale Amendment / Purchase Amendment does not bypass any of the system process, but provides some automation so that the process does not take too much time and is less error prone.</p> <a name="usage"></a> <h2>Usage</h2> <p>If you allow to use the process made available by this addon, we advise that the invoice policy is 'based on delivery'. The module will not allow amending an invoiced sale order, to prevent the invoicing to be wrongly made or too much time consuming at every change happening in the logistics chain.</p> <p>This module respects the best practices in term of segregation of responsibilities and does not bypass any workflow. It just here to ease the user experience and have a way to have a final sale order with the proper information (how much has been canceled, how much has been shipped). With the standard, you only have this information in the pickings.</p> <p>When one of the cases described above is encountered, the process to handle starts with the related picking. A wizard is available to split the picking lines (stock moves), and it handles the proper reconnection of the logistic flows in case of chained moves.</p> <p>Let's take an example from case 1: there was an initial order of 50 units and the customer says he wants only 35, you split the picking to get two lines, one with 35 units and the other one with 15 units. The line with 15 units can be canceled. This causes the sale order to go in shipping exception.</p> <p>In that state, this addon adds a button labeled 'Amend' which displays a wizard, with a summary of the sale order lines, showing for each product the quantity ordered, the quantity delivered, the quantity canceled. The user can edit the quantity to ship (to a value up to ordered - delivered). When validated, the wizard will:</p> <ul class="simple"> <li>split / cancel the sale order lines according to the values specified</li> <li>if necessary, recreate a procurement for the quantity to be delivered based on the updated quantity to be delivered</li> <li>record the reason given for the amendment in the chatter</li> </ul> <p>In the sale order form view, the canceled lines are in grey, and the various quantities are displayed in the sale order lines. The total amount of the sale order is now computed ignoring the canceled lines.</p> <a name="known-issues-roadmap"></a> <h2>Known issues / Roadmap</h2> <a name="version-2-0"></a> <h3>version 2.0</h3> <ul class="simple"> <li>the SO report display the state of a SO line so we can re-send the order to the customer to show him the new status of his order.</li> </ul> <a name="version-3-0"></a> <h3>version 3.0</h3> <ul> <li><p class="first">Add version number on SO</p> </li> <li><p class="first">When I amend a SO, before splitting line of original SO, a new copy is made, but we continue to work with the original one (the copy is the archived version):</p> <blockquote> <ul class="simple"> <li>The original SO number is now SO number + ‘-’ + Version</li> <li>The archived version is canceled and inactivated (to avoid having it in the list of SO)</li> </ul> </blockquote> </li> <li><p class="first">Add tab “Amendment” O2M containing datetime, user, reason, SO version (archived version)</p> </li> <li><p class="first">Based on : <a class="reference external" href="https://github.com/OCA/sale-workflow/compare/7.0...akretion:70-add-sale_order_revision">https://github.com/OCA/sale-workflow/compare/7.0...akretion:70-add-sale_order_revision</a> and</p> </li> </ul> <blockquote> <a class="reference external" href="https://github.com/OCA/purchase-workflow/tree/7.0/purchase_order_revision">https://github.com/OCA/purchase-workflow/tree/7.0/purchase_order_revision</a></blockquote> <a name="credits"></a> <h2>Credits</h2> <a name="contributors"></a> <h3>Contributors</h3> <ul class="simple"> <li>Joel Grand-Guillaume &lt;<a class="reference external" href="mailto:joel.grandguillaume&#64;camptocamp.com">joel.grandguillaume&#64;camptocamp.com</a>&gt;</li> <li>Alexandre Fayolle &lt;<a class="reference external" href="mailto:alexandre.fayolle&#64;camptocamp.com">alexandre.fayolle&#64;camptocamp.com</a>&gt;</li> <li>Guewen Baconnier &lt;<a class="reference external" href="mailto:guewen.baconnier&#64;camptocamp.com">guewen.baconnier&#64;camptocamp.com</a>&gt;</li> </ul> <a name="maintainer"></a> <h3>Maintainer</h3> <a class="reference external image-reference" href="http://odoo-community.org"><img alt="Odoo Community Association" src="http://odoo-community.org/logo.png" /></a> <p>This module is maintained by the OCA.</p> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>To contribute to this module, please visit <a class="reference external" href="http://odoo-community.org">http://odoo-community.org</a>.</p>