From 69dfa67ac7347d9c67214868cc4e4046af9e7e49 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 12 Oct 2016 09:44:56 +0200 Subject: [PATCH] [FIX] pos: do not mix create and validation date The validation_date was using the creation_date value in the follwing scenario: 1. create a new order with a few lines (creation_date=t1) 2. reload the page, `init_from_JSON` uses validation_date=t1 3. validate the order at t2, ignored due to already stored value creation_date must be kept for tracablity reasons (e.g. pos_blackbox_be) Fixes https://www.odoo.com/groups/59/20542134 --- 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 e53fd2e7d4a..219f6c75cfa 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1782,7 +1782,7 @@ exports.Order = Backbone.Model.extend({ }, initialize_validation_date: function () { - this.validation_date = this.validation_date || new Date(); + this.validation_date = new Date(); }, set_tip: function(tip) {