Add module pos_journal_sequence.

This commit is contained in:
Alexis de Lattre
2014-11-17 23:13:49 +01:00
parent 7c515b6273
commit a33c3a1a21
5 changed files with 148 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js
index 8e02ddd..b95c113 100644
--- a/addons/point_of_sale/static/src/js/widgets.js
+++ b/addons/point_of_sale/static/src/js/widgets.js
@@ -90,6 +90,10 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
renderElement: function() {
var self = this;
this._super();
+ // sort cashregisters by pos_sequence
+ this.pos.cashregisters.sort(function(obj1, obj2) {
+ return obj1.journal.pos_sequence - obj2.journal.pos_sequence;
+ });
_.each(this.pos.cashregisters,function(cashregister) {
var button = new module.PaypadButtonWidget(self,{