[FIX] pos_restaurant: resume shop when pos_restaurant is installed
This is a followup to the fix made in
99615ff6cc.
When calling JSON.stringify to undefined, it results to undefined, thus,
it is necessary to check if the value is undefined before JSON.parse'ing
it.
closes odoo/odoo#42812
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
@@ -333,7 +333,7 @@ models.Order = models.Order.extend({
|
||||
},
|
||||
init_from_JSON: function(json){
|
||||
_super_order.init_from_JSON.apply(this,arguments);
|
||||
this.saved_resume = JSON.parse(json.multiprint_resume);
|
||||
this.saved_resume = json.multiprint_resume && JSON.parse(json.multiprint_resume);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user