[FIX] point_of_sale: ensure that there is always an order creation_date
Introduced by e9b1254a5c. 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
This commit is contained in:
@@ -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
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user