Browse Source

FIX Adapt JS code to recent changes in the code of POS v8

Update module description with my recent tests with new hardware
pull/10/head
Alexis de Lattre 10 years ago
parent
commit
41e2497035
  1. 11
      hw_customer_display/__openerp__.py
  2. 6
      hw_telium_payment_terminal/__openerp__.py
  3. 8
      pos_customer_display/static/src/js/customer_display.js

11
hw_customer_display/__openerp__.py

@ -39,9 +39,16 @@ The configuration of the hardware is done in the configuration file of the Odoo
* customer_display_device_rate (default = 9600) * customer_display_device_rate (default = 9600)
* customer_display_device_timeout (default = 2 seconds) * customer_display_device_timeout (default = 2 seconds)
The number of rows and cols of the Customer Display (usually 2 x 20) should be configured on the main Odoo server, in the menu Point of Sale > Configuration > Point of Sales.
The number of cols of the Customer Display (usually 20) should be configured on the main Odoo server, in the menu Point of Sale > Configuration > Point of Sales. The number of rows is supposed to be 2.
It has been tested with a Bixolon BCD-1100 (http://www.bixolon.com/html/en/product/product_detail.xhtml?prod_id=61), but should support most serial and USB-serial LCD displays out-of-the-box or with inheritance of a few functions. To setup the BCD-1100 on Linux, you will find some technical instructions on this page : http://techtuxwords.blogspot.fr/2012/12/linux-and-bixolon-bcd-1100.html
It should support most serial and USB-serial LCD displays out-of-the-box or with inheritance of a few functions.
It has been tested with:
* Bixolon BCD-1100 (Datasheet : http://www.bixolon.com/html/en/product/product_detail.xhtml?prod_id=61)
* Bixolon BCD-1000
To setup the BCD-1100 on Linux, you will find some technical instructions on this page : http://techtuxwords.blogspot.fr/2012/12/linux-and-bixolon-bcd-1100.html
This module has been developped during a POS code sprint at Akretion France from July 7th to July 10th 2014. This module is part of the POS project of the Odoo Community Association http://odoo-community.org/. You are invited to become a member and/or get involved in the Association ! This module has been developped during a POS code sprint at Akretion France from July 7th to July 10th 2014. This module is part of the POS project of the Odoo Community Association http://odoo-community.org/. You are invited to become a member and/or get involved in the Association !

6
hw_telium_payment_terminal/__openerp__.py

@ -42,7 +42,11 @@ The Telium protocol is used by Ingenico and Sagem payment terminals. It is based
You will need to configure your payment terminal to accept commands from the POS. On an Ingenico reader, press F > 0-TELIUM MANAGER > 5-Initialization > 1-Parameters > Cash Connection and then select *On* and then *USB*. After that, you should reboot the terminal. You will need to configure your payment terminal to accept commands from the POS. On an Ingenico reader, press F > 0-TELIUM MANAGER > 5-Initialization > 1-Parameters > Cash Connection and then select *On* and then *USB*. After that, you should reboot the terminal.
This module has been successfully tested with an Ingenico EFTSmart4S and an Ingenico EFTSmart2 2640 with Telim Manager version 37784503.
This module has been successfully tested with:
* Ingenico EFTSmart4S
* Ingenico EFTSmart2 2640 with Telim Manager version 37784503
* Ingenico i2200 cheque reader and writer
This module has been developped during a POS code sprint at Akretion France from July 7th to July 10th 2014. This module is part of the POS project of the Odoo Community Association http://odoo-community.org/. You are invited to become a member and/or get involved in the Association ! This module has been developped during a POS code sprint at Akretion France from July 7th to July 10th 2014. This module is part of the POS project of the Odoo Community Association http://odoo-community.org/. You are invited to become a member and/or get involved in the Association !

8
pos_customer_display/static/src/js/customer_display.js

@ -22,7 +22,7 @@ openerp.pos_customer_display = function(instance){
var l21 = line.get_quantity_str_with_unit() + ' x ' + price_unit; var l21 = line.get_quantity_str_with_unit() + ' x ' + price_unit;
var l22 = ' ' + line.get_display_price().toFixed(currency_rounding); var l22 = ' ' + line.get_display_price().toFixed(currency_rounding);
var lines_to_send = new Array( var lines_to_send = new Array(
this.proxy.complete_string_right(line.get_product().name, line_length),
this.proxy.complete_string_right(line.get_product().display_name, line_length),
this.proxy.complete_string_right(l21, line_length - l22.length) + l22 this.proxy.complete_string_right(l21, line_length - l22.length) + l22
); );
} else if (type == 'removeOrderline') { } else if (type == 'removeOrderline') {
@ -36,8 +36,8 @@ openerp.pos_customer_display = function(instance){
var cashregister = data['cashregister']; var cashregister = data['cashregister'];
var total = this.get('selectedOrder').getTotalTaxIncluded().toFixed(currency_rounding); var total = this.get('selectedOrder').getTotalTaxIncluded().toFixed(currency_rounding);
var lines_to_send = new Array( var lines_to_send = new Array(
this.proxy.complete_string_right(_t("TOTAL : "), line_length - 1 - total.length) + ' ' + total,
this.proxy.complete_string_right(_t("Payment :"), line_length - 1 - cashregister.journal_id[1].length) + ' ' + cashregister.journal_id[1]
this.proxy.complete_string_right(_t("TOTAL: "), line_length - 1 - total.length) + ' ' + total,
this.proxy.complete_string_right(_t("Payment:"), line_length - 1 - cashregister.journal_id[1].length) + ' ' + cashregister.journal_id[1]
); );
} else if (type == 'removePaymentline') { } else if (type == 'removePaymentline') {
@ -172,7 +172,7 @@ openerp.pos_customer_display = function(instance){
var _super_addProduct_ = module.Order.prototype.addProduct; var _super_addProduct_ = module.Order.prototype.addProduct;
module.Order.prototype.addProduct = function(product, options){ module.Order.prototype.addProduct = function(product, options){
_super_addProduct_.call(this, product, options); _super_addProduct_.call(this, product, options);
this.pos.prepare_text_customer_display('addProduct', {'product' : product, 'options' : options});
this.pos.prepare_text_customer_display('addProduct', {'product' : product, 'options' : options});
}; };

Loading…
Cancel
Save