Browse Source

Ajout Création contenant sur list produit

12-V2.0
Juliana 4 years ago
parent
commit
d7aba74fa4
  1. 9
      static/src/css/style.css
  2. 18
      static/src/js/container.js
  3. 3
      static/src/xml/pos.xml

9
static/src/css/style.css

@ -116,6 +116,7 @@
} }
.pos .presentation-screen .bypass-container, .pos .presentation-screen .bypass-container,
.pos .product-balance-screen .add-new-container,
.pos .confirmation-screen .btn-back, .pos .confirmation-screen .btn-back,
.pos .balancecontainerscale-screen .add-container, .pos .balancecontainerscale-screen .add-container,
.pos .scale-screen-custo .add-transaction{ .pos .scale-screen-custo .add-transaction{
@ -131,6 +132,14 @@
cursor: pointer; cursor: pointer;
} }
.pos .product-balance-screen .add-new-container{
border: solid 0px #d1d1d1;
margin: 0 auto;
width: 250px;
font-size: 20px;
padding: 2px;
}
.pos .presentation-screen .bypass-container{ .pos .presentation-screen .bypass-container{
width: 400px; width: 400px;
font-size: 25px; font-size: 25px;

18
static/src/js/container.js

@ -505,6 +505,17 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
this.product_categories_widget.reset_category(); this.product_categories_widget.reset_category();
this.numpad.state.reset(); this.numpad.state.reset();
// Ajout de la fonctionnalité Pesée sans contenant
if (this.pos.config.allow_without_container){
$("#add-new-container").removeClass('oe_hidden');
}
else {
$("#add-new-container").addClass('oe_hidden');
}
this.$('.add-new-container').click(function(){
self.gui.show_screen('balancecontainerscale', {barcode: 'CONTAINER'});
});
this.$('.back').click(function(){ this.$('.back').click(function(){
self.gui.show_screen('presentation'); self.gui.show_screen('presentation');
}); });
@ -523,6 +534,7 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
hide: function(){ hide: function(){
this._super(); this._super();
$("#pos-header-text-prod").addClass('oe_hidden'); $("#pos-header-text-prod").addClass('oe_hidden');
$("#add-new-container").addClass('oe_hidden');
var screen = this.gui.screen_instances['products-balance']; var screen = this.gui.screen_instances['products-balance'];
}, },
@ -823,7 +835,7 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
next_screen: 'products-balance', next_screen: 'products-balance',
// Ignore products, discounts, and client barcodes // Ignore products, discounts, and client barcodes
// barcode_product_action: function(code){},
barcode_product_action: function(code){},
barcode_discount_action: function(code){}, barcode_discount_action: function(code){},
barcode_client_action: function(code){}, barcode_client_action: function(code){},
@ -845,6 +857,7 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
screen.$el.removeClass('oe_hidden'); screen.$el.removeClass('oe_hidden');
$("#pos-header-text-selec").removeClass('oe_hidden'); $("#pos-header-text-selec").removeClass('oe_hidden');
$("#pos-header-text-confirm").addClass('oe_hidden'); $("#pos-header-text-confirm").addClass('oe_hidden');
$("#add-new-container").addClass('oe_hidden');
// Ajout de la fonctionnalité Pesée sans contenant // Ajout de la fonctionnalité Pesée sans contenant
if (this.pos.config.allow_without_container){ if (this.pos.config.allow_without_container){
@ -865,6 +878,9 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
var screen = this.gui.screen_instances['products-balance']; var screen = this.gui.screen_instances['products-balance'];
screen.$el.addClass('oe_hidden'); screen.$el.addClass('oe_hidden');
$("#pos-header-text-selec").addClass('oe_hidden'); $("#pos-header-text-selec").addClass('oe_hidden');
if (this.pos.config.allow_without_container){
$("#add-new-container").removeClass('oe_hidden');
}
}, },
}); });

3
static/src/xml/pos.xml

@ -265,6 +265,9 @@
Retour Retour
</span> </span>
</div> </div>
<div class='button add-new-container oe_hidden' id="add-new-container">
Créer un contenant
</div>
<div id="pos-header-text-prod" class=" pos-text oe_hidden"> <div id="pos-header-text-prod" class=" pos-text oe_hidden">
<ul> <ul>
<li><span>1</span></li> <li><span>1</span></li>

Loading…
Cancel
Save