[FIX] pos_restaurant: remove useless cleaning

[1] has changed the summary structure of an order. To avoid any issues
during the deployment, we added some instructions to remove the old
summaries. Now, these instructions can be removed.

[1] 911a178c99fe56c5f644083a0bb5e992a11f34ed

closes odoo/odoo#83481

X-original-commit: 1638b3490d8fb44a6b57d6168e5e74e567f0fd50
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
This commit is contained in:
Adrien Widart
2022-01-27 15:26:51 +00:00
parent 690ac6bfb5
commit fddcfeb3ae
@@ -300,13 +300,6 @@ models.Order = models.Order.extend({
init_from_JSON: function(json){
_super_order.init_from_JSON.apply(this,arguments);
this.saved_resume = json.multiprint_resume && JSON.parse(json.multiprint_resume);
// Since the order summary structure has changed, we need to remove the old lines
// Otherwise, this fix deployment will lead to some errors
for (var key in this.saved_resume) {
if (this.saved_resume[key].pid == undefined) {
delete this.saved_resume[key];
}
}
},
});