From 298fc213dd4444a9d4f1f5b4817c8d52372d26b1 Mon Sep 17 00:00:00 2001 From: Joren Van Onder <jov@odoo.com> Date: Fri, 10 Jun 2016 14:23:46 +0200 Subject: [PATCH] [FIX] point_of_sale: ensure that there is always an order creation_date Introduced by e9b1254a5c4ea008c13d0636fec87bc0f8d42245. This commit made sense but there are certain POS modules that send the order to the backend before validation and thus depend on there always being a creation date, even if the order has not been validated yet. This ensures that we don't end up with an undefined creation_date in the backend. opw-680590 --- addons/point_of_sale/static/src/js/models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index ad5cbf7907d9..6bff153e8a16 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1607,7 +1607,7 @@ exports.Order = Backbone.Model.extend({ user_id: this.pos.cashier ? this.pos.cashier.id : this.pos.user.id, uid: this.uid, sequence_number: this.sequence_number, - creation_date: this.validation_date, // todo: rename creation_date in master + creation_date: this.validation_date || this.creation_date, // todo: rename creation_date in master fiscal_position_id: this.fiscal_position ? this.fiscal_position.id : false }; }, -- GitLab