[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
This commit is contained in:
Martin Trigaux
2016-10-12 09:44:56 +02:00
parent 7bdb6f9c8d
commit 69dfa67ac7
+1 -1
View File
@@ -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) {