Skip to content

Instantly share code, notes, and snippets.

@nim-odoo
Last active December 14, 2018 03:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nim-odoo/595a29c4d18f789e99faf8f7ae8e92ff to your computer and use it in GitHub Desktop.
Save nim-odoo/595a29c4d18f789e99faf8f7ae8e92ff to your computer and use it in GitHub Desktop.
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 9b222f1..4492457 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -1889,7 +1889,8 @@ exports.Order = Backbone.Model.extend({
}
return zero_pad(this.pos.pos_session.id,5) +'-'+
zero_pad(this.pos.pos_session.login_number,3) +'-'+
- zero_pad(this.sequence_number,4);
+ zero_pad(this.sequence_number, 4) +'-'+
+ zero_pad(Date.now() % 1000, 3);
},
get_name: function() {
return this.name;
diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml
index 995a27d..f8fa494 100644
--- a/addons/point_of_sale/static/src/xml/pos.xml
+++ b/addons/point_of_sale/static/src/xml/pos.xml
@@ -1402,7 +1402,9 @@
<t t-name="PosTicket">
<div class="pos-sale-ticket">
- <div class="pos-center-align"><t t-esc="moment().format('L LT')"/> <t t-esc="order.name"/></div>
+ <div class="pos-center-align"><t t-esc="moment().format('L LT')"/></div>
+ <br />
+ <div class="pos-center-align"><t t-esc="order.name"/></div>
<br />
<t t-esc="widget.pos.company.name"/><br />
<div class="receipt-phone">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment