Search 1.9 billion lines of Odoo code on GitHub

website_sale_payment_fix

Author: Michael Karrer (michael.karrer@datadialog.net), DataDialog
License: no license
Branch: intdadi
Repository: mgielissen/odoo_v8.0
Dependencies: website, website_quote, and website_sale
Languages: Markdown (23, 6.1%), PO File (158, 42.2%), Python (92, 24.6%), and XML (101, 27.0%)
Other branches: intdadirl1, master, and website_forum_doc_fix
Other repositories: OpenAT/odoo_v8.0, OpenAT/online, Upsyd/odoo_v8.0, alaa1994a/odoo_v8.0, joshuajan/odoo_v8.0, and molandtoxx/odoo_v8.0

<h1>website<em>sale</em>payment_fix</h1> <p>This addon fixes the session depended payment process of odoo 8.0 website<em>sale shop in combination with the payment</em>ogone_dadi payment provider which is a replacement of the odoo ogone payment provider.</p> <p>The problem of the original odoo payment process is that the update of the payment transaction and the related sales order is dependent on the data of the current request.session. But it might be that the answer from ogone is received later and not related to the current session at all and also send by ogone multible times for the same or different states of the particullar payment.transaction.</p> <p>To solve this we did: - <strong>clear the session variables</strong> sale<em>order</em>id, sale<em>last</em>order<em>id, sale</em>transaction<em>id, sale</em>order<em>code</em>pricelist<em>id so a new Sales Order would be generated if the user opens the shop again. AND <strong>set the sales order to state bestÃĪtigt</strong> so that no changes are possible after the button of the PP in shop/payment is pressed (JSON calls method payment</em>transaction in website_sale main.py)</p> <ul> <li><p>If we receive an answer from the PP <strong>all the logic for the Sales Order is done at method form_feedback</strong> (website<em>sale did this already partially for setting the SO to state done but did not react to all possible states) so we do no longer depend on /shop/payment/validate to set the other states for the SO. This was needed because payment</em>validate did use session variables to find the payment.transaction and the sales.order but since the answer of the PP can be defered this is not always correct.</p></li> <li><p>Make a lot of fields of Payment.transaction readonly in the form since they should be only changed by the answer of the PP and not by the user expecailly because changing the state of a TX would NOT! change the SO state since this is done now and form_validate and before this addon in /shop/payment/validate.</p></li> <li><p>Make the Filed in the sales order for the linke TX read only - should only be set by code not by humans ;)</p></li> <li><p>All the other stuff is done in the addon payment<em>ogone</em>dadi - read its description too!</p></li> </ul>