From 5cc93eef965363488fea6405bb47b82733af7f19 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 12 Jul 2014 00:29:04 +0200 Subject: [PATCH] Fix copyright headers PEP8 stuff --- hw_customer_display/__openerp__.py | 2 +- hw_telium_payment_terminal/__openerp__.py | 2 +- pos_customer_display/__init__.py | 2 +- pos_customer_display/__openerp__.py | 14 +++++----- pos_customer_display/pos_customer_display.py | 28 +++++++++---------- pos_customer_display/pos_customer_display.xml | 0 pos_payment_terminal/__init__.py | 2 +- pos_payment_terminal/__openerp__.py | 16 +++++------ pos_payment_terminal/pos_payment_terminal.py | 18 ++++++++---- 9 files changed, 44 insertions(+), 40 deletions(-) mode change 100755 => 100644 pos_customer_display/__init__.py mode change 100755 => 100644 pos_customer_display/__openerp__.py mode change 100755 => 100644 pos_customer_display/pos_customer_display.xml diff --git a/hw_customer_display/__openerp__.py b/hw_customer_display/__openerp__.py index ef05e105..b1f5e96e 100644 --- a/hw_customer_display/__openerp__.py +++ b/hw_customer_display/__openerp__.py @@ -51,7 +51,7 @@ Please contact Alexis de Lattre from Akretion for 'website': 'http://www.akretion.com', 'depends': ['hw_proxy'], 'external_dependencies': { - 'python' : ['serial', 'unidecode'], + 'python': ['serial', 'unidecode'], }, 'data': [], 'active': False, diff --git a/hw_telium_payment_terminal/__openerp__.py b/hw_telium_payment_terminal/__openerp__.py index 504f053c..21035e94 100644 --- a/hw_telium_payment_terminal/__openerp__.py +++ b/hw_telium_payment_terminal/__openerp__.py @@ -52,7 +52,7 @@ Please contact Alexis de Lattre from Akretion for 'website': 'http://www.akretion.com', 'depends': ['hw_proxy'], 'external_dependencies': { - 'python' : ['serial'], + 'python': ['serial'], }, 'data': [], 'active': False, diff --git a/pos_customer_display/__init__.py b/pos_customer_display/__init__.py old mode 100755 new mode 100644 index 7dff50a7..bb27ef75 --- a/pos_customer_display/__init__.py +++ b/pos_customer_display/__init__.py @@ -1 +1 @@ -import pos_customer_display +from . import pos_customer_display diff --git a/pos_customer_display/__openerp__.py b/pos_customer_display/__openerp__.py old mode 100755 new mode 100644 index 3fb094b6..3f0a7c1e --- a/pos_customer_display/__openerp__.py +++ b/pos_customer_display/__openerp__.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). +# POS Customer Display module for Odoo +# Copyright (C) 2014 Aurélien DUMAINE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -33,14 +33,14 @@ This module adds support for Customer Display in the Point of Sale. This module 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. -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 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, cf the module *hw_customer_display* for more info. 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 ! - -Please contact Alexis de Lattre from Akretion for any help or question about this module. """, 'author': 'Aurélien DUMAINE', 'depends': ['point_of_sale'], - 'data' : ['pos_customer_display.xml', - 'customer_display_view.xml'], + 'data' : [ + 'pos_customer_display.xml', + 'customer_display_view.xml', + ], } diff --git a/pos_customer_display/pos_customer_display.py b/pos_customer_display/pos_customer_display.py index 20eda083..d2bcb43e 100644 --- a/pos_customer_display/pos_customer_display.py +++ b/pos_customer_display/pos_customer_display.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SP (). +# POS Customer Display module for Odoo +# Copyright (C) 2014 Aurélien DUMAINE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,27 +20,25 @@ ############################################################################## import logging -import time - -from openerp import tools -from openerp.osv import fields, osv -from openerp.tools.translate import _ - -import openerp.addons.decimal_precision as dp -import openerp.addons.product.product +from openerp.osv import fields, orm _logger = logging.getLogger(__name__) -class pos_config(osv.osv): + +class pos_config(orm.Model): _name = 'pos.config' _inherit = 'pos.config' - + _columns = { - 'iface_customer_display' : fields.boolean('Customer display', help="Display data on the customer display"), - 'customer_display_line_length' : fields.integer('Line length', help="Length of the LEDs lines of the customer display"), + 'iface_customer_display': fields.boolean( + 'Customer display', help="Display data on the customer display"), + 'customer_display_line_length': fields.integer( + 'Line length', + help="Length of the LEDs lines of the customer display"), } + _defaults = { - 'customer_display_line_length' : 20, + 'customer_display_line_length': 20, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/pos_customer_display/pos_customer_display.xml b/pos_customer_display/pos_customer_display.xml old mode 100755 new mode 100644 diff --git a/pos_payment_terminal/__init__.py b/pos_payment_terminal/__init__.py index 45b85bcf..9e67b3d9 100755 --- a/pos_payment_terminal/__init__.py +++ b/pos_payment_terminal/__init__.py @@ -1 +1 @@ -import pos_payment_terminal +from . import pos_payment_terminal diff --git a/pos_payment_terminal/__openerp__.py b/pos_payment_terminal/__openerp__.py index a6d5c5de..9241fd02 100755 --- a/pos_payment_terminal/__openerp__.py +++ b/pos_payment_terminal/__openerp__.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). +# POS Payment Terminal module for Odoo +# Copyright (C) 2014 Aurélien DUMAINE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -29,17 +29,17 @@ POS Payment Terminal ==================== -This module adds support for Payment Terminal in the Point of Sale. This module is designed to be installed on the *main Odoo server*. On the *POSbox*, you should install the module *hw_x* depending on the protocol implemented in your device. Ingenico devices support the Telium protocol implemented in the *hw_telium_payment_terminal* module. +This module adds support for Payment Terminal in the Point of Sale. This module is designed to be installed on the *main Odoo server*. On the *POSbox*, you should install the module *hw_x* depending on the protocol implemented in your device. Ingenico and Sagem devices support the Telium protocol implemented in the *hw_telium_payment_terminal* module. This module support two payment methods : cards and checks. The payment method should be configured on the main Odoo server, in the menu Point of Sale > Configuration > Payment Methods. 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 ! - -Please contact Alexis de Lattre from Akretion for any help or question about this module. """, 'author': 'Aurélien DUMAINE', 'depends': ['point_of_sale', 'currency_iso_numeric'], - 'data' : ['pos_payment_terminal.xml', - 'pos_payment_terminal_view.xml'], - 'qweb': ['static/src/xml/pos_payment_terminal.xml'], + 'data': [ + 'pos_payment_terminal.xml', + 'pos_payment_terminal_view.xml', + ], + 'qweb': ['static/src/xml/pos_payment_terminal.xml'], } diff --git a/pos_payment_terminal/pos_payment_terminal.py b/pos_payment_terminal/pos_payment_terminal.py index 3b4853ad..e6dc9ff7 100644 --- a/pos_payment_terminal/pos_payment_terminal.py +++ b/pos_payment_terminal/pos_payment_terminal.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SP (). +# POS Payment Terminal module for Odoo +# Copyright (C) 2014 Aurélien DUMAINE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -21,16 +21,22 @@ from openerp import models, fields + class account_journal(models.Model): _name = 'account.journal' _inherit = 'account.journal' - - payment_mode = fields.Selection((('card', 'Card'), ('check', 'Check')), 'Payment mode', help="Select the payment mode sent to the payment terminal") + + payment_mode = fields.Selection( + (('card', 'Card'), ('check', 'Check')), 'Payment mode', + help="Select the payment mode sent to the payment terminal") + 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") + + 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: