[FIX] lunch: Add required argument location_id

This commit fixes Tracbacki coming when the user removes a location on New order.
It is because of location_id was not passed on Route.

closes odoo/odoo#38023

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
This commit is contained in:
Swapnesh Shah
2019-10-06 17:50:38 +00:00
committed by GitHub
parent a05f4b7589
commit 147e61a3bc
+1 -1
View File
@@ -63,7 +63,7 @@ class LunchController(http.Controller):
return {'message': request.env['ir.qweb'].render('lunch.lunch_payment_dialog', {})}
@http.route('/lunch/user_location_set', type='json', auth='user')
def set_user_location(self, location_id, user_id=None):
def set_user_location(self, location_id=None, user_id=None):
self._check_user_impersonification(user_id)
user = request.env['res.users'].browse(user_id) if user_id else request.env.user