From 4468f5a94b853d691e38a66082bb37911972a88d Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Fri, 18 May 2018 08:54:21 +0200 Subject: [PATCH] pg_update_quotation --- ext/custom-addons/dp_rest_to_rpc/controllers/main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ext/custom-addons/dp_rest_to_rpc/controllers/main.py b/ext/custom-addons/dp_rest_to_rpc/controllers/main.py index eaa248a2..2785fa87 100644 --- a/ext/custom-addons/dp_rest_to_rpc/controllers/main.py +++ b/ext/custom-addons/dp_rest_to_rpc/controllers/main.py @@ -73,3 +73,13 @@ class MyController(http.Controller): except Exception as e: return e.args[0] return sale_order_id + + @http.route('/pg_update_quotation', type='json', auth='none', methods=['POST']) + def handle_pg_update_quotation(self, **post): + values = request.jsonrequest + sale_order_obj = request.env['sale.order'].sudo() + try: + sale_order_id = sale_order_obj.pg_update_quotation(values) + except Exception as e: + return e.args[0] + return sale_order_id