'discount': self.config.barcode_discount,
'price': self.config.barcode_price,
});
+
+ if (self.config.company_id[0] !== self.user.company_id[0]) {
+ throw new Error(_t("Error: The Point of Sale User must belong to the same company as the Point of Sale. You are probably trying to load the point of sale as an administrator in a multi-company setup, with the administrator account set to the wrong company."));
+ }
},
},{
model: 'stock.location',
instance.webclient.set_content_full_screen(true);
- if (!self.pos.session) {
- self.screen_selector.show_popup('error', 'Sorry, we could not create a user session');
- }else if(!self.pos.config){
- self.screen_selector.show_popup('error', 'Sorry, we could not find any PoS Configuration for this session');
- }
-
self.$('.loader').animate({opacity:0},1500,'swing',function(){self.$('.loader').addClass('oe_hidden');});
self.pos.push_order();
this.error_barcode_popup = new module.ErrorBarcodePopupWidget(this, {});
this.error_barcode_popup.appendTo(this.$el);
- this.choose_receipt_popup = new module.ChooseReceiptPopupWidget(this, {});
- this.choose_receipt_popup.appendTo(this.$el);
-
- this.error_invoice_transfer_popup = new module.ErrorInvoiceTransferPopupWidget(this, {});
- this.error_invoice_transfer_popup.appendTo(this.$el);
-
this.error_traceback_popup = new module.ErrorTracebackPopupWidget(this,{});
this.error_traceback_popup.appendTo(this.$el);