diff --git a/currency_iso_numeric/__init__.py b/currency_iso_numeric/__init__.py deleted file mode 100644 index a013db0b..00000000 --- a/currency_iso_numeric/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Currency ISO Numeric module for Odoo -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -from . import res_currency diff --git a/currency_iso_numeric/__openerp__.py b/currency_iso_numeric/__openerp__.py deleted file mode 100644 index 750df4c7..00000000 --- a/currency_iso_numeric/__openerp__.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Currency ISO Numeric module for Odoo -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Currency ISO Numeric', - 'version': '0.1', - 'category': 'Currency', - 'license': 'AGPL-3', - 'summary': 'Adds ISO 4217 numeric codes on currencies', - 'description': """ -Currency ISO Numeric -==================== - -This module adds a field *ISO Numeric Code* on currencies. This numeric ISO code is required by some applications ; for example, it is used in the Telium protocol for the communication between the Point of Sale and the credit card reader. - -This module has been developped during a POS code sprint at Akretion France from July 7th to July 10th 2014. - -Please contact Alexis de Lattre from Akretion for any help or question about this module. - """, - 'author': 'Akretion', - 'website': 'http://www.akretion.com', - 'depends': ['base'], - 'data': [ - 'res_currency_data.xml', - 'res_currency_view.xml', - ], - 'active': False, -} diff --git a/currency_iso_numeric/i18n/currency_iso_numeric.pot b/currency_iso_numeric/i18n/currency_iso_numeric.pot deleted file mode 100644 index 04133e60..00000000 --- a/currency_iso_numeric/i18n/currency_iso_numeric.pot +++ /dev/null @@ -1,27 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * currency_iso_numeric -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 8.0alpha1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-07-09 16:50+0000\n" -"PO-Revision-Date: 2014-07-09 16:50+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: currency_iso_numeric -#: model:ir.model,name:currency_iso_numeric.model_res_currency -msgid "Currency" -msgstr "" - -#. module: currency_iso_numeric -#: field:res.currency,iso_numeric:0 -msgid "ISO Numeric Code" -msgstr "" - diff --git a/currency_iso_numeric/i18n/fr.po b/currency_iso_numeric/i18n/fr.po deleted file mode 100644 index 9efba192..00000000 --- a/currency_iso_numeric/i18n/fr.po +++ /dev/null @@ -1,27 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * currency_iso_numeric -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 8.0alpha1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-07-09 16:51+0000\n" -"PO-Revision-Date: 2014-07-09 16:51+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: currency_iso_numeric -#: model:ir.model,name:currency_iso_numeric.model_res_currency -msgid "Currency" -msgstr "Devise" - -#. module: currency_iso_numeric -#: field:res.currency,iso_numeric:0 -msgid "ISO Numeric Code" -msgstr "Code ISO numérique" - diff --git a/currency_iso_numeric/res_currency.py b/currency_iso_numeric/res_currency.py deleted file mode 100644 index a52d119f..00000000 --- a/currency_iso_numeric/res_currency.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Currency ISO Numeric module for Odoo -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -from openerp import models, fields - - -class Currency(models.Model): - _inherit = 'res.currency' - - iso_numeric = fields.Char(string='ISO Numeric Code', size=4) diff --git a/currency_iso_numeric/res_currency_data.xml b/currency_iso_numeric/res_currency_data.xml deleted file mode 100644 index 6efa4a18..00000000 --- a/currency_iso_numeric/res_currency_data.xml +++ /dev/null @@ -1,615 +0,0 @@ - - - - - - - - - - 971 - - - - 978 - - - - 008 - - - - 012 - - - - 840 - - - - 973 - - - - 951 - - - - 032 - - - - 051 - - - - 533 - - - - 036 - - - - 944 - - - - 044 - - - - 048 - - - - 050 - - - - 052 - - - - 974 - - - - 084 - - - - 952 - - - - 060 - - - - 064 - - - - 356 - - - - 068 - - - - 977 - - - - 072 - - - - 578 - - - - 986 - - - - 096 - - - - 975 - - - - 108 - - - - 116 - - - - 950 - - - - 124 - - - - 132 - - - - 136 - - - - 152 - - - - 156 - - - - 170 - - - - 174 - - - - 976 - - - - 554 - - - - 188 - - - - 191 - - - - 192 - - - - 532 - - - - 203 - - - - 208 - - - - 262 - - - - 214 - - - - 818 - - - - 222 - - - - 232 - - - - 230 - - - - 238 - - - - 242 - - - - 953 - - - - 270 - - - - 981 - - - - 936 - - - - 292 - - - - 320 - - - - 826 - - - - 324 - - - - 328 - - - - 332 - - - - 340 - - - - 344 - - - - 348 - - - - 352 - - - - 360 - - - - 364 - - - - 368 - - - - 376 - - - - 388 - - - - 392 - - - - 400 - - - - 398 - - - - 404 - - - - 408 - - - - 410 - - - - 414 - - - - 417 - - - - 418 - - - - 422 - - - - 426 - - - - 710 - - - - 430 - - - - 434 - - - - 756 - - - - 440 - - - - 446 - - - - 807 - - - - 969 - - - - 454 - - - - 458 - - - - 462 - - - - 478 - - - - 480 - - - - 484 - - - - 498 - - - - 496 - - - - 504 - - - - 943 - - - - 104 - - - - 516 - - - - 524 - - - - 558 - - - - 566 - - - - 512 - - - - 586 - - - - 590 - - - - 598 - - - - 600 - - - - 604 - - - - 608 - - - - 985 - - - - 634 - - - - 946 - - - - 643 - - - - 646 - - - - 654 - - - - 882 - - - - 678 - - - - 682 - - - - 941 - - - - 690 - - - - 694 - - - - 702 - - - - 090 - - - - 728 - - - - 144 - - - - 748 - - - - 752 - - - - 760 - - - - 901 - - - - 834 - - - - 764 - - - - 776 - - - - 780 - - - - 788 - - - - 949 - - - - 800 - - - - 980 - - - - 784 - - - - 858 - - - - 860 - - - - 548 - - - - 937 - - - - 704 - - - - 886 - - - - - diff --git a/currency_iso_numeric/res_currency_view.xml b/currency_iso_numeric/res_currency_view.xml deleted file mode 100644 index cf0bbc9c..00000000 --- a/currency_iso_numeric/res_currency_view.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - add.iso.numeric.res.currency.form - res.currency - - - - - - - - - - add.iso.numeric.res.currency.tree - res.currency - - - - - - - - - - - diff --git a/hw_customer_display/__openerp__.py b/hw_customer_display/__openerp__.py index 920994d0..206decba 100644 --- a/hw_customer_display/__openerp__.py +++ b/hw_customer_display/__openerp__.py @@ -62,5 +62,4 @@ Please contact Alexis de Lattre from Akretion for 'python': ['serial', 'unidecode'], }, 'data': [], - 'active': False, } diff --git a/pos_payment_terminal/__openerp__.py b/pos_payment_terminal/__openerp__.py index 9241fd02..0595a779 100755 --- a/pos_payment_terminal/__openerp__.py +++ b/pos_payment_terminal/__openerp__.py @@ -36,7 +36,7 @@ This module support two payment methods : cards and checks. The payment method s 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 ! """, 'author': 'Aurélien DUMAINE', - 'depends': ['point_of_sale', 'currency_iso_numeric'], + 'depends': ['point_of_sale'], 'data': [ 'pos_payment_terminal.xml', 'pos_payment_terminal_view.xml', diff --git a/pos_payment_terminal/pos_payment_terminal.py b/pos_payment_terminal/pos_payment_terminal.py index e6dc9ff7..a54252ad 100644 --- a/pos_payment_terminal/pos_payment_terminal.py +++ b/pos_payment_terminal/pos_payment_terminal.py @@ -23,7 +23,6 @@ from openerp import models, fields class account_journal(models.Model): - _name = 'account.journal' _inherit = 'account.journal' payment_mode = fields.Selection( @@ -32,11 +31,8 @@ class account_journal(models.Model): class pos_config(models.Model): - _name = 'pos.config' _inherit = 'pos.config' iface_payment_terminal = fields.Boolean( 'Payment Terminal', help="A payment terminal is available on the Proxy") - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/pos_payment_terminal/static/src/js/pos_payment_terminal.js b/pos_payment_terminal/static/src/js/pos_payment_terminal.js index 9013da8d..419a0b20 100755 --- a/pos_payment_terminal/static/src/js/pos_payment_terminal.js +++ b/pos_payment_terminal/static/src/js/pos_payment_terminal.js @@ -2,84 +2,49 @@ openerp.pos_payment_terminal = function(instance){ module = instance.point_of_sale; module.ProxyDevice = module.ProxyDevice.extend({ - payment_terminal_transaction_start: function(line, currency_iso, currency_iso_numeric){ - var data = {'amount' : line.get_amount(), - 'currency_iso' : currency_iso, - 'currency_iso_numeric' : currency_iso_numeric, - 'payment_mode' : line.cashregister.journal.payment_mode}; -// alert(JSON.stringify(data)); - this.message('payment_terminal_transaction_start', {'payment_info' : JSON.stringify(data)}); + payment_terminal_transaction_start: function(line, currency_iso){ + var data = {'amount' : line.get_amount(), + 'currency_iso' : currency_iso, + 'payment_mode' : line.cashregister.journal.payment_mode}; +// alert(JSON.stringify(data)); + this.message('payment_terminal_transaction_start', {'payment_info' : JSON.stringify(data)}); }, - }); + }); - //TODO make the button bigger and with better name + //TODO make the button bigger and with better name var _super_PaymentScreenWidget_init_ = module.PaymentScreenWidget.prototype.init; module.PaymentScreenWidget.prototype.init = function(parent, options){ _super_PaymentScreenWidget_init_.call(this, parent, options); - self = this; - this.payment_terminal_transaction_start = function(event){ - var node = this; - while(node && !node.classList.contains('paymentline')){ - node = node.parentNode; - } - if(node){ - if (self.pos.config.iface_payment_terminal) - self.pos.proxy.payment_terminal_transaction_start(node.line, self.pos.currency.name, self.pos.currency.iso_numeric); - } - event.stopPropagation(); - }; - }; + self = this; + this.payment_terminal_transaction_start = function(event){ + var node = this; + while (node && !node.classList.contains('paymentline')){ + node = node.parentNode; + } + if (node && !_.isEmpty(node.line) && self.pos.config.iface_payment_terminal){ + self.pos.proxy.payment_terminal_transaction_start(node.line, self.pos.currency.name); + } + event.stopPropagation(); + }; + }; var _super_renderPaymentline_ = module.PaymentScreenWidget.prototype.render_paymentline; module.PaymentScreenWidget.prototype.render_paymentline = function(line){ var el_node = _super_renderPaymentline_.call(this, line); if (line.cashregister.journal.payment_mode && this.pos.config.iface_payment_terminal){ - if (!this.pos.currency.name){ - var self = this; - var currencies = new instance.web.Model('res.currency').query(['name', 'iso_numeric']) - .filter([['id','=',this.pos.currency.id]]) - .all().then(function (currency) { - self.pos.currency.name = currency[0].name; - self.pos.currency.iso_numeric = currency[0].iso_numeric; - }); - } + if (!this.pos.currency.name){ + var self = this; + var currencies = new instance.web.Model('res.currency').query(['name']) + .filter([['id','=',this.pos.currency.id]]) + .all().then(function (currency) { + self.pos.currency.name = currency[0].name; + }); + } el_node.querySelector('.payment-terminal-transaction-start') - .addEventListener('click', this.payment_terminal_transaction_start); - } - return el_node; - }; - -/* - var _super_load_server_data_ = module.PosModel.prototype.load_server_data; - module.PosModel.prototype.load_server_data = function(){ - var loaded = _super_load_server_data_.call(this); - //FIXME : this is asynchronous, I can't assume the pos.currency loaded when we enter is this - this.pos.currency.name = new instance.web.Model('res.currency').query('name').filter([['id','=',this.pos_currency.id]]).all()[0] - return loaded; - }; -*/ - -/* - var _super_setSmartStatus_ = module.ProxyStatusWidget.prototype.set_smart_status; - module.ProxyStatusWidget.prototype.set_smart_status = function(status){ - _super_setSmartStatus_.call(this, status); - if(status.status === 'connected'){ - var warning = false; - var msg = '' - if(this.pos.config.iface_customer_display){ - var customer_display = status.drivers.customer_display ? status.drivers.customer_display.status : false; - if( customer_display != 'connected' && customer_display != 'connecting'){ - warning = true; - msg = msg ? msg + ' & ' : msg; - msg += _t('Customer display'); - } - } - msg = msg ? msg + ' ' + _t('Offline') : msg; - this.set_status(warning ? 'warning' : 'connected', msg); - }else{ - this.set_status(status.status,''); + .addEventListener('click', this.payment_terminal_transaction_start); } + return el_node; }; -*/ + };