[FIX] point_of_sale: crash on scale screen
bzr revid: fva@openerp.com-20131216152113-3y2s2fva3wvguoxt
This commit is contained in:
@@ -108,7 +108,6 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal
|
||||
this.connection.session_id = _.uniqueId('posproxy');
|
||||
this.test_connection();
|
||||
window.proxy = this;
|
||||
|
||||
},
|
||||
close: function(){
|
||||
this.connection.destroy();
|
||||
|
||||
@@ -197,7 +197,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
|
||||
}
|
||||
}
|
||||
self.cashregisters = bankstatements;
|
||||
console.log('cashregisters',self.cashregisters);
|
||||
});
|
||||
|
||||
return loaded;
|
||||
|
||||
@@ -570,6 +570,14 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
||||
get_product_weight_string: function(){
|
||||
return (this.weight || 0).toFixed(3) + ' Kg';
|
||||
},
|
||||
get_product_image_url: function(){
|
||||
var product = this.get_product();
|
||||
if(product){
|
||||
return window.location.origin + '/web/binary/image?model=product.product&field=image_medium&id='+product.id;
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
},
|
||||
close: function(){
|
||||
var self = this;
|
||||
this._super();
|
||||
@@ -930,7 +938,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
||||
|
||||
if( this.pos.config.iface_cashdrawer
|
||||
&& this.pos.get('selectedOrder').get('paymentLines').find( function(pl){
|
||||
return pl.cashregister.get('journal').type === 'cash';
|
||||
return pl.cashregister.journal.type === 'cash';
|
||||
})){
|
||||
this.pos.proxy.open_cashbox();
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
<t t-esc="widget.format_currency(widget.get_product_price()) + '/Kg'" />
|
||||
</span>
|
||||
<t t-if="widget.get_product()">
|
||||
<img t-att-src="widget.get_product().get_image_url()" />
|
||||
<img t-att-src="widget.get_product_image_url()" />
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user