From 75f2778a3f7aa06d422a2a28838507ca95979b84 Mon Sep 17 00:00:00 2001 From: Endika Iglesias Date: Wed, 6 May 2015 17:15:04 +0200 Subject: [PATCH 01/54] [ADD] Add l10n_es_pos --- l10n_es_pos/README.rst | 107 +++++++++++++++++++ l10n_es_pos/__init__.py | 4 + l10n_es_pos/__openerp__.py | 30 ++++++ l10n_es_pos/i18n/bg.po | 117 ++++++++++++++++++++ l10n_es_pos/i18n/ca.po | 117 ++++++++++++++++++++ l10n_es_pos/i18n/en.po | 117 ++++++++++++++++++++ l10n_es_pos/i18n/es.po | 115 ++++++++++++++++++++ l10n_es_pos/i18n/gl.po | 117 ++++++++++++++++++++ l10n_es_pos/i18n/l10n_es_pos.pot | 115 ++++++++++++++++++++ l10n_es_pos/models/__init__.py | 5 + l10n_es_pos/models/pos_config.py | 15 +++ l10n_es_pos/models/pos_order.py | 45 ++++++++ l10n_es_pos/reports/common.xml | 16 +++ l10n_es_pos/reports/receipt_report.xml | 63 +++++++++++ l10n_es_pos/static/description/icon.png | Bin 0 -> 11484 bytes l10n_es_pos/static/src/css/pos.css | 3 + l10n_es_pos/static/src/css/report.css | 7 ++ l10n_es_pos/static/src/js/main.js | 118 +++++++++++++++++++++ l10n_es_pos/static/src/xml/pos.xml | 23 ++++ l10n_es_pos/views/point_of_sale_report.xml | 12 +++ l10n_es_pos/views/point_of_sale_view.xml | 62 +++++++++++ l10n_es_pos/views/pos_template.xml | 22 ++++ 22 files changed, 1230 insertions(+) create mode 100644 l10n_es_pos/README.rst create mode 100644 l10n_es_pos/__init__.py create mode 100644 l10n_es_pos/__openerp__.py create mode 100644 l10n_es_pos/i18n/bg.po create mode 100644 l10n_es_pos/i18n/ca.po create mode 100644 l10n_es_pos/i18n/en.po create mode 100644 l10n_es_pos/i18n/es.po create mode 100644 l10n_es_pos/i18n/gl.po create mode 100644 l10n_es_pos/i18n/l10n_es_pos.pot create mode 100644 l10n_es_pos/models/__init__.py create mode 100644 l10n_es_pos/models/pos_config.py create mode 100644 l10n_es_pos/models/pos_order.py create mode 100644 l10n_es_pos/reports/common.xml create mode 100644 l10n_es_pos/reports/receipt_report.xml create mode 100644 l10n_es_pos/static/description/icon.png create mode 100644 l10n_es_pos/static/src/css/pos.css create mode 100644 l10n_es_pos/static/src/css/report.css create mode 100644 l10n_es_pos/static/src/js/main.js create mode 100644 l10n_es_pos/static/src/xml/pos.xml create mode 100644 l10n_es_pos/views/point_of_sale_report.xml create mode 100644 l10n_es_pos/views/point_of_sale_view.xml create mode 100644 l10n_es_pos/views/pos_template.xml diff --git a/l10n_es_pos/README.rst b/l10n_es_pos/README.rst new file mode 100644 index 00000000000..4fc141d5fc3 --- /dev/null +++ b/l10n_es_pos/README.rst @@ -0,0 +1,107 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +================================================================ +Punto de venta Punto de venta adaptado a la legislación española +================================================================ + +* Adapta el terminal punto de venta a la legislación Española (no se permite la + emisión de tiquets, todo deben ser facturas o facturas simplificadas con + numeración) +* Adapta el ticket de venta a factura simplificada, añadiendo el NIF del emisor. +* Incluye los datos del cliente (nombre, NIF y dirección) si hay uno asignado. +* Chequea que no se realice una factura simplificada con valor + superior a 3.000 euros (la cantidad es configurable por TPV). + + +Instalación +=========== + +Para instalar este modulo necesitas: + +* point_of_sale (Odoo addon) +* pos_pricelist (OCA addon, repositorio pos) + +Ambos se instalan automáticamente si están disponibles en la lista de addons. + + +Configuración +============= + +Se puede configurar el límite a partir del cual no se considera factura +simplificada. Por defecto es 3.000,00 €. Para modificarlo ir a: +Configuracion > Terminal punto de venta (TPV) + +`Ver enlace de la AEAT `_ + +Se aconseja disponer de una secuencia sin hueco ``Ref. Venta`` para cada TPV, +porque es el número que aparece como Factura o Factura simplificada. + + +Problemas conocidos / Hoja de ruta +================================== + +No permite realizar facturas contables convencionales a partir de un pedido del +TPV porque el pedido ya incluye toda la información contable y de impuestos +necesaria (hereda esta funcionalidad del addon pos_pricelist) y esto provoca que +haya huecos en la numeración de las facturas simplificadas (esto no lo permite +la legislación española) + +Desde el TPV se imprime un tiquet sólo con la referencia del pedido. En este momento +no se puede mostrar el número de factura (simplificada o no) porque el TPV puede +estar offline. Si el cliente solicita una factura deducible es necesario imprimir +el tiquet desde el backend. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. + + +Licencia +======== + +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 . + + +Créditos +======== + +Contribuidores +-------------- + +* Endika Iglesias +* Pedro M. Baeza [Serv. Tecnológicos Avanzados] +* Antonio Espinosa +* Rafael Blasco + + +Mantenedor +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/l10n_es_pos/__init__.py b/l10n_es_pos/__init__.py new file mode 100644 index 00000000000..30772dc1e84 --- /dev/null +++ b/l10n_es_pos/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# See README.rst file on addon root folder for license details + +from . import models diff --git a/l10n_es_pos/__openerp__.py b/l10n_es_pos/__openerp__.py new file mode 100644 index 00000000000..18be912ea52 --- /dev/null +++ b/l10n_es_pos/__openerp__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# See README.rst file on addon root folder for license details + +{ + "name": "Punto de venta adaptado a la legislación española", + "version": "1.0", + "author": "Antiun Ingeniería S.L., " + "Serv. Tecnol. Avanzados - Pedro M. Baeza, " + "Spanish Localization Team, " + "Odoo Community Association (OCA)", + "website": "http://www.antiun.com", + "license": "AGPL-3", + "category": "Point Of Sale", + "depends": [ + 'base', + 'point_of_sale', + 'pos_pricelist' + ], + 'data': [ + "views/pos_template.xml", + "views/point_of_sale_view.xml", + "views/point_of_sale_report.xml", + "reports/common.xml", + "reports/receipt_report.xml", + ], + "qweb": [ + 'static/src/xml/pos.xml', + ], + "installable": True, +} diff --git a/l10n_es_pos/i18n/bg.po b/l10n_es_pos/i18n/bg.po new file mode 100644 index 00000000000..2d1b19aff82 --- /dev/null +++ b/l10n_es_pos/i18n/bg.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-25 13:20+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Bulgarian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Фактура" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/ca.po b/l10n_es_pos/i18n/ca.po new file mode 100644 index 00000000000..8c045f47b7b --- /dev/null +++ b/l10n_es_pos/i18n/ca.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-25 13:20+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Catalan (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Factura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/en.po b/l10n_es_pos/i18n/en.po new file mode 100644 index 00000000000..edc21b2bafe --- /dev/null +++ b/l10n_es_pos/i18n/en.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-25 13:20+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: English (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/en/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "Address:" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "An anonymous order cannot be invoiced" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "Customer data" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Invoice" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "Invoices" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "Name:" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "Over this amount is not legally posible to create a simplified invoice" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "Please select a client for this order. This can be done by clicking the order tab" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "Point of Sale" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Posted" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "Simplified" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "Simplified invoice" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "Simplified invoice limit" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "Simplified invoices" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "VAT:" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "display:none;" diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po new file mode 100644 index 00000000000..a8918fe04fb --- /dev/null +++ b/l10n_es_pos/i18n/es.po @@ -0,0 +1,115 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-25 11:28+0000\n" +"PO-Revision-Date: 2015-09-25 11:28+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: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "Dirección:" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "Un pedido anónimo no puede facturarse" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "Datos del cliente" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Factura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "Facturas" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "Nombre:" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "Por encima de esta cantidad no es posible legalmente crear una factura simplificada" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "Please select a client for this order. This can be done by clicking the order tab" +msgstr "Seleccione un cliente para este pedido. Esto se puede hacer pulsando en la pestaña." + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "Terminal punto de venta" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Contabilizado" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "Simplificada" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 +#: view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "Factura simplificada" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "Límite de factura simplificada" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "Facturas simplificadas" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "NIF:" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "display:none;" + diff --git a/l10n_es_pos/i18n/gl.po b/l10n_es_pos/i18n/gl.po new file mode 100644 index 00000000000..a06bba7e114 --- /dev/null +++ b/l10n_es_pos/i18n/gl.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-25 13:20+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Galician (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/gl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: gl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Factura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/l10n_es_pos.pot b/l10n_es_pos/i18n/l10n_es_pos.pot new file mode 100644 index 00000000000..49bb2f7cbfc --- /dev/null +++ b/l10n_es_pos/i18n/l10n_es_pos.pot @@ -0,0 +1,115 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-25 11:28+0000\n" +"PO-Revision-Date: 2015-09-25 11:28+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: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "Please select a client for this order. This can be done by clicking the order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 +#: view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" + diff --git a/l10n_es_pos/models/__init__.py b/l10n_es_pos/models/__init__.py new file mode 100644 index 00000000000..aeb485c355b --- /dev/null +++ b/l10n_es_pos/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# See README.rst file on addon root folder for license details + +from . import pos_config +from . import pos_order diff --git a/l10n_es_pos/models/pos_config.py b/l10n_es_pos/models/pos_config.py new file mode 100644 index 00000000000..c068ae654a6 --- /dev/null +++ b/l10n_es_pos/models/pos_config.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# See README.rst file on addon root folder for license details + +from openerp import models, fields +from openerp.addons import decimal_precision as dp + + +class PosConfig(models.Model): + _inherit = 'pos.config' + + simplified_invoice_limit = fields.Float( + string='Simplified invoice limit', digits=dp.get_precision('Account'), + help='Over this amount is not legally posible to create a ' + 'simplified invoice', + default=3000) diff --git a/l10n_es_pos/models/pos_order.py b/l10n_es_pos/models/pos_order.py new file mode 100644 index 00000000000..a0a18b7968e --- /dev/null +++ b/l10n_es_pos/models/pos_order.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# See README.rst file on addon root folder for license details + +from openerp import models, fields, api +from openerp.addons import decimal_precision as dp +from openerp.tools.float_utils import float_compare + + +class PosOrder(models.Model): + _inherit = 'pos.order' + + simplified = fields.Boolean(string='Simplified invoice', default=True) + + @api.one + def action_invoice(self): + self.simplified = False + + @api.multi + def simplified_limit_check(self): + for order in self: + if not order.simplified: + continue + limit = order.session_id.config_id.simplified_invoice_limit + amount_total = order.amount_total + precision_digits = dp.get_precision('Account')(self.env.cr)[1] + # -1 or 0: amount_total <= limit, simplified + # 1: amount_total > limit, can not be simplified + simplified = ( + float_compare(amount_total, limit, + precision_digits=precision_digits) <= 0) + # Change simplified flag if incompatible + if not simplified: + order.write({'simplified': simplified}) + + @api.multi + def write(self, vals): + result = super(PosOrder, self).write(vals) + self.simplified_limit_check() + return result + + @api.model + def create(self, vals): + order = super(PosOrder, self).create(vals) + order.simplified_limit_check() + return order diff --git a/l10n_es_pos/reports/common.xml b/l10n_es_pos/reports/common.xml new file mode 100644 index 00000000000..39725caf19b --- /dev/null +++ b/l10n_es_pos/reports/common.xml @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/l10n_es_pos/reports/receipt_report.xml b/l10n_es_pos/reports/receipt_report.xml new file mode 100644 index 00000000000..71d6825e5cb --- /dev/null +++ b/l10n_es_pos/reports/receipt_report.xml @@ -0,0 +1,63 @@ + + + + + + diff --git a/l10n_es_pos/static/description/icon.png b/l10n_es_pos/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cae1c525c468f4f7bac64d336ef26af58c66e2d7 GIT binary patch literal 11484 zcmaKSWmHt(8!jN-G0Ff#=SU493=JclG9XgYDP1BB(%mf}!hrm6knWBdBn6c26zP_} z^Z$51+`G;?d#|-WoU`Bk*7H8^j(w%ALPktajD>|orlzV0$IPMsdkOI|W1p<$FlNHH z(oj*vdi>w>xuZNCvqI#qYUG85MMCqx7aJ?@6A-gV;H{>mM6iO(NJc{uhF*`sEYW!@ z8G65Tb8)eC^~QSXX=~|iYs2E}=X78VPZnxcaKhxvmJN9R%#|CKAL zouzl?hDx<@CgK6+hr+(OTGpe3?`;N7ZT1yYm6J&A*;ve2x`pl(JZzq*bH%Z6D_9T^ zrcnq-kaEmE<6Ed@$F33063xq%@@i^va$EF$R%vK+aP)rcM|9KRA+H9^X2i3t?E!0! zg$U>V^t#CYT5jCWEXU#_5!e5FSdESRK+kk)t~V}y5cL2e=#$&Oy_`Be&P=$_U=fh* z*cQ(xy}r}az@lWPS>NRh6&ktIl}k_O`R8p73njwl%Av%3|NolGiFG0=Gt83YW6NiT zvcj&4tZ+;p=eSP6mp;Z%N_MQV21HYTc|S7+?G;eP$Iy9kjfh z6*0v26pd>eUPC5=h*@AJ;@KkGTfkX~9;PJ&yTL-yd04zE)pMbdoP=VGi!Vvau}jEe zhXh{vUmJZg((>q}c-jZ?Pi$*@InS7rn@hP`6O{sKcvVuA50mtrd*~2#I+8dq#~EUb zh8;*EvO_?UPm~X2P5iR=TKI=ZsLDPKoEU^sgutK^*biUj5-2mu<+KnFG=^Nsakw27 zIb(I$;dwA)>Zy2-_iVz!M2# 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0p~YC z{vAwx6O;%mc|}-E8Rfc6#J{L8H$w1HbMCqB<0f>!Nry||p$~|I6};*8*df|@&)&U~ zl69wFVfe+k;uRlY-29OmS3wy5`$*(eWyi@baYBpI7XffH%DU$V4+Mdc9S~qcyto_b z!^FCW= zGMutFj|jmlR51ar&pS@yAD34CYL8q2sj*hiLauhoHlTNwE+ffU<3v0pV1y9YoB(IP zJh2B0|DFtZs}jeo33R(G_(&0Qx3^U|#=3j?cJJ54RQtj1}wDZRM6Z+AMnP rU18SJ6z##K(S-behhyfCj}+}TyBmp;S~-|Y$5?7g+KN>$i;w>Ym69PN literal 0 HcmV?d00001 diff --git a/l10n_es_pos/static/src/css/pos.css b/l10n_es_pos/static/src/css/pos.css new file mode 100644 index 00000000000..4de742d5983 --- /dev/null +++ b/l10n_es_pos/static/src/css/pos.css @@ -0,0 +1,3 @@ +img.desaturate {width:50%;height: 100%;margin: 0 25%;} +.pos-sale-ticket_extra {width:280px;} +.customer_title {text-decoration: underline;} diff --git a/l10n_es_pos/static/src/css/report.css b/l10n_es_pos/static/src/css/report.css new file mode 100644 index 00000000000..4ef9086a6c1 --- /dev/null +++ b/l10n_es_pos/static/src/css/report.css @@ -0,0 +1,7 @@ +.customer { + text-align: left; + border-top: solid 1px grey; + margin-bottom: 15px; + margin-top: 10px; +} +.customer_title {text-decoration: underline;} \ No newline at end of file diff --git a/l10n_es_pos/static/src/js/main.js b/l10n_es_pos/static/src/js/main.js new file mode 100644 index 00000000000..6433bbbdc1b --- /dev/null +++ b/l10n_es_pos/static/src/js/main.js @@ -0,0 +1,118 @@ +/** + * # -*- coding: utf-8 -*- + * # See README.rst file on addon root folder for license details + */ + +// Check jQuery available +if (typeof jQuery === 'undefined') { throw new Error('l10n_es POS Simplified invoice Addon requires jQuery') } + ++function ($) { + 'use strict'; + + openerp.l10n_es_pos = function (instance) { + var _t = instance.web._t, + _lt = instance.web._lt; + var QWeb = instance.web.qweb; + var module = instance.point_of_sale; + var _simplified_limit_get = function() { + var limit = 3000 + // Get simplified limit from POS config + if ( + posmodel + && posmodel.config + && posmodel.config.simplified_invoice_limit + ) { + limit = posmodel.config.simplified_invoice_limit; + } + return limit; + }; + + var OrderParent = module.Order; + module.Order = module.Order.extend({ + initialize: function(attributes){ + OrderParent.prototype.initialize.apply(this, arguments); + // By default, simplified + this.simplified = true; + }, + export_for_printing: function(attributes){ + var order = OrderParent.prototype.export_for_printing.apply(this, arguments); + order['simplified'] = this.is_simplified(); + return order; + }, + export_as_JSON: function() { + var order = OrderParent.prototype.export_as_JSON.apply(this, arguments); + order['simplified'] = this.is_simplified(); + return order; + }, + set_simplified: function(simplified) { + this.simplified = !!simplified; + }, + is_simplified: function() { + var limit = _simplified_limit_get(); + var amount_total = this.getTotalTaxIncluded(); + var simplified = this.simplified; + // If simplified limit raised, + // then this order can not be simplified + if (amount_total > limit) { + simplified = false + } + return simplified; + }, + }); + + instance.web.Widget.include({ + is_button_disabled: function(name){ + var b = this.buttons[name]; + if (b != undefined) { + return b.disabled; + } + return true; + }, + }); + + // Widget: ScreenWidget + instance.point_of_sale.PaymentScreenWidget.include({ + invoice_button_check: function() { + var currentOrder = this.pos.get('selectedOrder'); + var dueTotal = currentOrder.getTotalTaxIncluded(); + var limit = _simplified_limit_get() + if (this.pos_widget.action_bar ) { + if (dueTotal > limit) { + this.pos_widget.action_bar.set_button_disabled('validation', true); + this.pos_widget.action_bar.set_button_disabled('invoice', !this.is_paid()); + } + } + }, + update_payment_summary: function() { + var result = this._super.apply(this, arguments); + this.invoice_button_check() + return result + }, + validate_order: function(options) { + var currentOrder = this.pos.get('selectedOrder'); + var result; + options = options || {}; + if (options.invoice) { + // Check for client + if (!currentOrder.get_client()) { + this.pos_widget.screen_selector.show_popup('error',{ + message: _t('An anonymous order cannot be invoiced'), + comment: _t('Please select a client for this order. This can be done by clicking the order tab'), + }); + return; + } + // Set this order as not simplified even if no limit raised + currentOrder.set_simplified(false) + // Disable standard invoice flow + options.invoice = false + } + result = this._super.apply(this, arguments); + this.invoice_button_check() + return result + }, + }); + + }; + + +}(jQuery); diff --git a/l10n_es_pos/static/src/xml/pos.xml b/l10n_es_pos/static/src/xml/pos.xml new file mode 100644 index 00000000000..efb531cc6e3 --- /dev/null +++ b/l10n_es_pos/static/src/xml/pos.xml @@ -0,0 +1,23 @@ + + + + +
+ + +
VAT: + + + +

+ Customer data
+ Name:
+ VAT:
+ Address: + +
+ + + + +
diff --git a/l10n_es_pos/views/point_of_sale_report.xml b/l10n_es_pos/views/point_of_sale_report.xml new file mode 100644 index 00000000000..5d72617d0a9 --- /dev/null +++ b/l10n_es_pos/views/point_of_sale_report.xml @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/l10n_es_pos/views/point_of_sale_view.xml b/l10n_es_pos/views/point_of_sale_view.xml new file mode 100644 index 00000000000..8309d43c373 --- /dev/null +++ b/l10n_es_pos/views/point_of_sale_view.xml @@ -0,0 +1,62 @@ + + + + + + + POS Order (remove invoice button) + pos.order + + + + + + + + + POS Order (hide invoice ID and show simplified fields) + pos.order + + + + 1 + + + + + + + + + + POS Order (add filters for simplified field) + pos.order + + 20 + + + + + + + + + + + + POS Order (add simplified invoice limit option) + pos.config + + + + + + + + + + + diff --git a/l10n_es_pos/views/pos_template.xml b/l10n_es_pos/views/pos_template.xml new file mode 100644 index 00000000000..ea77256e361 --- /dev/null +++ b/l10n_es_pos/views/pos_template.xml @@ -0,0 +1,22 @@ + + + + + + + + + \ No newline at end of file From 5f38135a6cc75fd64f4e5641d5e380e8dd435e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 9 Oct 2015 10:01:41 +0200 Subject: [PATCH 02/54] [UPD] prefix versions with 8.0 --- l10n_es_pos/__openerp__.py | 2 +- l10n_es_pos/i18n/ca.po | 19 +++--- l10n_es_pos/i18n/sl.po | 117 +++++++++++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+), 10 deletions(-) create mode 100644 l10n_es_pos/i18n/sl.po diff --git a/l10n_es_pos/__openerp__.py b/l10n_es_pos/__openerp__.py index 18be912ea52..80bc1650bab 100644 --- a/l10n_es_pos/__openerp__.py +++ b/l10n_es_pos/__openerp__.py @@ -3,7 +3,7 @@ { "name": "Punto de venta adaptado a la legislación española", - "version": "1.0", + "version": "8.0.1.0.0", "author": "Antiun Ingeniería S.L., " "Serv. Tecnol. Avanzados - Pedro M. Baeza, " "Spanish Localization Team, " diff --git a/l10n_es_pos/i18n/ca.po b/l10n_es_pos/i18n/ca.po index 8c045f47b7b..5b8c67d8b29 100644 --- a/l10n_es_pos/i18n/ca.po +++ b/l10n_es_pos/i18n/ca.po @@ -3,13 +3,14 @@ # * l10n_es_pos # # Translators: +# Eric Antones , 2016 msgid "" msgstr "" "Project-Id-Version: l10n-spain (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-25 13:20+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" +"POT-Creation-Date: 2016-03-05 10:32+0000\n" +"PO-Revision-Date: 2016-02-29 13:42+0000\n" +"Last-Translator: Eric Antones \n" "Language-Team: Catalan (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,7 +24,7 @@ msgstr "" #: view:website:point_of_sale.report_receipt #, python-format msgid "Address:" -msgstr "" +msgstr "Adreça:" #. module: l10n_es_pos #. openerp-web @@ -38,7 +39,7 @@ msgstr "" #: view:website:point_of_sale.report_receipt #, python-format msgid "Customer data" -msgstr "" +msgstr "Dades del client" #. module: l10n_es_pos #: view:website:point_of_sale.report_receipt @@ -48,7 +49,7 @@ msgstr "Factura" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter msgid "Invoices" -msgstr "" +msgstr "Factures" #. module: l10n_es_pos #. openerp-web @@ -56,7 +57,7 @@ msgstr "" #: view:website:point_of_sale.report_receipt #, python-format msgid "Name:" -msgstr "" +msgstr "Nom:" #. module: l10n_es_pos #: help:pos.config,simplified_invoice_limit:0 @@ -75,7 +76,7 @@ msgstr "" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order msgid "Point of Sale" -msgstr "" +msgstr "Punt de Venda" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter @@ -90,7 +91,7 @@ msgstr "" #. module: l10n_es_pos #: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt msgid "Simplified invoice" -msgstr "" +msgstr "Factura simplificada" #. module: l10n_es_pos #: field:pos.config,simplified_invoice_limit:0 diff --git a/l10n_es_pos/i18n/sl.po b/l10n_es_pos/i18n/sl.po new file mode 100644 index 00000000000..c3dcf0c1a26 --- /dev/null +++ b/l10n_es_pos/i18n/sl.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-05 19:24+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Račun" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" From 6e3aac2b6a9af9de71401706be308a84bb3d25a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Fri, 26 Aug 2016 17:08:38 +0200 Subject: [PATCH 03/54] [FIX] remove en.po that was erroneously created by transbot --- l10n_es_pos/i18n/cs.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/{en.po => en_US.po} | 38 ++++----- l10n_es_pos/i18n/es_CR.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/fr.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/gl.po | 23 +++--- l10n_es_pos/i18n/hr.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/nl.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/pl.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/pt.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/pt_BR.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/ru.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/sl.po | 8 +- l10n_es_pos/i18n/sv.po | 117 +++++++++++++++++++++++++++ l10n_es_pos/i18n/tr.po | 117 +++++++++++++++++++++++++++ 14 files changed, 1322 insertions(+), 34 deletions(-) create mode 100644 l10n_es_pos/i18n/cs.po rename l10n_es_pos/i18n/{en.po => en_US.po} (79%) create mode 100644 l10n_es_pos/i18n/es_CR.po create mode 100644 l10n_es_pos/i18n/fr.po create mode 100644 l10n_es_pos/i18n/hr.po create mode 100644 l10n_es_pos/i18n/nl.po create mode 100644 l10n_es_pos/i18n/pl.po create mode 100644 l10n_es_pos/i18n/pt.po create mode 100644 l10n_es_pos/i18n/pt_BR.po create mode 100644 l10n_es_pos/i18n/ru.po create mode 100644 l10n_es_pos/i18n/sv.po create mode 100644 l10n_es_pos/i18n/tr.po diff --git a/l10n_es_pos/i18n/cs.po b/l10n_es_pos/i18n/cs.po new file mode 100644 index 00000000000..902627b19c0 --- /dev/null +++ b/l10n_es_pos/i18n/cs.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Czech (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/cs/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: cs\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Faktura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Zaúčtováno" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/en.po b/l10n_es_pos/i18n/en_US.po similarity index 79% rename from l10n_es_pos/i18n/en.po rename to l10n_es_pos/i18n/en_US.po index edc21b2bafe..1b4c827f64b 100644 --- a/l10n_es_pos/i18n/en.po +++ b/l10n_es_pos/i18n/en_US.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: l10n-spain (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-25 13:20+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"POT-Creation-Date: 2017-10-27 00:56+0000\n" +"PO-Revision-Date: 2017-09-30 10:34+0000\n" "Last-Translator: OCA Transbot \n" -"Language-Team: English (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/en/)\n" +"Language-Team: English (United States) (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/en_US/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: en\n" +"Language: en_US\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: l10n_es_pos @@ -23,14 +23,14 @@ msgstr "" #: view:website:point_of_sale.report_receipt #, python-format msgid "Address:" -msgstr "Address:" +msgstr "" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/js/main.js:99 #, python-format msgid "An anonymous order cannot be invoiced" -msgstr "An anonymous order cannot be invoiced" +msgstr "" #. module: l10n_es_pos #. openerp-web @@ -38,7 +38,7 @@ msgstr "An anonymous order cannot be invoiced" #: view:website:point_of_sale.report_receipt #, python-format msgid "Customer data" -msgstr "Customer data" +msgstr "" #. module: l10n_es_pos #: view:website:point_of_sale.report_receipt @@ -48,7 +48,7 @@ msgstr "Invoice" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter msgid "Invoices" -msgstr "Invoices" +msgstr "" #. module: l10n_es_pos #. openerp-web @@ -56,12 +56,12 @@ msgstr "Invoices" #: view:website:point_of_sale.report_receipt #, python-format msgid "Name:" -msgstr "Name:" +msgstr "" #. module: l10n_es_pos #: help:pos.config,simplified_invoice_limit:0 msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "Over this amount is not legally posible to create a simplified invoice" +msgstr "" #. module: l10n_es_pos #. openerp-web @@ -70,37 +70,37 @@ msgstr "Over this amount is not legally posible to create a simplified invoice" msgid "" "Please select a client for this order. This can be done by clicking the " "order tab" -msgstr "Please select a client for this order. This can be done by clicking the order tab" +msgstr "" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order msgid "Point of Sale" -msgstr "Point of Sale" +msgstr "" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter msgid "Posted" -msgstr "Posted" +msgstr "" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_tree msgid "Simplified" -msgstr "Simplified" +msgstr "" #. module: l10n_es_pos #: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt msgid "Simplified invoice" -msgstr "Simplified invoice" +msgstr "" #. module: l10n_es_pos #: field:pos.config,simplified_invoice_limit:0 msgid "Simplified invoice limit" -msgstr "Simplified invoice limit" +msgstr "" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter msgid "Simplified invoices" -msgstr "Simplified invoices" +msgstr "" #. module: l10n_es_pos #. openerp-web @@ -109,9 +109,9 @@ msgstr "Simplified invoices" #: view:website:point_of_sale.report_receipt #, python-format msgid "VAT:" -msgstr "VAT:" +msgstr "" #. module: l10n_es_pos #: view:website:point_of_sale.report_receipt msgid "display:none;" -msgstr "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/es_CR.po b/l10n_es_pos/i18n/es_CR.po new file mode 100644 index 00000000000..bdab427e973 --- /dev/null +++ b/l10n_es_pos/i18n/es_CR.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (Costa Rica) (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/es_CR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_CR\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Factura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Contabilizado" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/fr.po b/l10n_es_pos/i18n/fr.po new file mode 100644 index 00000000000..7b02035db6d --- /dev/null +++ b/l10n_es_pos/i18n/fr.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "Adresse:" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Facture" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "Factures" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "Veuillez sélectionner un client pour cette commande. Ceci peut être fait en cliquant sur l'onglet commande" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "Point de vente" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Comptabilisé" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/gl.po b/l10n_es_pos/i18n/gl.po index a06bba7e114..c3daba50d3d 100644 --- a/l10n_es_pos/i18n/gl.po +++ b/l10n_es_pos/i18n/gl.po @@ -3,13 +3,14 @@ # * l10n_es_pos # # Translators: +# César Castro Cruz , 2016 msgid "" msgstr "" "Project-Id-Version: l10n-spain (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-25 13:20+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" +"POT-Creation-Date: 2016-08-27 18:55+0000\n" +"PO-Revision-Date: 2016-09-05 12:41+0000\n" +"Last-Translator: César Castro Cruz \n" "Language-Team: Galician (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/gl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,14 +24,14 @@ msgstr "" #: view:website:point_of_sale.report_receipt #, python-format msgid "Address:" -msgstr "" +msgstr "Enderezo:" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/js/main.js:99 #, python-format msgid "An anonymous order cannot be invoiced" -msgstr "" +msgstr "Unha orde anónima non pode ser facturada" #. module: l10n_es_pos #. openerp-web @@ -38,7 +39,7 @@ msgstr "" #: view:website:point_of_sale.report_receipt #, python-format msgid "Customer data" -msgstr "" +msgstr "Datos do cliente" #. module: l10n_es_pos #: view:website:point_of_sale.report_receipt @@ -48,7 +49,7 @@ msgstr "Factura" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter msgid "Invoices" -msgstr "" +msgstr "Facturas" #. module: l10n_es_pos #. openerp-web @@ -56,7 +57,7 @@ msgstr "" #: view:website:point_of_sale.report_receipt #, python-format msgid "Name:" -msgstr "" +msgstr "Nome:" #. module: l10n_es_pos #: help:pos.config,simplified_invoice_limit:0 @@ -75,7 +76,7 @@ msgstr "" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order msgid "Point of Sale" -msgstr "" +msgstr "Punto de venda" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter @@ -90,7 +91,7 @@ msgstr "" #. module: l10n_es_pos #: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt msgid "Simplified invoice" -msgstr "" +msgstr "Factura simplifiada" #. module: l10n_es_pos #: field:pos.config,simplified_invoice_limit:0 @@ -100,7 +101,7 @@ msgstr "" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter msgid "Simplified invoices" -msgstr "" +msgstr "Facturas simplificadas" #. module: l10n_es_pos #. openerp-web diff --git a/l10n_es_pos/i18n/hr.po b/l10n_es_pos/i18n/hr.po new file mode 100644 index 00000000000..34810e99e6b --- /dev/null +++ b/l10n_es_pos/i18n/hr.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Račun" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Proknjiženo" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/nl.po b/l10n_es_pos/i18n/nl.po new file mode 100644 index 00000000000..1f67d953fc9 --- /dev/null +++ b/l10n_es_pos/i18n/nl.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Factuur" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Geboekt" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/pl.po b/l10n_es_pos/i18n/pl.po new file mode 100644 index 00000000000..90f17adced6 --- /dev/null +++ b/l10n_es_pos/i18n/pl.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 02:59+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Polish (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/pl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pl\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Faktura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/pt.po b/l10n_es_pos/i18n/pt.po new file mode 100644 index 00000000000..ad52ad46b8d --- /dev/null +++ b/l10n_es_pos/i18n/pt.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Portuguese (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/pt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Fatura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Publicado" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/pt_BR.po b/l10n_es_pos/i18n/pt_BR.po new file mode 100644 index 00000000000..05eda2640ef --- /dev/null +++ b/l10n_es_pos/i18n/pt_BR.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Fatura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Lançado" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/ru.po b/l10n_es_pos/i18n/ru.po new file mode 100644 index 00000000000..2141b0a498c --- /dev/null +++ b/l10n_es_pos/i18n/ru.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-06 03:17+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Russian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Счет" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "Счета" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Проведено" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/sl.po b/l10n_es_pos/i18n/sl.po index c3dcf0c1a26..fee24662613 100644 --- a/l10n_es_pos/i18n/sl.po +++ b/l10n_es_pos/i18n/sl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: l10n-spain (8.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-05 19:24+0000\n" +"POT-Creation-Date: 2017-07-27 00:52+0000\n" "PO-Revision-Date: 2015-09-25 13:23+0000\n" "Last-Translator: <>\n" "Language-Team: Slovenian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/sl/)\n" @@ -48,7 +48,7 @@ msgstr "Račun" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter msgid "Invoices" -msgstr "" +msgstr "Računi" #. module: l10n_es_pos #. openerp-web @@ -80,7 +80,7 @@ msgstr "" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_filter msgid "Posted" -msgstr "" +msgstr "Knjiženo" #. module: l10n_es_pos #: view:pos.order:l10n_es_pos.view_pos_order_tree @@ -114,4 +114,4 @@ msgstr "" #. module: l10n_es_pos #: view:website:point_of_sale.report_receipt msgid "display:none;" -msgstr "" +msgstr "display:none;" diff --git a/l10n_es_pos/i18n/sv.po b/l10n_es_pos/i18n/sv.po new file mode 100644 index 00000000000..843423cbcc9 --- /dev/null +++ b/l10n_es_pos/i18n/sv.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Swedish (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Faktura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "Sparad" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" diff --git a/l10n_es_pos/i18n/tr.po b/l10n_es_pos/i18n/tr.po new file mode 100644 index 00000000000..03faf72dc1b --- /dev/null +++ b/l10n_es_pos/i18n/tr.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-spain (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-29 02:57+0000\n" +"PO-Revision-Date: 2015-09-25 13:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Turkish (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/tr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:99 +#, python-format +msgid "An anonymous order cannot be invoiced" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "Invoice" +msgstr "Fatura" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: help:pos.config,simplified_invoice_limit:0 +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/js/main.js:100 +#, python-format +msgid "" +"Please select a client for this order. This can be done by clicking the " +"order tab" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Posted" +msgstr "İşlenmiş" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_tree +msgid "Simplified" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: field:pos.config,simplified_invoice_limit:0 +msgid "Simplified invoice limit" +msgstr "" + +#. module: l10n_es_pos +#: view:pos.order:l10n_es_pos.view_pos_order_filter +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 +#: view:website:point_of_sale.report_receipt +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: view:website:point_of_sale.report_receipt +msgid "display:none;" +msgstr "" From e9eb14443ef987437a61ef1d42c74c2ebde7f62f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Para=C3=ADso?= Date: Tue, 14 Nov 2017 13:32:27 +0100 Subject: [PATCH 04/54] [MIG] l10n_es_pos --- l10n_es_pos/README.rst | 31 ++---- l10n_es_pos/__init__.py | 22 +++- l10n_es_pos/__manifest__.py | 31 ++++++ l10n_es_pos/__openerp__.py | 30 ------ l10n_es_pos/i18n/bg.po | 117 -------------------- l10n_es_pos/i18n/ca.po | 118 --------------------- l10n_es_pos/i18n/es.po | 99 ++++------------- l10n_es_pos/i18n/gl.po | 118 --------------------- l10n_es_pos/i18n/l10n_es_pos.pot | 115 -------------------- l10n_es_pos/models/__init__.py | 25 ++++- l10n_es_pos/models/pos.py | 103 ++++++++++++++++++ l10n_es_pos/models/pos_config.py | 15 --- l10n_es_pos/models/pos_order.py | 45 -------- l10n_es_pos/reports/common.xml | 16 --- l10n_es_pos/reports/receipt_report.xml | 63 ----------- l10n_es_pos/static/src/css/pos.css | 3 - l10n_es_pos/static/src/css/report.css | 7 -- l10n_es_pos/static/src/js/main.js | 118 --------------------- l10n_es_pos/static/src/js/models.js | 107 +++++++++++++++++++ l10n_es_pos/static/src/js/screens.js | 39 +++++++ l10n_es_pos/static/src/xml/pos.xml | 45 +++++--- l10n_es_pos/views/point_of_sale_report.xml | 12 --- l10n_es_pos/views/point_of_sale_view.xml | 62 ----------- l10n_es_pos/views/pos_template.xml | 22 ---- l10n_es_pos/views/pos_templates.xml | 13 +++ l10n_es_pos/views/pos_views.xml | 52 +++++++++ 26 files changed, 450 insertions(+), 978 deletions(-) create mode 100644 l10n_es_pos/__manifest__.py delete mode 100644 l10n_es_pos/__openerp__.py delete mode 100644 l10n_es_pos/i18n/bg.po delete mode 100644 l10n_es_pos/i18n/ca.po delete mode 100644 l10n_es_pos/i18n/gl.po delete mode 100644 l10n_es_pos/i18n/l10n_es_pos.pot create mode 100644 l10n_es_pos/models/pos.py delete mode 100644 l10n_es_pos/models/pos_config.py delete mode 100644 l10n_es_pos/models/pos_order.py delete mode 100644 l10n_es_pos/reports/common.xml delete mode 100644 l10n_es_pos/reports/receipt_report.xml delete mode 100644 l10n_es_pos/static/src/css/pos.css delete mode 100644 l10n_es_pos/static/src/css/report.css delete mode 100644 l10n_es_pos/static/src/js/main.js create mode 100644 l10n_es_pos/static/src/js/models.js create mode 100644 l10n_es_pos/static/src/js/screens.js delete mode 100644 l10n_es_pos/views/point_of_sale_report.xml delete mode 100644 l10n_es_pos/views/point_of_sale_view.xml delete mode 100644 l10n_es_pos/views/pos_template.xml create mode 100644 l10n_es_pos/views/pos_templates.xml create mode 100644 l10n_es_pos/views/pos_views.xml diff --git a/l10n_es_pos/README.rst b/l10n_es_pos/README.rst index 4fc141d5fc3..e47bccb9c41 100644 --- a/l10n_es_pos/README.rst +++ b/l10n_es_pos/README.rst @@ -8,7 +8,7 @@ Punto de venta Punto de venta adaptado a la legislación española * Adapta el terminal punto de venta a la legislación Española (no se permite la emisión de tiquets, todo deben ser facturas o facturas simplificadas con numeración) -* Adapta el ticket de venta a factura simplificada, añadiendo el NIF del emisor. +* Adapta el ticket de venta a la factura simplificada, añadiendo una secuencia correlativa y el NIF del emisor. * Incluye los datos del cliente (nombre, NIF y dirección) si hay uno asignado. * Chequea que no se realice una factura simplificada con valor superior a 3.000 euros (la cantidad es configurable por TPV). @@ -20,38 +20,23 @@ Instalación Para instalar este modulo necesitas: * point_of_sale (Odoo addon) -* pos_pricelist (OCA addon, repositorio pos) -Ambos se instalan automáticamente si están disponibles en la lista de addons. +Se instala automáticamente si está disponible en la lista de addons. + +También es necesario definir una secuencia de factura simplificada en la +configuración de cada TPV. Configuración ============= Se puede configurar el límite a partir del cual no se considera factura -simplificada. Por defecto es 3.000,00 €. Para modificarlo ir a: +simplificada, por defecto es 3.000,00 €. También permite modificar la secuencia de factura simplificada. +Para modificarlos es necesario ir a: Configuracion > Terminal punto de venta (TPV) `Ver enlace de la AEAT `_ -Se aconseja disponer de una secuencia sin hueco ``Ref. Venta`` para cada TPV, -porque es el número que aparece como Factura o Factura simplificada. - - -Problemas conocidos / Hoja de ruta -================================== - -No permite realizar facturas contables convencionales a partir de un pedido del -TPV porque el pedido ya incluye toda la información contable y de impuestos -necesaria (hereda esta funcionalidad del addon pos_pricelist) y esto provoca que -haya huecos en la numeración de las facturas simplificadas (esto no lo permite -la legislación española) - -Desde el TPV se imprime un tiquet sólo con la referencia del pedido. En este momento -no se puede mostrar el número de factura (simplificada o no) porque el TPV puede -estar offline. Si el cliente solicita una factura deducible es necesario imprimir -el tiquet desde el backend. - Bug Tracker =========== @@ -89,6 +74,8 @@ Contribuidores * Pedro M. Baeza [Serv. Tecnológicos Avanzados] * Antonio Espinosa * Rafael Blasco +* David Gómez +* Miguel Paraíso Mantenedor diff --git a/l10n_es_pos/__init__.py b/l10n_es_pos/__init__.py index 30772dc1e84..65b2ec4ddff 100644 --- a/l10n_es_pos/__init__.py +++ b/l10n_es_pos/__init__.py @@ -1,4 +1,24 @@ # -*- coding: utf-8 -*- -# See README.rst file on addon root folder for license details +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright 2017 - Aselcis Consulting (http://www.aselcis.com) +# - David Gómez +# - Miguel Paraíso +# +# 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 models diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py new file mode 100644 index 00000000000..1834d3aeca0 --- /dev/null +++ b/l10n_es_pos/__manifest__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# See README.rst file on addon root folder for license details + +{ + 'name': "Punto de venta adaptado a la legislación española", + 'summary': """ + Añade todo lo necesario para adaptar el TPV a la legislación Española. + """, + 'description': """ +Añade todo lo necesario para adaptar el TPV a la legislación Española. + """, + + 'website': "https://www.aselcis.com", + 'category': 'Point Of Sale', + 'author': "Antiun Ingeniería S.L., " + "Serv. Tecnol. Avanzados - Pedro M. Baeza, " + "Aselcis Consulting, " + "Spanish Localization Team, " + "Odoo Community Association (OCA)", + 'version': '10.0.1.0.0', + 'depends': ['point_of_sale'], + 'license': 'AGPL-3', + 'data': [ + 'views/pos_templates.xml', + 'views/pos_views.xml', + ], + "qweb": [ + 'static/src/xml/pos.xml', + ], + "installable": True, +} diff --git a/l10n_es_pos/__openerp__.py b/l10n_es_pos/__openerp__.py deleted file mode 100644 index 80bc1650bab..00000000000 --- a/l10n_es_pos/__openerp__.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# See README.rst file on addon root folder for license details - -{ - "name": "Punto de venta adaptado a la legislación española", - "version": "8.0.1.0.0", - "author": "Antiun Ingeniería S.L., " - "Serv. Tecnol. Avanzados - Pedro M. Baeza, " - "Spanish Localization Team, " - "Odoo Community Association (OCA)", - "website": "http://www.antiun.com", - "license": "AGPL-3", - "category": "Point Of Sale", - "depends": [ - 'base', - 'point_of_sale', - 'pos_pricelist' - ], - 'data': [ - "views/pos_template.xml", - "views/point_of_sale_view.xml", - "views/point_of_sale_report.xml", - "reports/common.xml", - "reports/receipt_report.xml", - ], - "qweb": [ - 'static/src/xml/pos.xml', - ], - "installable": True, -} diff --git a/l10n_es_pos/i18n/bg.po b/l10n_es_pos/i18n/bg.po deleted file mode 100644 index 2d1b19aff82..00000000000 --- a/l10n_es_pos/i18n/bg.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-25 13:20+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Bulgarian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Фактура" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/ca.po b/l10n_es_pos/i18n/ca.po deleted file mode 100644 index 5b8c67d8b29..00000000000 --- a/l10n_es_pos/i18n/ca.po +++ /dev/null @@ -1,118 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -# Eric Antones , 2016 -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-05 10:32+0000\n" -"PO-Revision-Date: 2016-02-29 13:42+0000\n" -"Last-Translator: Eric Antones \n" -"Language-Team: Catalan (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "Adreça:" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "Dades del client" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Factura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "Factures" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "Nom:" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "Punt de Venda" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "Factura simplificada" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index a8918fe04fb..3771f6f57a1 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-25 11:28+0000\n" -"PO-Revision-Date: 2015-09-25 11:28+0000\n" +"POT-Creation-Date: 2017-02-07 11:24+0000\n" +"PO-Revision-Date: 2017-02-07 11:24+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -17,99 +17,44 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:27 #, python-format -msgid "Address:" -msgstr "Dirección:" +msgid "Customer:" +msgstr "Cliente:" #. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "Un pedido anónimo no puede facturarse" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "Datos del cliente" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Factura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "Facturas" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt +#: code:addons/l10n_es_pos/models/pos.py:51 #, python-format -msgid "Name:" -msgstr "Nombre:" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "Por encima de esta cantidad no es posible legalmente crear una factura simplificada" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "Please select a client for this order. This can be done by clicking the order tab" -msgstr "Seleccione un cliente para este pedido. Esto se puede hacer pulsando en la pestaña." +msgid "POS Simplified invoice %s" +msgstr "TPV Factura simplificada %s" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order msgid "Point of Sale" -msgstr "Terminal punto de venta" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Contabilizado" +msgstr "Punto de Venta" #. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "Simplificada" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 -#: view:website:point_of_sale.report_receipt +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_simplified_invoice msgid "Simplified invoice" msgstr "Factura simplificada" #. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "Límite de factura simplificada" +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simpl_inv_seq_id +msgid "Simplified invoice seq" +msgstr "Secuencia factura simplificada" #. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "Facturas simplificadas" +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:7 +#, python-format +msgid "Simplified invoice:" +msgstr "Factura simplificada:" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:29 #, python-format msgid "VAT:" -msgstr "NIF:" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "display:none;" +msgstr "CIF/NIF:" diff --git a/l10n_es_pos/i18n/gl.po b/l10n_es_pos/i18n/gl.po deleted file mode 100644 index c3daba50d3d..00000000000 --- a/l10n_es_pos/i18n/gl.po +++ /dev/null @@ -1,118 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -# César Castro Cruz , 2016 -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-08-27 18:55+0000\n" -"PO-Revision-Date: 2016-09-05 12:41+0000\n" -"Last-Translator: César Castro Cruz \n" -"Language-Team: Galician (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/gl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: gl\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "Enderezo:" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "Unha orde anónima non pode ser facturada" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "Datos do cliente" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Factura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "Facturas" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "Nome:" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "Punto de venda" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "Factura simplifiada" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "Facturas simplificadas" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/l10n_es_pos.pot b/l10n_es_pos/i18n/l10n_es_pos.pot deleted file mode 100644 index 49bb2f7cbfc..00000000000 --- a/l10n_es_pos/i18n/l10n_es_pos.pot +++ /dev/null @@ -1,115 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-25 11:28+0000\n" -"PO-Revision-Date: 2015-09-25 11:28+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: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "Please select a client for this order. This can be done by clicking the order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 -#: view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" - diff --git a/l10n_es_pos/models/__init__.py b/l10n_es_pos/models/__init__.py index aeb485c355b..ba84f431a32 100644 --- a/l10n_es_pos/models/__init__.py +++ b/l10n_es_pos/models/__init__.py @@ -1,5 +1,24 @@ # -*- coding: utf-8 -*- -# See README.rst file on addon root folder for license details +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright 2017 - Aselcis Consulting (http://www.aselcis.com) +# - David Gómez +# - Miguel Paraíso +# +# 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 pos_config -from . import pos_order +from . import pos \ No newline at end of file diff --git a/l10n_es_pos/models/pos.py b/l10n_es_pos/models/pos.py new file mode 100644 index 00000000000..9f4f19bbe6e --- /dev/null +++ b/l10n_es_pos/models/pos.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright 2017 - Aselcis Consulting (http://www.aselcis.com) +# - David Gómez +# - Miguel Paraíso +# +# 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 odoo import models, fields, api, _ +import odoo.addons.decimal_precision as dp +from odoo.tools import float_compare +from odoo.exceptions import UserError + + +class PosOrder(models.Model): + _inherit = 'pos.order' + + simplified_invoice = fields.Char('Simplified invoice', copy=False) + + @api.model + def simplified_limit_check(self, pos_order): + limit = self.env['pos.session'].browse( + pos_order['pos_session_id']).config_id.simplified_invoice_limit + precision_digits = dp.get_precision('Account')(self.env.cr)[1] + # -1 or 0: amount_total <= limit, simplified + # 1: amount_total > limit, can not be simplified + return float_compare(pos_order['amount_total'], limit, + precision_digits=precision_digits) < 0 + + @api.model + def _process_order(self, pos_order): + order = super(PosOrder, self)._process_order(pos_order) + simplified = self.simplified_limit_check(pos_order) + if simplified: + config = order.session_id.config_id + if config.simple_invoice_prefix: + config.set_next_simple_invoice_number( + pos_order.get('simplified_invoice', + config.simple_invoice_prefix + '1')) + order.write({ + 'simplified_invoice': pos_order.get('simplified_invoice', ''), + }) + else: + raise UserError(_('You need to define a simplified invoice ' + 'prefix.')) + return order + + +class PosConfig(models.Model): + _inherit = 'pos.config' + + simple_invoice_prefix = fields.Char('Sim.Inv prefix', copy=False) + simple_invoice_padding = fields.Integer('Sim.Inv padding', default=4) + simple_invoice_number = fields.Integer('Sim.Inv number', default=0, + copy=False, readonly=True) + simplified_invoice_limit = fields.Float(string='Sim.Inv limit amount', + digits=dp.get_precision('Account'), + help='Over this amount is not ' + 'legally posible to create a ' + 'simplified invoice', + default=3000) + + @api.model + def create(self, vals): + self.check_simple_inv_prefix(vals.get('simple_invoice_prefix', False)) + return super(PosConfig, self).create(vals) + + @api.multi + def write(self, vals): + self.check_simple_inv_prefix(vals.get('simple_invoice_prefix', False)) + return super(PosConfig, self).write(vals) + + def check_simple_inv_prefix(self, prefix): + if prefix: + configs = self.search([('simple_invoice_prefix', '=', prefix)]) + if len(configs) > 0: + raise UserError(_( + 'Already exists other POS config with the same Sim.Inv ' + 'prefix. You should change this field value.')) + + def set_next_simple_invoice_number(self, order_number): + # Fix generated orders with empty simplified invoice prefix + if 'false' in order_number: + order_number = order_number.replace('false', + self.simple_invoice_prefix) + number = int(order_number.replace(self.simple_invoice_prefix, '')) + if number > self.simple_invoice_number: + self.write({'simple_invoice_number': number}) diff --git a/l10n_es_pos/models/pos_config.py b/l10n_es_pos/models/pos_config.py deleted file mode 100644 index c068ae654a6..00000000000 --- a/l10n_es_pos/models/pos_config.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# See README.rst file on addon root folder for license details - -from openerp import models, fields -from openerp.addons import decimal_precision as dp - - -class PosConfig(models.Model): - _inherit = 'pos.config' - - simplified_invoice_limit = fields.Float( - string='Simplified invoice limit', digits=dp.get_precision('Account'), - help='Over this amount is not legally posible to create a ' - 'simplified invoice', - default=3000) diff --git a/l10n_es_pos/models/pos_order.py b/l10n_es_pos/models/pos_order.py deleted file mode 100644 index a0a18b7968e..00000000000 --- a/l10n_es_pos/models/pos_order.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# See README.rst file on addon root folder for license details - -from openerp import models, fields, api -from openerp.addons import decimal_precision as dp -from openerp.tools.float_utils import float_compare - - -class PosOrder(models.Model): - _inherit = 'pos.order' - - simplified = fields.Boolean(string='Simplified invoice', default=True) - - @api.one - def action_invoice(self): - self.simplified = False - - @api.multi - def simplified_limit_check(self): - for order in self: - if not order.simplified: - continue - limit = order.session_id.config_id.simplified_invoice_limit - amount_total = order.amount_total - precision_digits = dp.get_precision('Account')(self.env.cr)[1] - # -1 or 0: amount_total <= limit, simplified - # 1: amount_total > limit, can not be simplified - simplified = ( - float_compare(amount_total, limit, - precision_digits=precision_digits) <= 0) - # Change simplified flag if incompatible - if not simplified: - order.write({'simplified': simplified}) - - @api.multi - def write(self, vals): - result = super(PosOrder, self).write(vals) - self.simplified_limit_check() - return result - - @api.model - def create(self, vals): - order = super(PosOrder, self).create(vals) - order.simplified_limit_check() - return order diff --git a/l10n_es_pos/reports/common.xml b/l10n_es_pos/reports/common.xml deleted file mode 100644 index 39725caf19b..00000000000 --- a/l10n_es_pos/reports/common.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/l10n_es_pos/reports/receipt_report.xml b/l10n_es_pos/reports/receipt_report.xml deleted file mode 100644 index 71d6825e5cb..00000000000 --- a/l10n_es_pos/reports/receipt_report.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - diff --git a/l10n_es_pos/static/src/css/pos.css b/l10n_es_pos/static/src/css/pos.css deleted file mode 100644 index 4de742d5983..00000000000 --- a/l10n_es_pos/static/src/css/pos.css +++ /dev/null @@ -1,3 +0,0 @@ -img.desaturate {width:50%;height: 100%;margin: 0 25%;} -.pos-sale-ticket_extra {width:280px;} -.customer_title {text-decoration: underline;} diff --git a/l10n_es_pos/static/src/css/report.css b/l10n_es_pos/static/src/css/report.css deleted file mode 100644 index 4ef9086a6c1..00000000000 --- a/l10n_es_pos/static/src/css/report.css +++ /dev/null @@ -1,7 +0,0 @@ -.customer { - text-align: left; - border-top: solid 1px grey; - margin-bottom: 15px; - margin-top: 10px; -} -.customer_title {text-decoration: underline;} \ No newline at end of file diff --git a/l10n_es_pos/static/src/js/main.js b/l10n_es_pos/static/src/js/main.js deleted file mode 100644 index 6433bbbdc1b..00000000000 --- a/l10n_es_pos/static/src/js/main.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * # -*- coding: utf-8 -*- - * # See README.rst file on addon root folder for license details - */ - -// Check jQuery available -if (typeof jQuery === 'undefined') { throw new Error('l10n_es POS Simplified invoice Addon requires jQuery') } - -+function ($) { - 'use strict'; - - openerp.l10n_es_pos = function (instance) { - var _t = instance.web._t, - _lt = instance.web._lt; - var QWeb = instance.web.qweb; - var module = instance.point_of_sale; - var _simplified_limit_get = function() { - var limit = 3000 - // Get simplified limit from POS config - if ( - posmodel - && posmodel.config - && posmodel.config.simplified_invoice_limit - ) { - limit = posmodel.config.simplified_invoice_limit; - } - return limit; - }; - - var OrderParent = module.Order; - module.Order = module.Order.extend({ - initialize: function(attributes){ - OrderParent.prototype.initialize.apply(this, arguments); - // By default, simplified - this.simplified = true; - }, - export_for_printing: function(attributes){ - var order = OrderParent.prototype.export_for_printing.apply(this, arguments); - order['simplified'] = this.is_simplified(); - return order; - }, - export_as_JSON: function() { - var order = OrderParent.prototype.export_as_JSON.apply(this, arguments); - order['simplified'] = this.is_simplified(); - return order; - }, - set_simplified: function(simplified) { - this.simplified = !!simplified; - }, - is_simplified: function() { - var limit = _simplified_limit_get(); - var amount_total = this.getTotalTaxIncluded(); - var simplified = this.simplified; - // If simplified limit raised, - // then this order can not be simplified - if (amount_total > limit) { - simplified = false - } - return simplified; - }, - }); - - instance.web.Widget.include({ - is_button_disabled: function(name){ - var b = this.buttons[name]; - if (b != undefined) { - return b.disabled; - } - return true; - }, - }); - - // Widget: ScreenWidget - instance.point_of_sale.PaymentScreenWidget.include({ - invoice_button_check: function() { - var currentOrder = this.pos.get('selectedOrder'); - var dueTotal = currentOrder.getTotalTaxIncluded(); - var limit = _simplified_limit_get() - if (this.pos_widget.action_bar ) { - if (dueTotal > limit) { - this.pos_widget.action_bar.set_button_disabled('validation', true); - this.pos_widget.action_bar.set_button_disabled('invoice', !this.is_paid()); - } - } - }, - update_payment_summary: function() { - var result = this._super.apply(this, arguments); - this.invoice_button_check() - return result - }, - validate_order: function(options) { - var currentOrder = this.pos.get('selectedOrder'); - var result; - options = options || {}; - if (options.invoice) { - // Check for client - if (!currentOrder.get_client()) { - this.pos_widget.screen_selector.show_popup('error',{ - message: _t('An anonymous order cannot be invoiced'), - comment: _t('Please select a client for this order. This can be done by clicking the order tab'), - }); - return; - } - // Set this order as not simplified even if no limit raised - currentOrder.set_simplified(false) - // Disable standard invoice flow - options.invoice = false - } - result = this._super.apply(this, arguments); - this.invoice_button_check() - return result - }, - }); - - }; - - -}(jQuery); diff --git a/l10n_es_pos/static/src/js/models.js b/l10n_es_pos/static/src/js/models.js new file mode 100644 index 00000000000..cb535dfe0fa --- /dev/null +++ b/l10n_es_pos/static/src/js/models.js @@ -0,0 +1,107 @@ +/**************************************************************************** + * + * OpenERP, Open Source Management Solution + * Copyright (C) 2016 Aselcis Consulting (http://www.aselcis.com). All Rights Reserved + * Copyright (C) 2016 David Gómez Quilón (http://www.aselcis.com). All Rights Reserved + * + * 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 . + * + ******************************************************************************/ + +odoo.define('l10n_es_pos.models', function (require) { + "use strict"; + + var ajax = require('web.ajax'); + var core = require('web.core'); + var models = require('point_of_sale.models'); + var Model = require('web.DataModel'); + var QWeb = core.qweb; + var _t = core._t; + var exports = {}; + + var pos_super = models.PosModel.prototype; + models.PosModel = models.PosModel.extend({ + initialize: function (attributes, options) { + pos_super.initialize.apply(this, arguments); + this.pushed_simple_invoices = []; + return this; + }, + after_load_server_data: function () { + ++this.config.simple_invoice_number; + return pos_super.after_load_server_data.apply(this, arguments); + }, + get_simple_inv_next_number: function () { + if (this.pushed_simple_invoices.indexOf(this.config.simple_invoice_number) > -1) { + ++this.config.simple_invoice_number; + } + return this.config.simple_invoice_prefix+this.get_padding_simple_inv(this.config.simple_invoice_number); + }, + get_padding_simple_inv: function (number) { + var diff = this.config.simple_invoice_padding - number.toString().length; + var result = ''; + if (diff <= 0) { + result = number; + } else { + for (var i = 0; i < diff; i++) { + result += '0'; + } + result += number; + } + + return result; + }, + push_simple_invoice: function (order) { + if (this.pushed_simple_invoices.indexOf(order.data.simplified_invoice) === -1) { + this.pushed_simple_invoices.push(order.data.simplified_invoice); + ++this.config.simple_invoice_number; + } + }, + _flush_orders: function (orders, options) { + var self = this; + + // Save pushed orders numbers + _.each(orders, function (order) { + if (!order.data.to_invoice) { + self.push_simple_invoice(order); + } + }); + + return pos_super._flush_orders.apply(this, arguments); + } + }); + + var order_super = models.Order.prototype; + models.Order = models.Order.extend({ + set_simple_inv_number: function () { + this.simplified_invoice = this.pos.get_simple_inv_next_number(); + }, + init_from_JSON: function (json) { + order_super.init_from_JSON.apply(this, arguments); + this.to_invoice = json.to_invoice; + this.simplified_invoice = json.simplified_invoice; + }, + export_as_JSON: function () { + var res = order_super.export_as_JSON.apply(this, arguments); + res.to_invoice = this.is_to_invoice(); + if (!res.to_invoice) { + res.simplified_invoice = this.simplified_invoice; + } + return res; + } + }); + + models.load_fields('res.company', ['street', 'city', 'state_id', 'zip']); + + return exports; +}); diff --git a/l10n_es_pos/static/src/js/screens.js b/l10n_es_pos/static/src/js/screens.js new file mode 100644 index 00000000000..3f117777733 --- /dev/null +++ b/l10n_es_pos/static/src/js/screens.js @@ -0,0 +1,39 @@ +/**************************************************************************** + * + * OpenERP, Open Source Management Solution + * Copyright (C) 2016 Aselcis Consulting (http://www.aselcis.com). All Rights Reserved + * Copyright (C) 2016 David Gómez Quilón (http://www.aselcis.com). All Rights Reserved + * + * 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 . + * + ******************************************************************************/ + +odoo.define('l10n_es_pos.screens', function (require) { + "use strict"; + + var core = require('web.core'); + var screens = require('point_of_sale.screens'); + var QWeb = core.qweb; + var _t = core._t; + var exports = {}; + + screens.PaymentScreenWidget.include({ + validate_order: function (force_validate) { + this.pos.get_order().set_simple_inv_number(); + this._super(force_validate); + } + }); + + return exports; +}); diff --git a/l10n_es_pos/static/src/xml/pos.xml b/l10n_es_pos/static/src/xml/pos.xml index efb531cc6e3..e07a4571447 100644 --- a/l10n_es_pos/static/src/xml/pos.xml +++ b/l10n_es_pos/static/src/xml/pos.xml @@ -1,23 +1,40 @@ + - -
+ +
+ Simplified invoice: +
- -
VAT: + + +
+ VAT: +
- - -

- Customer data
- Name:
- VAT:
- Address: + +
+
+ + + + () +
- - + + + Customer:
+ + VAT:
+
+ + + +

+
-
+ + \ No newline at end of file diff --git a/l10n_es_pos/views/point_of_sale_report.xml b/l10n_es_pos/views/point_of_sale_report.xml deleted file mode 100644 index 5d72617d0a9..00000000000 --- a/l10n_es_pos/views/point_of_sale_report.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/l10n_es_pos/views/point_of_sale_view.xml b/l10n_es_pos/views/point_of_sale_view.xml deleted file mode 100644 index 8309d43c373..00000000000 --- a/l10n_es_pos/views/point_of_sale_view.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - POS Order (remove invoice button) - pos.order - - - - - - - - - POS Order (hide invoice ID and show simplified fields) - pos.order - - - - 1 - - - - - - - - - - POS Order (add filters for simplified field) - pos.order - - 20 - - - - - - - - - - - - POS Order (add simplified invoice limit option) - pos.config - - - - - - - - - - - diff --git a/l10n_es_pos/views/pos_template.xml b/l10n_es_pos/views/pos_template.xml deleted file mode 100644 index ea77256e361..00000000000 --- a/l10n_es_pos/views/pos_template.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/l10n_es_pos/views/pos_templates.xml b/l10n_es_pos/views/pos_templates.xml new file mode 100644 index 00000000000..73953d8d766 --- /dev/null +++ b/l10n_es_pos/views/pos_templates.xml @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/l10n_es_pos/views/pos_views.xml b/l10n_es_pos/views/pos_views.xml new file mode 100644 index 00000000000..420b7c424cd --- /dev/null +++ b/l10n_es_pos/views/pos_views.xml @@ -0,0 +1,52 @@ + + + + + + + pos.order.form + pos.order + + + + + + + + + + + POS Order (add filters for simplified field) + pos.order + + 20 + + + + + + + + + + + + pos.config.form + pos.config + + + + + + + + + + + + + + + + + From 3cda8892303c52a8b8c19f38d370c000614a4fa6 Mon Sep 17 00:00:00 2001 From: "Ignacio Ibeas - Acysos S.L" Date: Wed, 28 Mar 2018 12:53:29 +0200 Subject: [PATCH 05/54] [ADD] l10n_es_pos: posbox support and translations --- l10n_es_pos/README.rst | 1 + l10n_es_pos/__manifest__.py | 1 + l10n_es_pos/i18n/es.po | 80 ++++++++++++++++++------------ l10n_es_pos/static/src/xml/pos.xml | 19 +++++++ 4 files changed, 70 insertions(+), 31 deletions(-) diff --git a/l10n_es_pos/README.rst b/l10n_es_pos/README.rst index e47bccb9c41..d95d66e5728 100644 --- a/l10n_es_pos/README.rst +++ b/l10n_es_pos/README.rst @@ -76,6 +76,7 @@ Contribuidores * Rafael Blasco * David Gómez * Miguel Paraíso +* Ignacio Ibeas Mantenedor diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index 1834d3aeca0..b1f4a75d853 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -15,6 +15,7 @@ 'author': "Antiun Ingeniería S.L., " "Serv. Tecnol. Avanzados - Pedro M. Baeza, " "Aselcis Consulting, " + "Acysos S.L., " "Spanish Localization Team, " "Odoo Community Association (OCA)", 'version': '10.0.1.0.0', diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index 3771f6f57a1..b36c11735ae 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -1,37 +1,56 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * l10n_es_pos +# * l10n_es_pos # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0+e\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-07 11:24+0000\n" -"PO-Revision-Date: 2017-02-07 11:24+0000\n" -"Last-Translator: <>\n" +"POT-Creation-Date: 2018-03-25 20:05+0000\n" +"PO-Revision-Date: 2018-03-25 22:08+0200\n" +"Last-Translator: Ignacio Ibeas - Acysos S.L. \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" +"Language: es\n" +"X-Generator: Poedit 1.8.7.1\n" #. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:27 -#, python-format -msgid "Customer:" -msgstr "Cliente:" +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +msgid "Invoices" +msgstr "Facturas" #. module: l10n_es_pos -#: code:addons/l10n_es_pos/models/pos.py:51 -#, python-format -msgid "POS Simplified invoice %s" -msgstr "TPV Factura simplificada %s" +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_simplified_invoice_limit +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "Por encima de esta cantidad no es legal crear una factura simplificada" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "Punto de Venta" +msgid "Point of Sale Orders" +msgstr "Pedidos del TPV" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simplified_invoice_limit +msgid "Sim.Inv limit amount" +msgstr "Límite factura simplificada" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simple_invoice_number +msgid "Sim.Inv number" +msgstr "Número factura simplificada" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simple_invoice_padding +msgid "Sim.Inv padding" +msgstr "Espaciado factura simplificada" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simple_invoice_prefix +msgid "Sim.Inv prefix" +msgstr "Prefijo factura simplificada" #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_simplified_invoice @@ -39,22 +58,21 @@ msgid "Simplified invoice" msgstr "Factura simplificada" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simpl_inv_seq_id -msgid "Simplified invoice seq" -msgstr "Secuencia factura simplificada" +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +msgid "Simplified invoices" +msgstr "Factura simplificada" #. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:7 -#, python-format -msgid "Simplified invoice:" -msgstr "Factura simplificada:" +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Spanish Legislation" +msgstr "Legislación española" #. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:29 -#, python-format -msgid "VAT:" -msgstr "CIF/NIF:" +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "TPVXXX#" +msgstr "TPVXXX#" +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_config +msgid "pos.config" +msgstr "Configuración del TPV" diff --git a/l10n_es_pos/static/src/xml/pos.xml b/l10n_es_pos/static/src/xml/pos.xml index e07a4571447..14d55304fe8 100644 --- a/l10n_es_pos/static/src/xml/pos.xml +++ b/l10n_es_pos/static/src/xml/pos.xml @@ -37,4 +37,23 @@ + + +
+ + Simplified invoice + +
+
+ + +
+ Customer data
+ Name:
+ VAT:
+ Address: + +
+
+ \ No newline at end of file From eef58cfea50c2fa5de153e0339f6e7a2a7615a69 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 10 Apr 2018 20:27:30 +0200 Subject: [PATCH 06/54] [MIG] l10n_es_pos: Migration to 11.0 --- l10n_es_pos/README.rst | 94 ++++---- l10n_es_pos/__init__.py | 24 +-- l10n_es_pos/__manifest__.py | 38 ++-- l10n_es_pos/hooks.py | 37 ++++ l10n_es_pos/i18n/cs.po | 117 ---------- l10n_es_pos/i18n/en_US.po | 117 ---------- l10n_es_pos/i18n/es.po | 194 ++++++++++++++--- l10n_es_pos/i18n/es_CR.po | 117 ---------- l10n_es_pos/i18n/fr.po | 117 ---------- l10n_es_pos/i18n/hr.po | 117 ---------- l10n_es_pos/i18n/l10n_es_pos.pot | 200 ++++++++++++++++++ l10n_es_pos/i18n/nl.po | 117 ---------- l10n_es_pos/i18n/pl.po | 117 ---------- l10n_es_pos/i18n/pt.po | 117 ---------- l10n_es_pos/i18n/pt_BR.po | 117 ---------- l10n_es_pos/i18n/ru.po | 117 ---------- l10n_es_pos/i18n/sl.po | 117 ---------- l10n_es_pos/i18n/sv.po | 117 ---------- l10n_es_pos/i18n/tr.po | 117 ---------- .../migrations/11.0.1.0.0/post-migrate.py | 18 ++ l10n_es_pos/models/__init__.py | 26 +-- l10n_es_pos/models/ir_sequence.py | 22 ++ l10n_es_pos/models/pos.py | 103 --------- l10n_es_pos/models/pos_config.py | 110 ++++++++++ l10n_es_pos/models/pos_order.py | 52 +++++ l10n_es_pos/static/description/icon.png | Bin 11484 -> 4338 bytes l10n_es_pos/static/src/js/models.js | 65 +++--- l10n_es_pos/static/src/js/screens.js | 41 ++-- l10n_es_pos/static/src/xml/pos.xml | 25 ++- l10n_es_pos/views/pos_templates.xml | 14 +- l10n_es_pos/views/pos_views.xml | 113 ++++++---- 31 files changed, 815 insertions(+), 1882 deletions(-) create mode 100644 l10n_es_pos/hooks.py delete mode 100644 l10n_es_pos/i18n/cs.po delete mode 100644 l10n_es_pos/i18n/en_US.po delete mode 100644 l10n_es_pos/i18n/es_CR.po delete mode 100644 l10n_es_pos/i18n/fr.po delete mode 100644 l10n_es_pos/i18n/hr.po create mode 100644 l10n_es_pos/i18n/l10n_es_pos.pot delete mode 100644 l10n_es_pos/i18n/nl.po delete mode 100644 l10n_es_pos/i18n/pl.po delete mode 100644 l10n_es_pos/i18n/pt.po delete mode 100644 l10n_es_pos/i18n/pt_BR.po delete mode 100644 l10n_es_pos/i18n/ru.po delete mode 100644 l10n_es_pos/i18n/sl.po delete mode 100644 l10n_es_pos/i18n/sv.po delete mode 100644 l10n_es_pos/i18n/tr.po create mode 100644 l10n_es_pos/migrations/11.0.1.0.0/post-migrate.py create mode 100644 l10n_es_pos/models/ir_sequence.py delete mode 100644 l10n_es_pos/models/pos.py create mode 100644 l10n_es_pos/models/pos_config.py create mode 100644 l10n_es_pos/models/pos_order.py diff --git a/l10n_es_pos/README.rst b/l10n_es_pos/README.rst index d95d66e5728..44f29570618 100644 --- a/l10n_es_pos/README.rst +++ b/l10n_es_pos/README.rst @@ -1,5 +1,6 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 ================================================================ Punto de venta Punto de venta adaptado a la legislación española @@ -8,76 +9,83 @@ Punto de venta Punto de venta adaptado a la legislación española * Adapta el terminal punto de venta a la legislación Española (no se permite la emisión de tiquets, todo deben ser facturas o facturas simplificadas con numeración) -* Adapta el ticket de venta a la factura simplificada, añadiendo una secuencia correlativa y el NIF del emisor. +* Adapta el ticket de venta a la factura simplificada, añadiendo una secuencia + correlativa y el NIF del emisor. * Incluye los datos del cliente (nombre, NIF y dirección) si hay uno asignado. * Chequea que no se realice una factura simplificada con valor superior a 3.000 euros (la cantidad es configurable por TPV). - Instalación =========== -Para instalar este modulo necesitas: - -* point_of_sale (Odoo addon) +Antes de instalar el módulo, podemos definir el relleno y el prefijo automático +en *Configuración > Parámetros del sistema*: -Se instala automáticamente si está disponible en la lista de addons. - -También es necesario definir una secuencia de factura simplificada en la -configuración de cada TPV. +- `l10n_es_pos.simplified_invoice_sequence.padding` (o 4 cifras por defecto) +- `l10n_es_pos.simplified_invoice_sequence.prefix` (nombre del TPV más este + valor) +Al instalarse el módulo, se define una secuencia para factura simplificada por +cada TPV existente. Configuración ============= -Se puede configurar el límite a partir del cual no se considera factura -simplificada, por defecto es 3.000,00 €. También permite modificar la secuencia de factura simplificada. -Para modificarlos es necesario ir a: -Configuracion > Terminal punto de venta (TPV) +Para activar la factura simplificada en un TPV, iremos a +*Punto de Venta > Configuración > Punto de Venta* y escogeremos uno de la +lista. En la sección *Facturación y recibos* activaremos la opción +*Secuencia de Factura Simplificada*. Podemos configurar el límite a partir del +cual no se considera factura simplificada, que por defecto es 3.000,00 €. + +Si entramos en la configuración del TPV en modo debug, podremos también +configurar la sequencia asociada al TPV. -`Ver enlace de la AEAT `_ +`Ver enlace de la AEAT `_ +Problemas conocidos +=================== + +No se comprueba el límite en operaciones separadas para un mismo cliente, algo +que Hacienda proscribe. Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. - +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. -Licencia +Créditos ======== -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. +Imágenes +-------- + +* Odoo Community Association: `Icon `_. -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. +Contribuidores +-------------- -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . +* `Antiun `_: + * Endika Iglesias -Créditos -======== +* `Aselcis `_: -Contribuidores --------------- + * David Gómez + * Miguel Paraíso + +* `Acysos `_: + + * Ignacio Ibeas -* Endika Iglesias -* Pedro M. Baeza [Serv. Tecnológicos Avanzados] -* Antonio Espinosa -* Rafael Blasco -* David Gómez -* Miguel Paraíso -* Ignacio Ibeas +* `Tecnativa `_: + * David Vidal + * Pedro M. Baeza + * Antonio Espinosa + * Rafael Blasco Mantenedor ---------- diff --git a/l10n_es_pos/__init__.py b/l10n_es_pos/__init__.py index 65b2ec4ddff..c0d9f3d12f7 100644 --- a/l10n_es_pos/__init__.py +++ b/l10n_es_pos/__init__.py @@ -1,24 +1,4 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright 2017 - Aselcis Consulting (http://www.aselcis.com) -# - David Gómez -# - Miguel Paraíso -# -# 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 . -# -############################################################################## +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import models +from .hooks import post_init_hook diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index b1f4a75d853..c846f0b3d7f 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -1,32 +1,26 @@ -# -*- coding: utf-8 -*- -# See README.rst file on addon root folder for license details +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { - 'name': "Punto de venta adaptado a la legislación española", - 'summary': """ - Añade todo lo necesario para adaptar el TPV a la legislación Española. - """, - 'description': """ -Añade todo lo necesario para adaptar el TPV a la legislación Española. - """, - - 'website': "https://www.aselcis.com", - 'category': 'Point Of Sale', - 'author': "Antiun Ingeniería S.L., " - "Serv. Tecnol. Avanzados - Pedro M. Baeza, " + "name": "Punto de venta adaptado a la legislación española", + "category": "Point Of Sale", + "author": "Tecnativa, " "Aselcis Consulting, " "Acysos S.L., " - "Spanish Localization Team, " "Odoo Community Association (OCA)", - 'version': '10.0.1.0.0', - 'depends': ['point_of_sale'], - 'license': 'AGPL-3', - 'data': [ - 'views/pos_templates.xml', - 'views/pos_views.xml', + "website": "https://github.com/OCA/l10n-spain", + "license": "AGPL-3", + "version": "11.0.1.0.0", + "depends": [ + "point_of_sale", + ], + "data": [ + "views/pos_templates.xml", + "views/pos_views.xml", ], "qweb": [ - 'static/src/xml/pos.xml', + "static/src/xml/pos.xml", ], "installable": True, + "post_init_hook": "post_init_hook", + "uninstall_hook": "uninstall_hook", } diff --git a/l10n_es_pos/hooks.py b/l10n_es_pos/hooks.py new file mode 100644 index 00000000000..44383089807 --- /dev/null +++ b/l10n_es_pos/hooks.py @@ -0,0 +1,37 @@ +# Copyright 2018 David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, SUPERUSER_ID + + +def post_init_hook(cr, registry, vals=None): + """For brand new installations""" + env = api.Environment(cr, SUPERUSER_ID, {}) + IrSequence = env['ir.sequence'] + pos_config = env['pos.config'].search([ + ('l10n_es_simplified_invoice_sequence_id', '=', False)]) + pos_name_dupes = {} + vals = {} if vals is None else vals + for pos in pos_config: + pos_name_dupes.setdefault(pos.name, -1) + pos_name_dupes[pos.name] += 1 + pos_vals = vals.get(pos, {}) + pos_name = (pos.name if not pos_name_dupes[pos.name] else + "%s_%d" % (pos.name, pos_name_dupes[pos.name])) + pos.l10n_es_simplified_invoice_sequence_id = IrSequence.create({ + 'name': ( + pos.with_context({'lang': env.user.lang}) + ._get_l10n_es_sequence_name() % pos_name), + 'prefix': pos_vals.get('prefix', "%s%s" % + (pos_name, pos._get_default_prefix())), + 'padding': pos_vals.get('padding', pos._get_default_padding()), + 'implementation': pos_vals.get('implementation', 'no_gap'), + 'code': 'pos.config.simplified_invoice', + 'company_id': pos_vals.get('company_id', pos.company_id.id), + }) + + +def uninstall_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) + env['ir.sequence'].search([ + ('code', '=', 'pos.config.simplified_invoice')]).unlink() diff --git a/l10n_es_pos/i18n/cs.po b/l10n_es_pos/i18n/cs.po deleted file mode 100644 index 902627b19c0..00000000000 --- a/l10n_es_pos/i18n/cs.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Czech (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Faktura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Zaúčtováno" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/en_US.po b/l10n_es_pos/i18n/en_US.po deleted file mode 100644 index 1b4c827f64b..00000000000 --- a/l10n_es_pos/i18n/en_US.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-10-27 00:56+0000\n" -"PO-Revision-Date: 2017-09-30 10:34+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: English (United States) (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/en_US/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: en_US\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Invoice" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index b36c11735ae..004cb9ad2fa 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -4,18 +4,48 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-03-25 20:05+0000\n" -"PO-Revision-Date: 2018-03-25 22:08+0200\n" -"Last-Translator: Ignacio Ibeas - Acysos S.L. \n" +"POT-Creation-Date: 2018-04-12 14:13+0000\n" +"PO-Revision-Date: 2018-04-12 14:13+0000\n" +"Last-Translator: <>\n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Transfer-Encoding: \n" "Plural-Forms: \n" -"Language: es\n" -"X-Generator: Poedit 1.8.7.1\n" + +#. module: l10n_es_pos +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Above this limit the simplified invoice won't be made" +msgstr "Por encima de este límite no se creará factura simplificada" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:70 +#, python-format +msgid "Address:" +msgstr "Dirección:" + +#. module: l10n_es_pos +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_sequence_id +msgid "Autogenerate for each POS created" +msgstr "Autogenerada por cada TPV creado" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#, python-format +msgid "Customer data" +msgstr "Datos de cliente" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:28 +#, python-format +msgid "Customer:" +msgstr "Cliente:" #. module: l10n_es_pos #: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice @@ -23,56 +53,164 @@ msgid "Invoices" msgstr "Facturas" #. module: l10n_es_pos -#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_simplified_invoice_limit +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#, python-format +msgid "Name:" +msgstr "Nombre:" + +#. module: l10n_es_pos +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_limit msgid "Over this amount is not legally posible to create a simplified invoice" msgstr "Por encima de esta cantidad no es legal crear una factura simplificada" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order msgid "Point of Sale Orders" -msgstr "Pedidos del TPV" +msgstr "Pedidos del Punto de Venta" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simplified_invoice_limit +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 +#, python-format +msgid "Product" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 +#, python-format +msgid "Qty" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Set simplified invoice sequence for this POS" +msgstr "Establecer secuencia de factura simplificada para este TPV" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_limit msgid "Sim.Inv limit amount" -msgstr "Límite factura simplificada" +msgstr "Límite de factura simplificada" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simple_invoice_number +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_number msgid "Sim.Inv number" -msgstr "Número factura simplificada" +msgstr "Número de factura simplificada" + +#. module: l10n_es_pos +#: code:addons/l10n_es_pos/models/pos_config.py:65 +#: code:addons/l10n_es_pos/models/pos_config.py:110 +#, python-format +msgid "Simplified Invoice %s" +msgstr "Factura simplificada %s" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simple_invoice_padding -msgid "Sim.Inv padding" -msgstr "Espaciado factura simplificada" +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_sequence_id +msgid "Simplified Invoice IDs Sequence" +msgstr "Secuencia de Factura Simplificada" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_simple_invoice_prefix -msgid "Sim.Inv prefix" -msgstr "Prefijo factura simplificada" +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Simplified Invoice Limit" +msgstr "Límite de Factura Simplificada" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_simplified_invoice +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Simplified Invoice Sequence" +msgstr "Secuencia de Factura Simplificada" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_padding +msgid "Simplified Invoice padding" +msgstr "Relleno de Factura Simplificada" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_prefix +msgid "Simplified Invoice prefix" +msgstr "Prefijo de Factura Simplificada" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:60 +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_l10n_es_simplified_invoice_number +#, python-format msgid "Simplified invoice" msgstr "Factura simplificada" +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:7 +#, python-format +msgid "Simplified invoice:" +msgstr "Factura Simplificada:" + #. module: l10n_es_pos #: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice msgid "Simplified invoices" -msgstr "Factura simplificada" +msgstr "Facturas simplificadas" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form -msgid "Spanish Legislation" -msgstr "Legislación española" +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:44 +#, python-format +msgid "Subt" +msgstr "" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form -msgid "TPVXXX#" -msgstr "TPVXXX#" +#: code:addons/l10n_es_pos/models/ir_sequence.py:20 +#, python-format +msgid "" +"There is already a simplified invoice sequence with that prefix and it " +"should be unique." +msgstr "" +"Ya existe una secuencia de Factura Simplificada con ese prefijo y este " +"debería ser único." + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 +#, python-format +msgid "Unit" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_iface_l10n_es_simplified_invoice +msgid "Use simplified invoices for this POS" +msgstr "Usar Facturas Simplificadas en este Punto de Venta" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:30 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 +#, python-format +msgid "VAT:" +msgstr "NIF/CIF:" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_ir_sequence +msgid "ir.sequence" +msgstr "ir.sequence" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:52 +#, python-format +msgid "on" +msgstr "sobre" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_config msgid "pos.config" -msgstr "Configuración del TPV" +msgstr "pos.config" + +#~ msgid "" +#~ "There's already another POS config using the same Simplified Invoice " +#~ "prefix. Try choosing another POS Name" +#~ msgstr "" +#~ "Ya existe otro TPV utilizando el mismo prefijo de Factura Simplifica. " +#~ "Escoge otro nombre de Punto de Venta" + +#~ msgid "You need to define a simplified invoice prefix." +#~ msgstr "Debes definir un prefijo de Factura Simplificada." diff --git a/l10n_es_pos/i18n/es_CR.po b/l10n_es_pos/i18n/es_CR.po deleted file mode 100644 index bdab427e973..00000000000 --- a/l10n_es_pos/i18n/es_CR.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Spanish (Costa Rica) (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/es_CR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es_CR\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Factura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Contabilizado" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/fr.po b/l10n_es_pos/i18n/fr.po deleted file mode 100644 index 7b02035db6d..00000000000 --- a/l10n_es_pos/i18n/fr.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: French (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "Adresse:" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Facture" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "Factures" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "Veuillez sélectionner un client pour cette commande. Ceci peut être fait en cliquant sur l'onglet commande" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "Point de vente" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Comptabilisé" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/hr.po b/l10n_es_pos/i18n/hr.po deleted file mode 100644 index 34810e99e6b..00000000000 --- a/l10n_es_pos/i18n/hr.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Croatian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/hr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: hr\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Račun" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Proknjiženo" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/l10n_es_pos.pot b/l10n_es_pos/i18n/l10n_es_pos.pot new file mode 100644 index 00000000000..d9021340b5a --- /dev/null +++ b/l10n_es_pos/i18n/l10n_es_pos.pot @@ -0,0 +1,200 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \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: l10n_es_pos +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Above this limit the simplified invoice won't be made" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:70 +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_sequence_id +msgid "Autogenerate for each POS created" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:28 +#, python-format +msgid "Customer:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_limit +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale Orders" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 +#, python-format +msgid "Product" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 +#, python-format +msgid "Qty" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Set simplified invoice sequence for this POS" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_limit +msgid "Sim.Inv limit amount" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_number +msgid "Sim.Inv number" +msgstr "" + +#. module: l10n_es_pos +#: code:addons/l10n_es_pos/models/pos_config.py:65 +#: code:addons/l10n_es_pos/models/pos_config.py:110 +#, python-format +msgid "Simplified Invoice %s" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_sequence_id +msgid "Simplified Invoice IDs Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Simplified Invoice Limit" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +msgid "Simplified Invoice Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_padding +msgid "Simplified Invoice padding" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_prefix +msgid "Simplified Invoice prefix" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:60 +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_l10n_es_simplified_invoice_number +#, python-format +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:7 +#, python-format +msgid "Simplified invoice:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:44 +#, python-format +msgid "Subt" +msgstr "" + +#. module: l10n_es_pos +#: code:addons/l10n_es_pos/models/ir_sequence.py:20 +#, python-format +msgid "There is already a simplified invoice sequence with that prefix and it should be unique." +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 +#, python-format +msgid "Unit" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_iface_l10n_es_simplified_invoice +msgid "Use simplified invoices for this POS" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:30 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_ir_sequence +msgid "ir.sequence" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:52 +#, python-format +msgid "on" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_config +msgid "pos.config" +msgstr "" + diff --git a/l10n_es_pos/i18n/nl.po b/l10n_es_pos/i18n/nl.po deleted file mode 100644 index 1f67d953fc9..00000000000 --- a/l10n_es_pos/i18n/nl.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Dutch (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/nl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: nl\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Factuur" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Geboekt" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/pl.po b/l10n_es_pos/i18n/pl.po deleted file mode 100644 index 90f17adced6..00000000000 --- a/l10n_es_pos/i18n/pl.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-24 02:59+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Polish (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/pl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: pl\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Faktura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/pt.po b/l10n_es_pos/i18n/pt.po deleted file mode 100644 index ad52ad46b8d..00000000000 --- a/l10n_es_pos/i18n/pt.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Portuguese (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/pt/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: pt\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Fatura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Publicado" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/pt_BR.po b/l10n_es_pos/i18n/pt_BR.po deleted file mode 100644 index 05eda2640ef..00000000000 --- a/l10n_es_pos/i18n/pt_BR.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/pt_BR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: pt_BR\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Fatura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Lançado" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/ru.po b/l10n_es_pos/i18n/ru.po deleted file mode 100644 index 2141b0a498c..00000000000 --- a/l10n_es_pos/i18n/ru.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-06 03:17+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Russian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Счет" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "Счета" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Проведено" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/sl.po b/l10n_es_pos/i18n/sl.po deleted file mode 100644 index fee24662613..00000000000 --- a/l10n_es_pos/i18n/sl.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-27 00:52+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/sl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Račun" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "Računi" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Knjiženo" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "display:none;" diff --git a/l10n_es_pos/i18n/sv.po b/l10n_es_pos/i18n/sv.po deleted file mode 100644 index 843423cbcc9..00000000000 --- a/l10n_es_pos/i18n/sv.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Swedish (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/sv/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: sv\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Faktura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "Sparad" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/i18n/tr.po b/l10n_es_pos/i18n/tr.po deleted file mode 100644 index 03faf72dc1b..00000000000 --- a/l10n_es_pos/i18n/tr.po +++ /dev/null @@ -1,117 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * l10n_es_pos -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: l10n-spain (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-29 02:57+0000\n" -"PO-Revision-Date: 2015-09-25 13:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: Turkish (http://www.transifex.com/oca/OCA-l10n-spain-8-0/language/tr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: tr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:15 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Address:" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:99 -#, python-format -msgid "An anonymous order cannot be invoiced" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Customer data" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "Invoice" -msgstr "Fatura" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "Name:" -msgstr "" - -#. module: l10n_es_pos -#: help:pos.config,simplified_invoice_limit:0 -msgid "Over this amount is not legally posible to create a simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/js/main.js:100 -#, python-format -msgid "" -"Please select a client for this order. This can be done by clicking the " -"order tab" -msgstr "" - -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_order -msgid "Point of Sale" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Posted" -msgstr "İşlenmiş" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_tree -msgid "Simplified" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.order,simplified:0 view:website:point_of_sale.report_receipt -msgid "Simplified invoice" -msgstr "" - -#. module: l10n_es_pos -#: field:pos.config,simplified_invoice_limit:0 -msgid "Simplified invoice limit" -msgstr "" - -#. module: l10n_es_pos -#: view:pos.order:l10n_es_pos.view_pos_order_filter -msgid "Simplified invoices" -msgstr "" - -#. module: l10n_es_pos -#. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:8 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:14 -#: view:website:point_of_sale.report_receipt -#, python-format -msgid "VAT:" -msgstr "" - -#. module: l10n_es_pos -#: view:website:point_of_sale.report_receipt -msgid "display:none;" -msgstr "" diff --git a/l10n_es_pos/migrations/11.0.1.0.0/post-migrate.py b/l10n_es_pos/migrations/11.0.1.0.0/post-migrate.py new file mode 100644 index 00000000000..b04b0108309 --- /dev/null +++ b/l10n_es_pos/migrations/11.0.1.0.0/post-migrate.py @@ -0,0 +1,18 @@ +# Copyright 2018 David Vidal +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from openupgradelib import openupgrade +from odoo.addons.l10n_es_pos.hooks import post_init_hook + + +@openupgrade.migrate() +def migrate(env, version): + pos_config = env['pos.config'].search([]) + vals = {} + for pos in pos_config: + vals[pos] = { + 'padding': pos.simple_invoice_prefix, + 'prefix': pos.simple_invoice_prefix, + 'number_next_actual': pos.simple_invoice_number, + } + post_init_hook(env.cr, False, vals) diff --git a/l10n_es_pos/models/__init__.py b/l10n_es_pos/models/__init__.py index ba84f431a32..2946f4671bd 100644 --- a/l10n_es_pos/models/__init__.py +++ b/l10n_es_pos/models/__init__.py @@ -1,24 +1,4 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright 2017 - Aselcis Consulting (http://www.aselcis.com) -# - David Gómez -# - Miguel Paraíso -# -# 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 pos \ No newline at end of file +from . import ir_sequence +from . import pos_config +from . import pos_order diff --git a/l10n_es_pos/models/ir_sequence.py b/l10n_es_pos/models/ir_sequence.py new file mode 100644 index 00000000000..ccdd8a4def4 --- /dev/null +++ b/l10n_es_pos/models/ir_sequence.py @@ -0,0 +1,22 @@ +# Copyright 2018 David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, models +from odoo.exceptions import UserError + + +class IrSequence(models.Model): + _inherit = 'ir.sequence' + + @api.constrains('prefix', 'code') + def check_simplified_invoice_unique_prefix(self): + if self._context.get('copy_pos_config'): + return + for sequence in self.filtered( + lambda x: x.code == 'pos.config.simplified_invoice'): + if self.search_count([ + ('code', '=', 'pos.config.simplified_invoice'), + ('prefix', '=', sequence.prefix)]) > 1: + raise UserError(_('There is already a simplified invoice ' + 'sequence with that prefix and it should be ' + 'unique.')) diff --git a/l10n_es_pos/models/pos.py b/l10n_es_pos/models/pos.py deleted file mode 100644 index 9f4f19bbe6e..00000000000 --- a/l10n_es_pos/models/pos.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright 2017 - Aselcis Consulting (http://www.aselcis.com) -# - David Gómez -# - Miguel Paraíso -# -# 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 odoo import models, fields, api, _ -import odoo.addons.decimal_precision as dp -from odoo.tools import float_compare -from odoo.exceptions import UserError - - -class PosOrder(models.Model): - _inherit = 'pos.order' - - simplified_invoice = fields.Char('Simplified invoice', copy=False) - - @api.model - def simplified_limit_check(self, pos_order): - limit = self.env['pos.session'].browse( - pos_order['pos_session_id']).config_id.simplified_invoice_limit - precision_digits = dp.get_precision('Account')(self.env.cr)[1] - # -1 or 0: amount_total <= limit, simplified - # 1: amount_total > limit, can not be simplified - return float_compare(pos_order['amount_total'], limit, - precision_digits=precision_digits) < 0 - - @api.model - def _process_order(self, pos_order): - order = super(PosOrder, self)._process_order(pos_order) - simplified = self.simplified_limit_check(pos_order) - if simplified: - config = order.session_id.config_id - if config.simple_invoice_prefix: - config.set_next_simple_invoice_number( - pos_order.get('simplified_invoice', - config.simple_invoice_prefix + '1')) - order.write({ - 'simplified_invoice': pos_order.get('simplified_invoice', ''), - }) - else: - raise UserError(_('You need to define a simplified invoice ' - 'prefix.')) - return order - - -class PosConfig(models.Model): - _inherit = 'pos.config' - - simple_invoice_prefix = fields.Char('Sim.Inv prefix', copy=False) - simple_invoice_padding = fields.Integer('Sim.Inv padding', default=4) - simple_invoice_number = fields.Integer('Sim.Inv number', default=0, - copy=False, readonly=True) - simplified_invoice_limit = fields.Float(string='Sim.Inv limit amount', - digits=dp.get_precision('Account'), - help='Over this amount is not ' - 'legally posible to create a ' - 'simplified invoice', - default=3000) - - @api.model - def create(self, vals): - self.check_simple_inv_prefix(vals.get('simple_invoice_prefix', False)) - return super(PosConfig, self).create(vals) - - @api.multi - def write(self, vals): - self.check_simple_inv_prefix(vals.get('simple_invoice_prefix', False)) - return super(PosConfig, self).write(vals) - - def check_simple_inv_prefix(self, prefix): - if prefix: - configs = self.search([('simple_invoice_prefix', '=', prefix)]) - if len(configs) > 0: - raise UserError(_( - 'Already exists other POS config with the same Sim.Inv ' - 'prefix. You should change this field value.')) - - def set_next_simple_invoice_number(self, order_number): - # Fix generated orders with empty simplified invoice prefix - if 'false' in order_number: - order_number = order_number.replace('false', - self.simple_invoice_prefix) - number = int(order_number.replace(self.simple_invoice_prefix, '')) - if number > self.simple_invoice_number: - self.write({'simple_invoice_number': number}) diff --git a/l10n_es_pos/models/pos_config.py b/l10n_es_pos/models/pos_config.py new file mode 100644 index 00000000000..8aa56bf7685 --- /dev/null +++ b/l10n_es_pos/models/pos_config.py @@ -0,0 +1,110 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models +import odoo.addons.decimal_precision as dp + + +class PosConfig(models.Model): + _inherit = 'pos.config' + + @api.depends('l10n_es_simplified_invoice_sequence_id.number_next_actual', + 'l10n_es_simplified_invoice_sequence_id.prefix', + 'l10n_es_simplified_invoice_sequence_id.padding') + def _compute_simplified_invoice_sequence(self): + for pos in self: + pos.l10n_es_simplified_invoice_number = ( + pos.l10n_es_simplified_invoice_sequence_id.number_next_actual) + pos.l10n_es_simplified_invoice_prefix = ( + pos.l10n_es_simplified_invoice_sequence_id + ._get_prefix_suffix()[0]) + pos.l10n_es_simplified_invoice_padding = ( + pos.l10n_es_simplified_invoice_sequence_id.padding) + + iface_l10n_es_simplified_invoice = fields.Boolean( + string='Use simplified invoices for this POS', + ) + l10n_es_simplified_invoice_sequence_id = fields.Many2one( + 'ir.sequence', + string='Simplified Invoice IDs Sequence', + help="Autogenerate for each POS created", + copy=False, + readonly=True, + ) + l10n_es_simplified_invoice_limit = fields.Float( + string='Sim.Inv limit amount', + digits=dp.get_precision('Account'), + help='Over this amount is not legally posible to create ' + 'a simplified invoice', + default=3000, # Spanish legal limit + oldname='simplified_invoice_limit', + ) + l10n_es_simplified_invoice_prefix = fields.Char( + 'Simplified Invoice prefix', + readonly=True, + compute='_compute_simplified_invoice_sequence', + olname='simple_invoice_prefix', + ) + l10n_es_simplified_invoice_padding = fields.Integer( + 'Simplified Invoice padding', + readonly=True, + compute='_compute_simplified_invoice_sequence', + oldname='simple_invoice_limit', + ) + l10n_es_simplified_invoice_number = fields.Integer( + 'Sim.Inv number', + readonly=True, + compute='_compute_simplified_invoice_sequence', + oldname='simple_invoice_number', + ) + + @api.model + def create(self, vals): + # Auto create simp. inv. sequence + prefix = "%s%s" % (vals['name'], self._get_default_prefix()) + simp_inv_seq_id = self.env['ir.sequence'].create({ + 'name': _('Simplified Invoice %s') % vals['name'], + 'implementation': 'no_gap', + 'padding': self._get_default_padding(), + 'prefix': prefix, + 'code': 'pos.config.simplified_invoice', + 'company_id': vals.get('company_id', False), + }) + vals['l10n_es_simplified_invoice_sequence_id'] = simp_inv_seq_id.id + return super(PosConfig, self).create(vals) + + def copy(self, default=None): + ctx = dict(self._context) + ctx.update(copy_pos_config=True) + return super(PosConfig, self.with_context(ctx)).copy(default) + + def write(self, vals): + if not self._context.get('copy_pos_config') and 'name' not in vals: + for pos in self: + pos.l10n_es_simplified_invoice_sequence_id\ + .check_simplified_invoice_unique_prefix() + if 'name' in vals: + prefix = self.l10n_es_simplified_invoice_prefix.replace( + self.name, vals['name']) + if prefix != self.l10n_es_simplified_invoice_prefix: + self.l10n_es_simplified_invoice_sequence_id.update({ + 'prefix': prefix, + 'name': (self.l10n_es_simplified_invoice_sequence_id + .name.replace(self.name, vals['name'])), + }) + return super(PosConfig, self).write(vals) + + def unlink(self): + self.mapped('l10n_es_simplified_invoice_sequence_id').unlink() + return super(PosConfig, self).unlink() + + def _get_default_padding(self): + return self.env['ir.config_parameter'].get_param( + 'l10n_es_pos.simplified_invoice_sequence.padding', 4) + + def _get_default_prefix(self): + return self.env['ir.config_parameter'].get_param( + 'l10n_es_pos.simplified_invoice_sequence.prefix', '') + + def _get_l10n_es_sequence_name(self): + """HACK: This is done for getting the proper translation.""" + return _('Simplified Invoice %s') diff --git a/l10n_es_pos/models/pos_order.py b/l10n_es_pos/models/pos_order.py new file mode 100644 index 00000000000..0513427a7d7 --- /dev/null +++ b/l10n_es_pos/models/pos_order.py @@ -0,0 +1,52 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models +import odoo.addons.decimal_precision as dp +from odoo.tools import float_compare + + +class PosOrder(models.Model): + _inherit = 'pos.order' + + l10n_es_simplified_invoice_number = fields.Char( + 'Simplified invoice', + copy=False, + oldname='simplified_invoice', + ) + + @api.model + def _simplified_limit_check(self, amount_total, limit=3000): + precision_digits = dp.get_precision('Account')(self.env.cr)[1] + # -1 or 0: amount_total <= limit, simplified + # 1: amount_total > limit, can not be simplified + return float_compare( + amount_total, limit, precision_digits=precision_digits) < 0 + + @api.model + def _order_fields(self, ui_order): + res = super(PosOrder, self)._order_fields(ui_order) + res.update({ + 'l10n_es_simplified_invoice_number': ui_order.get( + 'simplified_invoice', ''), + }) + return res + + @api.model + def _process_order(self, pos_order): + simplified_invoice_number = pos_order.get('simplified_invoice', '') + if not simplified_invoice_number: + return super(PosOrder, self)._process_order(pos_order) + pos_order_obj = self.env['pos.order'] + pos = self.env['pos.session'].browse( + pos_order.get('pos_session_id')).config_id + if pos_order_obj._simplified_limit_check( + pos_order.get('amount_total'), + pos.l10n_es_simplified_invoice_limit): + pos_order.update({ + 'l10n_es_simplified_invoice_number': simplified_invoice_number, + }) + sequence = pos.l10n_es_simplified_invoice_sequence_id + sequence.number_next_actual = int( + simplified_invoice_number.replace( + pos.l10n_es_simplified_invoice_prefix, '')) + 1 + return super(PosOrder, self)._process_order(pos_order) diff --git a/l10n_es_pos/static/description/icon.png b/l10n_es_pos/static/description/icon.png index cae1c525c468f4f7bac64d336ef26af58c66e2d7..4fea0817b01cfb7445b5072f7b2d0c644809f382 100644 GIT binary patch literal 4338 zcmcIoXH=6}wbx<7KVp1sfB`#H~9XYaM%n)pLPO0RLahTXhFQKF<0le#-*f`-{l8QpDhU=lkiIfS2`%)2OFPk-jkczFcA>+AT4T(Nz!@>oVN;n-mU20Du z+}S=WARrOL+6(!dBZ&>E^qgEe(BMt@8fLn$lK`Ux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$V4+Mdc9S~qcyto_b z!^FCW= zGMutFj|jmlR51ar&pS@yAD34CYL8q2sj*hiLauhoHlTNwE+ffU<3v0pV1y9YoB(IP zJh2B0|DFtZs}jeo33R(G_(&0Qx3^U|#=3j?cJJ54RQtj1}wDZRM6Z+AMnP rU18SJ6z##K(S-behhyfCj}+}TyBmp;S~-|Y$5?7g+KN>$i;w>Ym69PN diff --git a/l10n_es_pos/static/src/js/models.js b/l10n_es_pos/static/src/js/models.js index cb535dfe0fa..4893bd0420f 100644 --- a/l10n_es_pos/static/src/js/models.js +++ b/l10n_es_pos/static/src/js/models.js @@ -1,34 +1,12 @@ -/**************************************************************************** - * - * OpenERP, Open Source Management Solution - * Copyright (C) 2016 Aselcis Consulting (http://www.aselcis.com). All Rights Reserved - * Copyright (C) 2016 David Gómez Quilón (http://www.aselcis.com). All Rights Reserved - * - * 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 . - * - ******************************************************************************/ +/* Copyright 2016 David Gómez Quilón + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +*/ odoo.define('l10n_es_pos.models', function (require) { "use strict"; - var ajax = require('web.ajax'); - var core = require('web.core'); var models = require('point_of_sale.models'); - var Model = require('web.DataModel'); - var QWeb = core.qweb; - var _t = core._t; - var exports = {}; + var pos_super = models.PosModel.prototype; models.PosModel = models.PosModel.extend({ @@ -37,18 +15,14 @@ odoo.define('l10n_es_pos.models', function (require) { this.pushed_simple_invoices = []; return this; }, - after_load_server_data: function () { - ++this.config.simple_invoice_number; - return pos_super.after_load_server_data.apply(this, arguments); - }, get_simple_inv_next_number: function () { - if (this.pushed_simple_invoices.indexOf(this.config.simple_invoice_number) > -1) { - ++this.config.simple_invoice_number; + if (this.pushed_simple_invoices.indexOf(this.config.l10n_es_simplified_invoice_number) > -1) { + ++this.config.l10n_es_simplified_invoice_number; } - return this.config.simple_invoice_prefix+this.get_padding_simple_inv(this.config.simple_invoice_number); + return this.config.l10n_es_simplified_invoice_prefix+this.get_padding_simple_inv(this.config.l10n_es_simplified_invoice_number); }, get_padding_simple_inv: function (number) { - var diff = this.config.simple_invoice_padding - number.toString().length; + var diff = this.config.l10n_es_simplified_invoice_padding - number.toString().length; var result = ''; if (diff <= 0) { result = number; @@ -58,25 +32,22 @@ odoo.define('l10n_es_pos.models', function (require) { } result += number; } - return result; }, push_simple_invoice: function (order) { if (this.pushed_simple_invoices.indexOf(order.data.simplified_invoice) === -1) { this.pushed_simple_invoices.push(order.data.simplified_invoice); - ++this.config.simple_invoice_number; + ++this.config.l10n_es_simplified_invoice_number; } }, _flush_orders: function (orders, options) { var self = this; - // Save pushed orders numbers _.each(orders, function (order) { if (!order.data.to_invoice) { self.push_simple_invoice(order); } }); - return pos_super._flush_orders.apply(this, arguments); } }); @@ -86,6 +57,23 @@ odoo.define('l10n_es_pos.models', function (require) { set_simple_inv_number: function () { this.simplified_invoice = this.pos.get_simple_inv_next_number(); }, + get_base_by_tax: function () { + var base_by_tax = {}; + this.get_orderlines().forEach(function (line) { + var tax_detail = line.get_tax_details(); + var base_price = line.get_price_without_tax(); + if (tax_detail) { + Object.keys(tax_detail).forEach(function (tax) { + if (Object.keys(base_by_tax).includes(tax)) { + base_by_tax[tax] += base_price; + } else { + base_by_tax[tax] = base_price; + } + }); + } + }); + return base_by_tax; + }, init_from_JSON: function (json) { order_super.init_from_JSON.apply(this, arguments); this.to_invoice = json.to_invoice; @@ -103,5 +91,4 @@ odoo.define('l10n_es_pos.models', function (require) { models.load_fields('res.company', ['street', 'city', 'state_id', 'zip']); - return exports; }); diff --git a/l10n_es_pos/static/src/js/screens.js b/l10n_es_pos/static/src/js/screens.js index 3f117777733..ee8eee04088 100644 --- a/l10n_es_pos/static/src/js/screens.js +++ b/l10n_es_pos/static/src/js/screens.js @@ -1,39 +1,28 @@ -/**************************************************************************** - * - * OpenERP, Open Source Management Solution - * Copyright (C) 2016 Aselcis Consulting (http://www.aselcis.com). All Rights Reserved - * Copyright (C) 2016 David Gómez Quilón (http://www.aselcis.com). All Rights Reserved - * - * 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 . - * - ******************************************************************************/ +/* Copyright 2016 David Gómez Quilón + Copyright 2018 David Vidal + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +*/ odoo.define('l10n_es_pos.screens', function (require) { "use strict"; - var core = require('web.core'); var screens = require('point_of_sale.screens'); - var QWeb = core.qweb; - var _t = core._t; - var exports = {}; + screens.PaymentScreenWidget.include({ validate_order: function (force_validate) { - this.pos.get_order().set_simple_inv_number(); + var below_limit = this.pos.get_order().get_total_with_tax() <= this.pos.config.l10n_es_simplified_invoice_limit; + if (this.pos.config.iface_l10n_es_simplified_invoice) { + var order = this.pos.get_order(); + if (below_limit) { + order.set_simple_inv_number(); + } else { + // Force invoice above limit. Online is needed. + order.to_invoice = true; + } + } this._super(force_validate); } }); - return exports; }); diff --git a/l10n_es_pos/static/src/xml/pos.xml b/l10n_es_pos/static/src/xml/pos.xml index 14d55304fe8..10f7ab802e5 100644 --- a/l10n_es_pos/static/src/xml/pos.xml +++ b/l10n_es_pos/static/src/xml/pos.xml @@ -3,7 +3,8 @@ -
+
Simplified invoice:
@@ -35,15 +36,31 @@

+ + + Product + Qty + Unit + Subt + + + + + + + + + on + +
- Simplified invoice -
+
@@ -56,4 +73,4 @@ - \ No newline at end of file + diff --git a/l10n_es_pos/views/pos_templates.xml b/l10n_es_pos/views/pos_templates.xml index 73953d8d766..747bf223e18 100644 --- a/l10n_es_pos/views/pos_templates.xml +++ b/l10n_es_pos/views/pos_templates.xml @@ -1,13 +1,11 @@ - - + - diff --git a/l10n_es_pos/views/pos_views.xml b/l10n_es_pos/views/pos_views.xml index 420b7c424cd..40cb5f082a6 100644 --- a/l10n_es_pos/views/pos_views.xml +++ b/l10n_es_pos/views/pos_views.xml @@ -1,52 +1,79 @@ - - - - - pos.order.form - pos.order - - - - - + + + pos.order.form + pos.order + + + + - + + - - - POS Order (add filters for simplified field) - pos.order - - 20 - - - - - - + + + pos.order + + + + - + + - - - pos.config.form - pos.config - - - - - - - - - - - - + + + POS Order (add filters for simplified field) + pos.order + + 20 + + + + + + - + + + + + + pos.config.form + pos.config + + + +
+
+ +
+
+
+
+
+
+
+
+
+
+
-
From 41c077910c87e3752efa2418d9ab363a086006ec Mon Sep 17 00:00:00 2001 From: jonerikceberio Date: Mon, 9 Jul 2018 21:07:23 +0200 Subject: [PATCH 07/54] [FIX] l10n_es_pos: typo in oldname (#886) --- l10n_es_pos/__manifest__.py | 2 +- l10n_es_pos/models/pos_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index c846f0b3d7f..6120c6b9975 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -9,7 +9,7 @@ "Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-spain", "license": "AGPL-3", - "version": "11.0.1.0.0", + "version": "11.0.1.0.1", "depends": [ "point_of_sale", ], diff --git a/l10n_es_pos/models/pos_config.py b/l10n_es_pos/models/pos_config.py index 8aa56bf7685..443f837c5c6 100644 --- a/l10n_es_pos/models/pos_config.py +++ b/l10n_es_pos/models/pos_config.py @@ -42,7 +42,7 @@ def _compute_simplified_invoice_sequence(self): 'Simplified Invoice prefix', readonly=True, compute='_compute_simplified_invoice_sequence', - olname='simple_invoice_prefix', + oldname='simple_invoice_prefix', ) l10n_es_simplified_invoice_padding = fields.Integer( 'Simplified Invoice padding', From 84dd9da18b0e3f0d0a3cedc8a853ec85b574683e Mon Sep 17 00:00:00 2001 From: jonerikceberio Date: Tue, 7 Aug 2018 07:17:36 +0200 Subject: [PATCH 08/54] [IMP] l10n_es_pos: Handle the sequence properly (#902) --- l10n_es_pos/i18n/l10n_es_pos.pot | 4 ++-- l10n_es_pos/models/pos_config.py | 9 ++++----- l10n_es_pos/models/pos_order.py | 5 +---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/l10n_es_pos/i18n/l10n_es_pos.pot b/l10n_es_pos/i18n/l10n_es_pos.pot index d9021340b5a..df693dbb229 100644 --- a/l10n_es_pos/i18n/l10n_es_pos.pot +++ b/l10n_es_pos/i18n/l10n_es_pos.pot @@ -96,8 +96,8 @@ msgid "Sim.Inv number" msgstr "" #. module: l10n_es_pos -#: code:addons/l10n_es_pos/models/pos_config.py:65 -#: code:addons/l10n_es_pos/models/pos_config.py:110 +#: code:addons/l10n_es_pos/models/pos_config.py:64 +#: code:addons/l10n_es_pos/models/pos_config.py:109 #, python-format msgid "Simplified Invoice %s" msgstr "" diff --git a/l10n_es_pos/models/pos_config.py b/l10n_es_pos/models/pos_config.py index 443f837c5c6..9e322482e7d 100644 --- a/l10n_es_pos/models/pos_config.py +++ b/l10n_es_pos/models/pos_config.py @@ -12,13 +12,12 @@ class PosConfig(models.Model): 'l10n_es_simplified_invoice_sequence_id.padding') def _compute_simplified_invoice_sequence(self): for pos in self: + seq = pos.l10n_es_simplified_invoice_sequence_id pos.l10n_es_simplified_invoice_number = ( - pos.l10n_es_simplified_invoice_sequence_id.number_next_actual) + seq._get_current_sequence().number_next_actual) pos.l10n_es_simplified_invoice_prefix = ( - pos.l10n_es_simplified_invoice_sequence_id - ._get_prefix_suffix()[0]) - pos.l10n_es_simplified_invoice_padding = ( - pos.l10n_es_simplified_invoice_sequence_id.padding) + seq._get_prefix_suffix()[0]) + pos.l10n_es_simplified_invoice_padding = seq.padding iface_l10n_es_simplified_invoice = fields.Boolean( string='Use simplified invoices for this POS', diff --git a/l10n_es_pos/models/pos_order.py b/l10n_es_pos/models/pos_order.py index 0513427a7d7..c2fa6df738f 100644 --- a/l10n_es_pos/models/pos_order.py +++ b/l10n_es_pos/models/pos_order.py @@ -45,8 +45,5 @@ def _process_order(self, pos_order): pos_order.update({ 'l10n_es_simplified_invoice_number': simplified_invoice_number, }) - sequence = pos.l10n_es_simplified_invoice_sequence_id - sequence.number_next_actual = int( - simplified_invoice_number.replace( - pos.l10n_es_simplified_invoice_prefix, '')) + 1 + pos.l10n_es_simplified_invoice_sequence_id.next_by_id() return super(PosOrder, self)._process_order(pos_order) From 8399366b048f4dc5497246bdc532c34328296db0 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 5 Sep 2018 14:13:49 +0200 Subject: [PATCH 09/54] [FIX] l10n_es_pos: Import uninstall_hook --- l10n_es_pos/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_es_pos/__init__.py b/l10n_es_pos/__init__.py index c0d9f3d12f7..e1b99a7cba9 100644 --- a/l10n_es_pos/__init__.py +++ b/l10n_es_pos/__init__.py @@ -1,4 +1,4 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import models -from .hooks import post_init_hook +from .hooks import post_init_hook, uninstall_hook From 0d9b115b48e733f9170784cbd09671572eae25c2 Mon Sep 17 00:00:00 2001 From: David Vidal Date: Tue, 27 Nov 2018 10:02:16 +0100 Subject: [PATCH 10/54] [IMP] l10n_es_pos: move simpl. inv. reference to standard field (#945) This way we don't need to make glue modules over l10n_es_pos every time we need to make use of that info for a generic purpose. --- l10n_es_pos/__manifest__.py | 2 +- l10n_es_pos/i18n/es.po | 32 +++++++++---------- l10n_es_pos/i18n/l10n_es_pos.pot | 28 ++++++++-------- .../migrations/11.0.2.0.0/pre-migration.py | 29 +++++++++++++++++ l10n_es_pos/models/pos_order.py | 18 ++++++----- l10n_es_pos/static/src/js/models.js | 12 +++++-- l10n_es_pos/static/src/js/screens.js | 2 +- l10n_es_pos/static/src/xml/pos.xml | 11 +++---- l10n_es_pos/views/pos_views.xml | 11 +++---- 9 files changed, 91 insertions(+), 54 deletions(-) create mode 100644 l10n_es_pos/migrations/11.0.2.0.0/pre-migration.py diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index 6120c6b9975..e444c926bf6 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -9,7 +9,7 @@ "Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-spain", "license": "AGPL-3", - "version": "11.0.1.0.1", + "version": "11.0.2.0.0", "depends": [ "point_of_sale", ], diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index 004cb9ad2fa..8927e2d5e02 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -23,7 +23,7 @@ msgstr "Por encima de este límite no se creará factura simplificada" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:70 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 #, python-format msgid "Address:" msgstr "Dirección:" @@ -35,14 +35,14 @@ msgstr "Autogenerada por cada TPV creado" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 #, python-format msgid "Customer data" msgstr "Datos de cliente" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:28 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:27 #, python-format msgid "Customer:" msgstr "Cliente:" @@ -54,7 +54,7 @@ msgstr "Facturas" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 #, python-format msgid "Name:" msgstr "Nombre:" @@ -71,14 +71,14 @@ msgstr "Pedidos del Punto de Venta" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:40 #, python-format msgid "Product" msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 #, python-format msgid "Qty" msgstr "" @@ -99,8 +99,8 @@ msgid "Sim.Inv number" msgstr "Número de factura simplificada" #. module: l10n_es_pos -#: code:addons/l10n_es_pos/models/pos_config.py:65 -#: code:addons/l10n_es_pos/models/pos_config.py:110 +#: code:addons/l10n_es_pos/models/pos_config.py:64 +#: code:addons/l10n_es_pos/models/pos_config.py:109 #, python-format msgid "Simplified Invoice %s" msgstr "Factura simplificada %s" @@ -132,8 +132,8 @@ msgstr "Prefijo de Factura Simplificada" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:60 -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_l10n_es_simplified_invoice_number +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:59 +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_is_l10n_es_simplified_invoice #, python-format msgid "Simplified invoice" msgstr "Factura simplificada" @@ -152,7 +152,7 @@ msgstr "Facturas simplificadas" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:44 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 #, python-format msgid "Subt" msgstr "" @@ -169,7 +169,7 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 #, python-format msgid "Unit" msgstr "" @@ -181,9 +181,9 @@ msgstr "Usar Facturas Simplificadas en este Punto de Venta" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:30 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:12 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:29 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 #, python-format msgid "VAT:" msgstr "NIF/CIF:" @@ -195,7 +195,7 @@ msgstr "ir.sequence" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:52 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:51 #, python-format msgid "on" msgstr "sobre" diff --git a/l10n_es_pos/i18n/l10n_es_pos.pot b/l10n_es_pos/i18n/l10n_es_pos.pot index df693dbb229..eff32f04369 100644 --- a/l10n_es_pos/i18n/l10n_es_pos.pot +++ b/l10n_es_pos/i18n/l10n_es_pos.pot @@ -20,7 +20,7 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:70 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 #, python-format msgid "Address:" msgstr "" @@ -32,14 +32,14 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 #, python-format msgid "Customer data" msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:28 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:27 #, python-format msgid "Customer:" msgstr "" @@ -51,7 +51,7 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 #, python-format msgid "Name:" msgstr "" @@ -68,14 +68,14 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:40 #, python-format msgid "Product" msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 #, python-format msgid "Qty" msgstr "" @@ -129,8 +129,8 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:60 -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_l10n_es_simplified_invoice_number +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:59 +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_is_l10n_es_simplified_invoice #, python-format msgid "Simplified invoice" msgstr "" @@ -149,7 +149,7 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:44 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 #, python-format msgid "Subt" msgstr "" @@ -162,7 +162,7 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 #, python-format msgid "Unit" msgstr "" @@ -174,9 +174,9 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:13 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:30 -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:12 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:29 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 #, python-format msgid "VAT:" msgstr "" @@ -188,7 +188,7 @@ msgstr "" #. module: l10n_es_pos #. openerp-web -#: code:addons/l10n_es_pos/static/src/xml/pos.xml:52 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:51 #, python-format msgid "on" msgstr "" diff --git a/l10n_es_pos/migrations/11.0.2.0.0/pre-migration.py b/l10n_es_pos/migrations/11.0.2.0.0/pre-migration.py new file mode 100644 index 00000000000..796c3786063 --- /dev/null +++ b/l10n_es_pos/migrations/11.0.2.0.0/pre-migration.py @@ -0,0 +1,29 @@ +# Copyright 2018 David Vidal +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +def migrate(cr, version): + if not version: + return + # Add new column in advance + cr.execute(""" + ALTER TABLE pos_order + ADD COLUMN is_l10n_es_simplified_invoice BOOLEAN; + """) + # If migrated directly from 10.0.1.0.0 + simplified_invoice_field = 'simplified_invoice' + cr.execute(""" + SELECT column_name + FROM information_schema.columns + WHERE table_name='pos_order' AND column_name='simplified_invoice'; + """) + # Otherwise it's migrated from 11.0.1.0.0 + if not cr.fetchone(): + simplified_invoice_field = 'l10n_es_simplified_invoice_number' + # Move simplified invoice info to pos_reference field. + cr.execute(""" + UPDATE pos_order SET + pos_reference = %(s)s, + is_l10n_es_simplified_invoice = TRUE + WHERE COALESCE(%(s)s, '') <> ''; + """ % {'s': simplified_invoice_field}) diff --git a/l10n_es_pos/models/pos_order.py b/l10n_es_pos/models/pos_order.py index c2fa6df738f..3df43c77e06 100644 --- a/l10n_es_pos/models/pos_order.py +++ b/l10n_es_pos/models/pos_order.py @@ -8,10 +8,10 @@ class PosOrder(models.Model): _inherit = 'pos.order' - l10n_es_simplified_invoice_number = fields.Char( + is_l10n_es_simplified_invoice = fields.Boolean( 'Simplified invoice', copy=False, - oldname='simplified_invoice', + default=False, ) @api.model @@ -25,15 +25,16 @@ def _simplified_limit_check(self, amount_total, limit=3000): @api.model def _order_fields(self, ui_order): res = super(PosOrder, self)._order_fields(ui_order) - res.update({ - 'l10n_es_simplified_invoice_number': ui_order.get( - 'simplified_invoice', ''), - }) + if ui_order.get('simplified_invoice', False): + res.update({ + 'pos_reference': ui_order['simplified_invoice'], + 'is_l10n_es_simplified_invoice': True, + }) return res @api.model def _process_order(self, pos_order): - simplified_invoice_number = pos_order.get('simplified_invoice', '') + simplified_invoice_number = pos_order.get('simplified_invoice', False) if not simplified_invoice_number: return super(PosOrder, self)._process_order(pos_order) pos_order_obj = self.env['pos.order'] @@ -43,7 +44,8 @@ def _process_order(self, pos_order): pos_order.get('amount_total'), pos.l10n_es_simplified_invoice_limit): pos_order.update({ - 'l10n_es_simplified_invoice_number': simplified_invoice_number, + 'pos_reference': simplified_invoice_number, + 'is_l10n_es_simplified_invoice': True, }) pos.l10n_es_simplified_invoice_sequence_id.next_by_id() return super(PosOrder, self)._process_order(pos_order) diff --git a/l10n_es_pos/static/src/js/models.js b/l10n_es_pos/static/src/js/models.js index 4893bd0420f..705e69b8db9 100644 --- a/l10n_es_pos/static/src/js/models.js +++ b/l10n_es_pos/static/src/js/models.js @@ -49,13 +49,21 @@ odoo.define('l10n_es_pos.models', function (require) { } }); return pos_super._flush_orders.apply(this, arguments); - } + }, }); var order_super = models.Order.prototype; models.Order = models.Order.extend({ + get_total_with_tax: function () { + var total = order_super.get_total_with_tax.apply(this, arguments); + var below_limit = total <= this.pos.config.l10n_es_simplified_invoice_limit; + this.is_simplified_invoice = below_limit && this.pos.config.iface_l10n_es_simplified_invoice; + return total; + }, set_simple_inv_number: function () { this.simplified_invoice = this.pos.get_simple_inv_next_number(); + this.name = this.simplified_invoice; + this.is_simplified_invoice = true; }, get_base_by_tax: function () { var base_by_tax = {}; @@ -86,7 +94,7 @@ odoo.define('l10n_es_pos.models', function (require) { res.simplified_invoice = this.simplified_invoice; } return res; - } + }, }); models.load_fields('res.company', ['street', 'city', 'state_id', 'zip']); diff --git a/l10n_es_pos/static/src/js/screens.js b/l10n_es_pos/static/src/js/screens.js index ee8eee04088..0bebad71ce7 100644 --- a/l10n_es_pos/static/src/js/screens.js +++ b/l10n_es_pos/static/src/js/screens.js @@ -22,7 +22,7 @@ odoo.define('l10n_es_pos.screens', function (require) { } } this._super(force_validate); - } + }, }); }); diff --git a/l10n_es_pos/static/src/xml/pos.xml b/l10n_es_pos/static/src/xml/pos.xml index 10f7ab802e5..7cbb1d15137 100644 --- a/l10n_es_pos/static/src/xml/pos.xml +++ b/l10n_es_pos/static/src/xml/pos.xml @@ -2,11 +2,10 @@ - -
- Simplified invoice: -
+ + +
Simplified invoice: +
@@ -56,7 +55,7 @@ - +
Simplified invoice
diff --git a/l10n_es_pos/views/pos_views.xml b/l10n_es_pos/views/pos_views.xml index 40cb5f082a6..411887c72a7 100644 --- a/l10n_es_pos/views/pos_views.xml +++ b/l10n_es_pos/views/pos_views.xml @@ -6,8 +6,8 @@ pos.order - - + + @@ -18,7 +18,7 @@ - + @@ -32,9 +32,8 @@ - - - + + From 3afd887275ab9b9786125a6367c855a8ec2a6ffb Mon Sep 17 00:00:00 2001 From: David Date: Mon, 3 Dec 2018 17:12:18 +0100 Subject: [PATCH 11/54] [MIG] l10n_es_pos: Migration to 12.0 --- l10n_es_pos/__manifest__.py | 2 +- l10n_es_pos/i18n/es.po | 53 ++++++++++--------- l10n_es_pos/i18n/l10n_es_pos.pot | 52 +++++++++--------- .../migrations/11.0.1.0.0/post-migrate.py | 18 ------- .../migrations/11.0.2.0.0/pre-migration.py | 29 ---------- l10n_es_pos/static/src/js/screens.js | 2 +- l10n_es_pos/views/pos_views.xml | 18 +++---- 7 files changed, 66 insertions(+), 108 deletions(-) delete mode 100644 l10n_es_pos/migrations/11.0.1.0.0/post-migrate.py delete mode 100644 l10n_es_pos/migrations/11.0.2.0.0/pre-migration.py diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index e444c926bf6..ef18f900544 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -9,7 +9,7 @@ "Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-spain", "license": "AGPL-3", - "version": "11.0.2.0.0", + "version": "12.0.1.0.0", "depends": [ "point_of_sale", ], diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index 8927e2d5e02..53b3da47a15 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -17,7 +17,7 @@ msgstr "" "Plural-Forms: \n" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Above this limit the simplified invoice won't be made" msgstr "Por encima de este límite no se creará factura simplificada" @@ -29,7 +29,7 @@ msgid "Address:" msgstr "Dirección:" #. module: l10n_es_pos -#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_sequence_id +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id msgid "Autogenerate for each POS created" msgstr "Autogenerada por cada TPV creado" @@ -48,7 +48,7 @@ msgid "Customer:" msgstr "Cliente:" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice msgid "Invoices" msgstr "Facturas" @@ -60,10 +60,16 @@ msgid "Name:" msgstr "Nombre:" #. module: l10n_es_pos -#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_limit +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit msgid "Over this amount is not legally posible to create a simplified invoice" msgstr "Por encima de esta cantidad no es legal crear una factura simplificada" +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_config +#, fuzzy +msgid "Point of Sale Configuration" +msgstr "Pedidos del Punto de Venta" + #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order msgid "Point of Sale Orders" @@ -84,17 +90,23 @@ msgid "Qty" msgstr "" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +#: model:ir.model,name:l10n_es_pos.model_ir_sequence +#, fuzzy +msgid "Sequence" +msgstr "ir.sequence" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Set simplified invoice sequence for this POS" msgstr "Establecer secuencia de factura simplificada para este TPV" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_limit +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit msgid "Sim.Inv limit amount" msgstr "Límite de factura simplificada" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_number +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_number msgid "Sim.Inv number" msgstr "Número de factura simplificada" @@ -106,34 +118,34 @@ msgid "Simplified Invoice %s" msgstr "Factura simplificada %s" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_sequence_id +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id msgid "Simplified Invoice IDs Sequence" msgstr "Secuencia de Factura Simplificada" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Simplified Invoice Limit" msgstr "Límite de Factura Simplificada" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Simplified Invoice Sequence" msgstr "Secuencia de Factura Simplificada" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_padding +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_padding msgid "Simplified Invoice padding" msgstr "Relleno de Factura Simplificada" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_prefix +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_prefix msgid "Simplified Invoice prefix" msgstr "Prefijo de Factura Simplificada" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:59 -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_is_l10n_es_simplified_invoice +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__is_l10n_es_simplified_invoice #, python-format msgid "Simplified invoice" msgstr "Factura simplificada" @@ -146,7 +158,7 @@ msgid "Simplified invoice:" msgstr "Factura Simplificada:" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice msgid "Simplified invoices" msgstr "Facturas simplificadas" @@ -175,7 +187,7 @@ msgid "Unit" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_iface_l10n_es_simplified_invoice +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__iface_l10n_es_simplified_invoice msgid "Use simplified invoices for this POS" msgstr "Usar Facturas Simplificadas en este Punto de Venta" @@ -188,11 +200,6 @@ msgstr "Usar Facturas Simplificadas en este Punto de Venta" msgid "VAT:" msgstr "NIF/CIF:" -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_ir_sequence -msgid "ir.sequence" -msgstr "ir.sequence" - #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:51 @@ -200,10 +207,8 @@ msgstr "ir.sequence" msgid "on" msgstr "sobre" -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_config -msgid "pos.config" -msgstr "pos.config" +#~ msgid "pos.config" +#~ msgstr "pos.config" #~ msgid "" #~ "There's already another POS config using the same Simplified Invoice " diff --git a/l10n_es_pos/i18n/l10n_es_pos.pot b/l10n_es_pos/i18n/l10n_es_pos.pot index eff32f04369..f19b2b539ed 100644 --- a/l10n_es_pos/i18n/l10n_es_pos.pot +++ b/l10n_es_pos/i18n/l10n_es_pos.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Above this limit the simplified invoice won't be made" msgstr "" @@ -26,7 +26,7 @@ msgid "Address:" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_sequence_id +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id msgid "Autogenerate for each POS created" msgstr "" @@ -45,7 +45,7 @@ msgid "Customer:" msgstr "" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice msgid "Invoices" msgstr "" @@ -57,10 +57,15 @@ msgid "Name:" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,help:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_limit +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit msgid "Over this amount is not legally posible to create a simplified invoice" msgstr "" +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_config +msgid "Point of Sale Configuration" +msgstr "" + #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order msgid "Point of Sale Orders" @@ -81,17 +86,22 @@ msgid "Qty" msgstr "" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +#: model:ir.model,name:l10n_es_pos.model_ir_sequence +msgid "Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Set simplified invoice sequence for this POS" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_limit +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit msgid "Sim.Inv limit amount" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_number +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_number msgid "Sim.Inv number" msgstr "" @@ -103,34 +113,34 @@ msgid "Simplified Invoice %s" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_sequence_id +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id msgid "Simplified Invoice IDs Sequence" msgstr "" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Simplified Invoice Limit" msgstr "" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Simplified Invoice Sequence" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_padding +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_padding msgid "Simplified Invoice padding" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_l10n_es_simplified_invoice_prefix +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_prefix msgid "Simplified Invoice prefix" msgstr "" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:59 -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order_is_l10n_es_simplified_invoice +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__is_l10n_es_simplified_invoice #, python-format msgid "Simplified invoice" msgstr "" @@ -143,7 +153,7 @@ msgid "Simplified invoice:" msgstr "" #. module: l10n_es_pos -#: model:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice msgid "Simplified invoices" msgstr "" @@ -168,7 +178,7 @@ msgid "Unit" msgstr "" #. module: l10n_es_pos -#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config_iface_l10n_es_simplified_invoice +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__iface_l10n_es_simplified_invoice msgid "Use simplified invoices for this POS" msgstr "" @@ -181,11 +191,6 @@ msgstr "" msgid "VAT:" msgstr "" -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_ir_sequence -msgid "ir.sequence" -msgstr "" - #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:51 @@ -193,8 +198,3 @@ msgstr "" msgid "on" msgstr "" -#. module: l10n_es_pos -#: model:ir.model,name:l10n_es_pos.model_pos_config -msgid "pos.config" -msgstr "" - diff --git a/l10n_es_pos/migrations/11.0.1.0.0/post-migrate.py b/l10n_es_pos/migrations/11.0.1.0.0/post-migrate.py deleted file mode 100644 index b04b0108309..00000000000 --- a/l10n_es_pos/migrations/11.0.1.0.0/post-migrate.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2018 David Vidal -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from openupgradelib import openupgrade -from odoo.addons.l10n_es_pos.hooks import post_init_hook - - -@openupgrade.migrate() -def migrate(env, version): - pos_config = env['pos.config'].search([]) - vals = {} - for pos in pos_config: - vals[pos] = { - 'padding': pos.simple_invoice_prefix, - 'prefix': pos.simple_invoice_prefix, - 'number_next_actual': pos.simple_invoice_number, - } - post_init_hook(env.cr, False, vals) diff --git a/l10n_es_pos/migrations/11.0.2.0.0/pre-migration.py b/l10n_es_pos/migrations/11.0.2.0.0/pre-migration.py deleted file mode 100644 index 796c3786063..00000000000 --- a/l10n_es_pos/migrations/11.0.2.0.0/pre-migration.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2018 David Vidal -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - - -def migrate(cr, version): - if not version: - return - # Add new column in advance - cr.execute(""" - ALTER TABLE pos_order - ADD COLUMN is_l10n_es_simplified_invoice BOOLEAN; - """) - # If migrated directly from 10.0.1.0.0 - simplified_invoice_field = 'simplified_invoice' - cr.execute(""" - SELECT column_name - FROM information_schema.columns - WHERE table_name='pos_order' AND column_name='simplified_invoice'; - """) - # Otherwise it's migrated from 11.0.1.0.0 - if not cr.fetchone(): - simplified_invoice_field = 'l10n_es_simplified_invoice_number' - # Move simplified invoice info to pos_reference field. - cr.execute(""" - UPDATE pos_order SET - pos_reference = %(s)s, - is_l10n_es_simplified_invoice = TRUE - WHERE COALESCE(%(s)s, '') <> ''; - """ % {'s': simplified_invoice_field}) diff --git a/l10n_es_pos/static/src/js/screens.js b/l10n_es_pos/static/src/js/screens.js index 0bebad71ce7..3a8215a7a1e 100644 --- a/l10n_es_pos/static/src/js/screens.js +++ b/l10n_es_pos/static/src/js/screens.js @@ -14,7 +14,7 @@ odoo.define('l10n_es_pos.screens', function (require) { var below_limit = this.pos.get_order().get_total_with_tax() <= this.pos.config.l10n_es_simplified_invoice_limit; if (this.pos.config.iface_l10n_es_simplified_invoice) { var order = this.pos.get_order(); - if (below_limit) { + if (below_limit && !order.to_invoice) { order.set_simple_inv_number(); } else { // Force invoice above limit. Online is needed. diff --git a/l10n_es_pos/views/pos_views.xml b/l10n_es_pos/views/pos_views.xml index 411887c72a7..9315ad35f1c 100644 --- a/l10n_es_pos/views/pos_views.xml +++ b/l10n_es_pos/views/pos_views.xml @@ -39,18 +39,18 @@ - - pos.config.form + + PoS Config l10n_es_pos pos.config - + - -
+
+
-
-
-
-
+
From fe00bd972f941b409234e3009dc10670ea512079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20V=C3=A1zquez=20Rodr=C3=ADguez?= Date: Mon, 11 Feb 2019 09:41:26 +0000 Subject: [PATCH 12/54] Translated using Weblate (Spanish) Currently translated at 100.0% (31 of 31 strings) Translation: l10n-spain-12.0/l10n-spain-12.0-l10n_es_pos Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-l10n_es_pos/es/ --- l10n_es_pos/i18n/es.po | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index 53b3da47a15..4cddaff66e1 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -7,14 +7,15 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-12 14:13+0000\n" -"PO-Revision-Date: 2018-04-12 14:13+0000\n" -"Last-Translator: <>\n" +"PO-Revision-Date: 2019-02-11 11:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" "Language-Team: \n" -"Language: \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form @@ -66,9 +67,8 @@ msgstr "Por encima de esta cantidad no es legal crear una factura simplificada" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_config -#, fuzzy msgid "Point of Sale Configuration" -msgstr "Pedidos del Punto de Venta" +msgstr "Configuración Punto de Venta" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order @@ -80,20 +80,19 @@ msgstr "Pedidos del Punto de Venta" #: code:addons/l10n_es_pos/static/src/xml/pos.xml:40 #, python-format msgid "Product" -msgstr "" +msgstr "Producto" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 #, python-format msgid "Qty" -msgstr "" +msgstr "Cantidad" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_ir_sequence -#, fuzzy msgid "Sequence" -msgstr "ir.sequence" +msgstr "Secuencia" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form @@ -167,7 +166,7 @@ msgstr "Facturas simplificadas" #: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 #, python-format msgid "Subt" -msgstr "" +msgstr "Subtotal" #. module: l10n_es_pos #: code:addons/l10n_es_pos/models/ir_sequence.py:20 @@ -184,7 +183,7 @@ msgstr "" #: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 #, python-format msgid "Unit" -msgstr "" +msgstr "Unidad" #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__iface_l10n_es_simplified_invoice From cb5799b3727f22d405a8be9c61dabf13ec62f094 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 15 Apr 2019 18:42:38 +0200 Subject: [PATCH 13/54] [FIX] l10n_es_pos: XmlReceipt doesn't show customer --- l10n_es_pos/__manifest__.py | 2 +- l10n_es_pos/i18n/es.po | 1 + l10n_es_pos/i18n/l10n_es_pos.pot | 1 + l10n_es_pos/static/src/xml/pos.xml | 5 ++++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index ef18f900544..f0cc2582605 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -9,7 +9,7 @@ "Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-spain", "license": "AGPL-3", - "version": "12.0.1.0.0", + "version": "12.0.1.0.1", "depends": [ "point_of_sale", ], diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index 4cddaff66e1..5b402c01687 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -202,6 +202,7 @@ msgstr "NIF/CIF:" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:51 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:73 #, python-format msgid "on" msgstr "sobre" diff --git a/l10n_es_pos/i18n/l10n_es_pos.pot b/l10n_es_pos/i18n/l10n_es_pos.pot index f19b2b539ed..b0feedd832e 100644 --- a/l10n_es_pos/i18n/l10n_es_pos.pot +++ b/l10n_es_pos/i18n/l10n_es_pos.pot @@ -194,6 +194,7 @@ msgstr "" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:51 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:73 #, python-format msgid "on" msgstr "" diff --git a/l10n_es_pos/static/src/xml/pos.xml b/l10n_es_pos/static/src/xml/pos.xml index 7cbb1d15137..db1b7d1f5aa 100644 --- a/l10n_es_pos/static/src/xml/pos.xml +++ b/l10n_es_pos/static/src/xml/pos.xml @@ -61,7 +61,7 @@
- +
Customer data
@@ -70,6 +70,9 @@ Address:
+ + on + From 0b8c33abdc5dcb3d8c7bcb45753d92370d05501d Mon Sep 17 00:00:00 2001 From: David Date: Wed, 17 Apr 2019 17:37:11 +0200 Subject: [PATCH 14/54] [FIX] l10n_es_pos: prevent duplicate or missing orders --- l10n_es_pos/__manifest__.py | 2 +- l10n_es_pos/i18n/es.po | 27 +++++++++++++---------- l10n_es_pos/i18n/l10n_es_pos.pot | 5 +++++ l10n_es_pos/models/pos_order.py | 32 ++++++++++++++++++++++++++++ l10n_es_pos/static/src/js/models.js | 8 ++++--- l10n_es_pos/static/src/js/screens.js | 6 +++++- 6 files changed, 64 insertions(+), 16 deletions(-) diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index f0cc2582605..0544c555db4 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -9,7 +9,7 @@ "Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-spain", "license": "AGPL-3", - "version": "12.0.1.0.1", + "version": "12.0.2.0.0", "depends": [ "point_of_sale", ], diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index 5b402c01687..a83c5e92293 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -166,7 +166,7 @@ msgstr "Facturas simplificadas" #: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 #, python-format msgid "Subt" -msgstr "Subtotal" +msgstr "Subt" #. module: l10n_es_pos #: code:addons/l10n_es_pos/models/ir_sequence.py:20 @@ -178,12 +178,17 @@ msgstr "" "Ya existe una secuencia de Factura Simplificada con ese prefijo y este " "debería ser único." +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__l10n_es_unique_id +msgid "Unique Order ID" +msgstr "ID único de pedido" + #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 #, python-format msgid "Unit" -msgstr "Unidad" +msgstr "Ud." #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__iface_l10n_es_simplified_invoice @@ -207,15 +212,15 @@ msgstr "NIF/CIF:" msgid "on" msgstr "sobre" -#~ msgid "pos.config" -#~ msgstr "pos.config" - #~ msgid "" -#~ "There's already another POS config using the same Simplified Invoice " -#~ "prefix. Try choosing another POS Name" +#~ "The current order is already queued and thus it shouldn't be changed. " +#~ "Click on 'Validate' in order to finalize it." #~ msgstr "" -#~ "Ya existe otro TPV utilizando el mismo prefijo de Factura Simplifica. " -#~ "Escoge otro nombre de Punto de Venta" +#~ "Este pedido ya está en cola, de modo que no debería modificarse. Pulsa en " +#~ "'Validar' para finalizarlo." + +#~ msgid "The order is already queued" +#~ msgstr "El pedido ya está en cola" -#~ msgid "You need to define a simplified invoice prefix." -#~ msgstr "Debes definir un prefijo de Factura Simplificada." +#~ msgid "pos.config" +#~ msgstr "pos.config" diff --git a/l10n_es_pos/i18n/l10n_es_pos.pot b/l10n_es_pos/i18n/l10n_es_pos.pot index b0feedd832e..649220ee184 100644 --- a/l10n_es_pos/i18n/l10n_es_pos.pot +++ b/l10n_es_pos/i18n/l10n_es_pos.pot @@ -170,6 +170,11 @@ msgstr "" msgid "There is already a simplified invoice sequence with that prefix and it should be unique." msgstr "" +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__l10n_es_unique_id +msgid "Unique Order ID" +msgstr "" + #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 diff --git a/l10n_es_pos/models/pos_order.py b/l10n_es_pos/models/pos_order.py index 3df43c77e06..fd4d926cc7d 100644 --- a/l10n_es_pos/models/pos_order.py +++ b/l10n_es_pos/models/pos_order.py @@ -13,6 +13,10 @@ class PosOrder(models.Model): copy=False, default=False, ) + l10n_es_unique_id = fields.Char( + 'Unique Order ID', + copy=False, + ) @api.model def _simplified_limit_check(self, amount_total, limit=3000): @@ -30,6 +34,9 @@ def _order_fields(self, ui_order): 'pos_reference': ui_order['simplified_invoice'], 'is_l10n_es_simplified_invoice': True, }) + res.update({ + 'l10n_es_unique_id': ui_order['uid'], + }) return res @api.model @@ -49,3 +56,28 @@ def _process_order(self, pos_order): }) pos.l10n_es_simplified_invoice_sequence_id.next_by_id() return super(PosOrder, self)._process_order(pos_order) + + @api.model + def create_from_ui(self, orders): + """Provide a context with the current session id""" + if not orders: + return super().create_from_ui(orders) + # We take the uid from every order in the sync queue to discard only + # those orders that are really unique + # TODO: Duplicated simp. invoice ids shouldn't happen but in certain + # circumstances it can ocurr, so we choose to save them anyway. + submitted_uids = [o['data']['uid'] for o in orders] + self_ctx = self.with_context(l10n_es_pos_submitted_uids=submitted_uids) + return super(PosOrder, self_ctx).create_from_ui(orders) + + @api.model + def search(self, args, offset=0, limit=0, order=None, count=False): + """If the context provided from create_from_ui() is given, we add + the unique_uid to the domain filter. This way, we prevent missing + orders if a sequence is reset. If they belong to another session + we grant them for valid despite the duped sequence number""" + submitted_uids = self.env.context.get('l10n_es_pos_submitted_uids') + if submitted_uids: + args += [('l10n_es_unique_id', 'in', submitted_uids)] + return super().search(args, offset=offset, limit=limit, + order=order, count=count) diff --git a/l10n_es_pos/static/src/js/models.js b/l10n_es_pos/static/src/js/models.js index 705e69b8db9..adf9590c2d2 100644 --- a/l10n_es_pos/static/src/js/models.js +++ b/l10n_es_pos/static/src/js/models.js @@ -1,4 +1,5 @@ /* Copyright 2016 David Gómez Quilón + Copyright 2018-19 Tecnativa - David Vidal License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */ @@ -7,7 +8,6 @@ odoo.define('l10n_es_pos.models', function (require) { var models = require('point_of_sale.models'); - var pos_super = models.PosModel.prototype; models.PosModel = models.PosModel.extend({ initialize: function (attributes, options) { @@ -56,8 +56,10 @@ odoo.define('l10n_es_pos.models', function (require) { models.Order = models.Order.extend({ get_total_with_tax: function () { var total = order_super.get_total_with_tax.apply(this, arguments); - var below_limit = total <= this.pos.config.l10n_es_simplified_invoice_limit; - this.is_simplified_invoice = below_limit && this.pos.config.iface_l10n_es_simplified_invoice; + var below_limit = total <= + this.pos.config.l10n_es_simplified_invoice_limit; + this.is_simplified_invoice = + below_limit && this.pos.config.iface_l10n_es_simplified_invoice; return total; }, set_simple_inv_number: function () { diff --git a/l10n_es_pos/static/src/js/screens.js b/l10n_es_pos/static/src/js/screens.js index 3a8215a7a1e..9c1e16a31a6 100644 --- a/l10n_es_pos/static/src/js/screens.js +++ b/l10n_es_pos/static/src/js/screens.js @@ -10,8 +10,12 @@ odoo.define('l10n_es_pos.screens', function (require) { screens.PaymentScreenWidget.include({ + // When the order total is above the simplified invoice limit, wich + // will be the legal one on each case, it's mandatory to force the + // invoice in any case. validate_order: function (force_validate) { - var below_limit = this.pos.get_order().get_total_with_tax() <= this.pos.config.l10n_es_simplified_invoice_limit; + var below_limit = this.pos.get_order().get_total_with_tax() <= + this.pos.config.l10n_es_simplified_invoice_limit; if (this.pos.config.iface_l10n_es_simplified_invoice) { var order = this.pos.get_order(); if (below_limit && !order.to_invoice) { From 9707615850d2405d2b3bd89c5ee1600f4f0c4a4e Mon Sep 17 00:00:00 2001 From: David Date: Mon, 17 Jun 2019 16:47:24 +0200 Subject: [PATCH 15/54] [FIX] l10n_es_pos: errors due to context --- l10n_es_pos/models/pos_order.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/l10n_es_pos/models/pos_order.py b/l10n_es_pos/models/pos_order.py index fd4d926cc7d..b57f0873c35 100644 --- a/l10n_es_pos/models/pos_order.py +++ b/l10n_es_pos/models/pos_order.py @@ -77,7 +77,14 @@ def search(self, args, offset=0, limit=0, order=None, count=False): orders if a sequence is reset. If they belong to another session we grant them for valid despite the duped sequence number""" submitted_uids = self.env.context.get('l10n_es_pos_submitted_uids') - if submitted_uids: + # Only use these context values for the specific case of + # [('pos_reference', 'in', ids)] + # to avoid side effects when other calls are received in the same ctx + args_set = {x[0]: x[1] for x in args if len(x) > 1} + filter_uids = False + if {'pos_reference'}.issubset(args_set): + filter_uids = args_set['pos_reference'] == 'in' + if submitted_uids and filter_uids: args += [('l10n_es_unique_id', 'in', submitted_uids)] return super().search(args, offset=offset, limit=limit, order=order, count=count) From dadd36d41886815e3f57f08b46450ff897386f75 Mon Sep 17 00:00:00 2001 From: Carles Antoli Date: Fri, 7 Feb 2020 19:39:40 +0000 Subject: [PATCH 16/54] Added translation using Weblate (Catalan) --- l10n_es_pos/i18n/ca.po | 206 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 l10n_es_pos/i18n/ca.po diff --git a/l10n_es_pos/i18n/ca.po b/l10n_es_pos/i18n/ca.po new file mode 100644 index 00000000000..b6de5c63d8f --- /dev/null +++ b/l10n_es_pos/i18n/ca.po @@ -0,0 +1,206 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form +msgid "Above this limit the simplified invoice won't be made" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id +msgid "Autogenerate for each POS created" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:27 +#, python-format +msgid "Customer:" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_config +msgid "Point of Sale Configuration" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale Orders" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:40 +#, python-format +msgid "Product" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 +#, python-format +msgid "Qty" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_ir_sequence +msgid "Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form +msgid "Set simplified invoice sequence for this POS" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit +msgid "Sim.Inv limit amount" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_number +msgid "Sim.Inv number" +msgstr "" + +#. module: l10n_es_pos +#: code:addons/l10n_es_pos/models/pos_config.py:64 +#: code:addons/l10n_es_pos/models/pos_config.py:109 +#, python-format +msgid "Simplified Invoice %s" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id +msgid "Simplified Invoice IDs Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form +msgid "Simplified Invoice Limit" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form +msgid "Simplified Invoice Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_padding +msgid "Simplified Invoice padding" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_prefix +msgid "Simplified Invoice prefix" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:59 +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__is_l10n_es_simplified_invoice +#, python-format +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:7 +#, python-format +msgid "Simplified invoice:" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 +#, python-format +msgid "Subt" +msgstr "" + +#. module: l10n_es_pos +#: code:addons/l10n_es_pos/models/ir_sequence.py:20 +#, python-format +msgid "There is already a simplified invoice sequence with that prefix and it should be unique." +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__l10n_es_unique_id +msgid "Unique Order ID" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 +#, python-format +msgid "Unit" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__iface_l10n_es_simplified_invoice +msgid "Use simplified invoices for this POS" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:12 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:29 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:51 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:73 +#, python-format +msgid "on" +msgstr "" From cc58ff0f8b8af74ca72b381c11e7b85e00cb57cf Mon Sep 17 00:00:00 2001 From: Carles Antoli Date: Fri, 7 Feb 2020 19:39:41 +0000 Subject: [PATCH 17/54] Added translation using Weblate (Catalan) --- l10n_es_pos/i18n/ca_ES.po | 206 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 l10n_es_pos/i18n/ca_ES.po diff --git a/l10n_es_pos/i18n/ca_ES.po b/l10n_es_pos/i18n/ca_ES.po new file mode 100644 index 00000000000..e10d76160e1 --- /dev/null +++ b/l10n_es_pos/i18n/ca_ES.po @@ -0,0 +1,206 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_es_pos +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ca_ES\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form +msgid "Above this limit the simplified invoice won't be made" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 +#, python-format +msgid "Address:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id +msgid "Autogenerate for each POS created" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 +#, python-format +msgid "Customer data" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:27 +#, python-format +msgid "Customer:" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +msgid "Invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 +#, python-format +msgid "Name:" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit +msgid "Over this amount is not legally posible to create a simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_config +msgid "Point of Sale Configuration" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_pos_order +msgid "Point of Sale Orders" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:40 +#, python-format +msgid "Product" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 +#, python-format +msgid "Qty" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model,name:l10n_es_pos.model_ir_sequence +msgid "Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form +msgid "Set simplified invoice sequence for this POS" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit +msgid "Sim.Inv limit amount" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_number +msgid "Sim.Inv number" +msgstr "" + +#. module: l10n_es_pos +#: code:addons/l10n_es_pos/models/pos_config.py:64 +#: code:addons/l10n_es_pos/models/pos_config.py:109 +#, python-format +msgid "Simplified Invoice %s" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id +msgid "Simplified Invoice IDs Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form +msgid "Simplified Invoice Limit" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form +msgid "Simplified Invoice Sequence" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_padding +msgid "Simplified Invoice padding" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_prefix +msgid "Simplified Invoice prefix" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:59 +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__is_l10n_es_simplified_invoice +#, python-format +msgid "Simplified invoice" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:7 +#, python-format +msgid "Simplified invoice:" +msgstr "" + +#. module: l10n_es_pos +#: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice +msgid "Simplified invoices" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 +#, python-format +msgid "Subt" +msgstr "" + +#. module: l10n_es_pos +#: code:addons/l10n_es_pos/models/ir_sequence.py:20 +#, python-format +msgid "There is already a simplified invoice sequence with that prefix and it should be unique." +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__l10n_es_unique_id +msgid "Unique Order ID" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 +#, python-format +msgid "Unit" +msgstr "" + +#. module: l10n_es_pos +#: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__iface_l10n_es_simplified_invoice +msgid "Use simplified invoices for this POS" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:12 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:29 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 +#, python-format +msgid "VAT:" +msgstr "" + +#. module: l10n_es_pos +#. openerp-web +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:51 +#: code:addons/l10n_es_pos/static/src/xml/pos.xml:73 +#, python-format +msgid "on" +msgstr "" From 99043311f9cd6cb8e8f05c712b7fb4f17375aedc Mon Sep 17 00:00:00 2001 From: Carles Antoli Date: Fri, 7 Feb 2020 19:40:29 +0000 Subject: [PATCH 18/54] Translated using Weblate (Spanish) Currently translated at 100.0% (32 of 32 strings) Translation: l10n-spain-12.0/l10n-spain-12.0-l10n_es_pos Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-l10n_es_pos/es/ --- l10n_es_pos/i18n/es.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/l10n_es_pos/i18n/es.po b/l10n_es_pos/i18n/es.po index a83c5e92293..bfda1339425 100644 --- a/l10n_es_pos/i18n/es.po +++ b/l10n_es_pos/i18n/es.po @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-12 14:13+0000\n" -"PO-Revision-Date: 2019-02-11 11:50+0000\n" -"Last-Translator: Marta Vázquez Rodríguez \n" +"PO-Revision-Date: 2020-02-07 22:13+0000\n" +"Last-Translator: Carles Antoli \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.4\n" +"X-Generator: Weblate 3.10\n" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form @@ -202,7 +202,7 @@ msgstr "Usar Facturas Simplificadas en este Punto de Venta" #: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 #, python-format msgid "VAT:" -msgstr "NIF/CIF:" +msgstr "NIF:" #. module: l10n_es_pos #. openerp-web From c8ab14f7445a564a2ae211e52f85282e9beddccc Mon Sep 17 00:00:00 2001 From: Carles Antoli Date: Fri, 7 Feb 2020 19:41:11 +0000 Subject: [PATCH 19/54] Translated using Weblate (Catalan) Currently translated at 100.0% (32 of 32 strings) Translation: l10n-spain-12.0/l10n-spain-12.0-l10n_es_pos Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-l10n_es_pos/ca/ --- l10n_es_pos/i18n/ca.po | 67 +++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/l10n_es_pos/i18n/ca.po b/l10n_es_pos/i18n/ca.po index b6de5c63d8f..e3abd2c7b76 100644 --- a/l10n_es_pos/i18n/ca.po +++ b/l10n_es_pos/i18n/ca.po @@ -6,137 +6,140 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2020-02-07 22:13+0000\n" +"Last-Translator: Carles Antoli \n" "Language-Team: none\n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Above this limit the simplified invoice won't be made" -msgstr "" +msgstr "Per sobre d'aquest límit no es crearà factura simplificada" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:69 #, python-format msgid "Address:" -msgstr "" +msgstr "Adreça:" #. module: l10n_es_pos #: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id msgid "Autogenerate for each POS created" -msgstr "" +msgstr "Autogenerada per cada TPV creat" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 #, python-format msgid "Customer data" -msgstr "" +msgstr "Dades de client" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:27 #, python-format msgid "Customer:" -msgstr "" +msgstr "Client:" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice msgid "Invoices" -msgstr "" +msgstr "Factures" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:67 #, python-format msgid "Name:" -msgstr "" +msgstr "Nom:" #. module: l10n_es_pos #: model:ir.model.fields,help:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit msgid "Over this amount is not legally posible to create a simplified invoice" msgstr "" +"Per sobre d'aquesta quantitat no és legal crear una factura simplificada" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_config msgid "Point of Sale Configuration" -msgstr "" +msgstr "Configuració Punt de Venda" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_pos_order msgid "Point of Sale Orders" -msgstr "" +msgstr "Comandes del Punt de Venda" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:40 #, python-format msgid "Product" -msgstr "" +msgstr "Producte" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:41 #, python-format msgid "Qty" -msgstr "" +msgstr "Quantitat" #. module: l10n_es_pos #: model:ir.model,name:l10n_es_pos.model_ir_sequence msgid "Sequence" -msgstr "" +msgstr "Seqüència" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Set simplified invoice sequence for this POS" -msgstr "" +msgstr "Establir seqüència de factura simplificada per aquest TPV" #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_limit msgid "Sim.Inv limit amount" -msgstr "" +msgstr "Límit de factura simplificada" #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_number msgid "Sim.Inv number" -msgstr "" +msgstr "Nombre de factura simplificada" #. module: l10n_es_pos #: code:addons/l10n_es_pos/models/pos_config.py:64 #: code:addons/l10n_es_pos/models/pos_config.py:109 #, python-format msgid "Simplified Invoice %s" -msgstr "" +msgstr "Factura simplificada %s" #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_sequence_id msgid "Simplified Invoice IDs Sequence" -msgstr "" +msgstr "Seqüència de Factura Simplificada" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Simplified Invoice Limit" -msgstr "" +msgstr "Límit de Factura Simplificada" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.pos_config_view_form msgid "Simplified Invoice Sequence" -msgstr "" +msgstr "Seqüència de Factura Simplificada" #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_padding msgid "Simplified Invoice padding" -msgstr "" +msgstr "Farcit de Factura Simplificada" #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__l10n_es_simplified_invoice_prefix msgid "Simplified Invoice prefix" -msgstr "" +msgstr "Prefix de Factura Simplificada" #. module: l10n_es_pos #. openerp-web @@ -144,49 +147,51 @@ msgstr "" #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__is_l10n_es_simplified_invoice #, python-format msgid "Simplified invoice" -msgstr "" +msgstr "Factura simplificada" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:7 #, python-format msgid "Simplified invoice:" -msgstr "" +msgstr "Factura simplificada:" #. module: l10n_es_pos #: model_terms:ir.ui.view,arch_db:l10n_es_pos.view_pos_order_filter_simplified_invoice msgid "Simplified invoices" -msgstr "" +msgstr "Factures simplificades" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:43 #, python-format msgid "Subt" -msgstr "" +msgstr "Subt" #. module: l10n_es_pos #: code:addons/l10n_es_pos/models/ir_sequence.py:20 #, python-format msgid "There is already a simplified invoice sequence with that prefix and it should be unique." msgstr "" +"Ja hi ha una seqüència de Factura Simplificada amb aquest prefix i aquest " +"hauria de ser únic." #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_order__l10n_es_unique_id msgid "Unique Order ID" -msgstr "" +msgstr "ID únic de comanda" #. module: l10n_es_pos #. openerp-web #: code:addons/l10n_es_pos/static/src/xml/pos.xml:42 #, python-format msgid "Unit" -msgstr "" +msgstr "Unitat" #. module: l10n_es_pos #: model:ir.model.fields,field_description:l10n_es_pos.field_pos_config__iface_l10n_es_simplified_invoice msgid "Use simplified invoices for this POS" -msgstr "" +msgstr "Utilitza Factures simplificades en aquest punt de venda" #. module: l10n_es_pos #. openerp-web @@ -195,7 +200,7 @@ msgstr "" #: code:addons/l10n_es_pos/static/src/xml/pos.xml:68 #, python-format msgid "VAT:" -msgstr "" +msgstr "NIF:" #. module: l10n_es_pos #. openerp-web @@ -203,4 +208,4 @@ msgstr "" #: code:addons/l10n_es_pos/static/src/xml/pos.xml:73 #, python-format msgid "on" -msgstr "" +msgstr "sobre" From 14589ad0accfe60d2f4ad5e1d546395c950708fd Mon Sep 17 00:00:00 2001 From: Carlos Roca Date: Fri, 8 May 2020 13:34:05 +0200 Subject: [PATCH 20/54] [IMP] l10n_es_pos: black, isort, prettier --- l10n_es_pos/__manifest__.py | 19 ++--- l10n_es_pos/hooks.py | 47 ++++++----- l10n_es_pos/models/__init__.py | 1 - l10n_es_pos/models/ir_sequence.py | 31 +++++--- l10n_es_pos/models/pos_config.py | 112 +++++++++++++++------------ l10n_es_pos/models/pos_order.py | 73 +++++++++-------- l10n_es_pos/static/src/js/models.js | 62 +++++++++------ l10n_es_pos/static/src/js/screens.js | 11 ++- l10n_es_pos/static/src/xml/pos.xml | 58 ++++++++------ l10n_es_pos/views/pos_templates.xml | 11 +-- l10n_es_pos/views/pos_views.xml | 56 +++++++++----- 11 files changed, 273 insertions(+), 208 deletions(-) diff --git a/l10n_es_pos/__manifest__.py b/l10n_es_pos/__manifest__.py index 0544c555db4..e955c4b2102 100644 --- a/l10n_es_pos/__manifest__.py +++ b/l10n_es_pos/__manifest__.py @@ -4,22 +4,15 @@ "name": "Punto de venta adaptado a la legislación española", "category": "Point Of Sale", "author": "Tecnativa, " - "Aselcis Consulting, " - "Acysos S.L., " - "Odoo Community Association (OCA)", + "Aselcis Consulting, " + "Acysos S.L., " + "Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-spain", "license": "AGPL-3", "version": "12.0.2.0.0", - "depends": [ - "point_of_sale", - ], - "data": [ - "views/pos_templates.xml", - "views/pos_views.xml", - ], - "qweb": [ - "static/src/xml/pos.xml", - ], + "depends": ["point_of_sale",], + "data": ["views/pos_templates.xml", "views/pos_views.xml",], + "qweb": ["static/src/xml/pos.xml",], "installable": True, "post_init_hook": "post_init_hook", "uninstall_hook": "uninstall_hook", diff --git a/l10n_es_pos/hooks.py b/l10n_es_pos/hooks.py index 44383089807..e20b7fde3e2 100644 --- a/l10n_es_pos/hooks.py +++ b/l10n_es_pos/hooks.py @@ -1,37 +1,46 @@ # Copyright 2018 David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import api, SUPERUSER_ID +from odoo import SUPERUSER_ID, api def post_init_hook(cr, registry, vals=None): """For brand new installations""" env = api.Environment(cr, SUPERUSER_ID, {}) - IrSequence = env['ir.sequence'] - pos_config = env['pos.config'].search([ - ('l10n_es_simplified_invoice_sequence_id', '=', False)]) + IrSequence = env["ir.sequence"] + pos_config = env["pos.config"].search( + [("l10n_es_simplified_invoice_sequence_id", "=", False)] + ) pos_name_dupes = {} vals = {} if vals is None else vals for pos in pos_config: pos_name_dupes.setdefault(pos.name, -1) pos_name_dupes[pos.name] += 1 pos_vals = vals.get(pos, {}) - pos_name = (pos.name if not pos_name_dupes[pos.name] else - "%s_%d" % (pos.name, pos_name_dupes[pos.name])) - pos.l10n_es_simplified_invoice_sequence_id = IrSequence.create({ - 'name': ( - pos.with_context({'lang': env.user.lang}) - ._get_l10n_es_sequence_name() % pos_name), - 'prefix': pos_vals.get('prefix', "%s%s" % - (pos_name, pos._get_default_prefix())), - 'padding': pos_vals.get('padding', pos._get_default_padding()), - 'implementation': pos_vals.get('implementation', 'no_gap'), - 'code': 'pos.config.simplified_invoice', - 'company_id': pos_vals.get('company_id', pos.company_id.id), - }) + pos_name = ( + pos.name + if not pos_name_dupes[pos.name] + else "%s_%d" % (pos.name, pos_name_dupes[pos.name]) + ) + pos.l10n_es_simplified_invoice_sequence_id = IrSequence.create( + { + "name": ( + pos.with_context( + {"lang": env.user.lang} + )._get_l10n_es_sequence_name() + % pos_name + ), + "prefix": pos_vals.get( + "prefix", "{}{}".format(pos_name, pos._get_default_prefix()) + ), + "padding": pos_vals.get("padding", pos._get_default_padding()), + "implementation": pos_vals.get("implementation", "no_gap"), + "code": "pos.config.simplified_invoice", + "company_id": pos_vals.get("company_id", pos.company_id.id), + } + ) def uninstall_hook(cr, registry): env = api.Environment(cr, SUPERUSER_ID, {}) - env['ir.sequence'].search([ - ('code', '=', 'pos.config.simplified_invoice')]).unlink() + env["ir.sequence"].search([("code", "=", "pos.config.simplified_invoice")]).unlink() diff --git a/l10n_es_pos/models/__init__.py b/l10n_es_pos/models/__init__.py index 2946f4671bd..6cdbe814493 100644 --- a/l10n_es_pos/models/__init__.py +++ b/l10n_es_pos/models/__init__.py @@ -1,4 +1,3 @@ - from . import ir_sequence from . import pos_config from . import pos_order diff --git a/l10n_es_pos/models/ir_sequence.py b/l10n_es_pos/models/ir_sequence.py index ccdd8a4def4..c39dbf7560c 100644 --- a/l10n_es_pos/models/ir_sequence.py +++ b/l10n_es_pos/models/ir_sequence.py @@ -6,17 +6,28 @@ class IrSequence(models.Model): - _inherit = 'ir.sequence' + _inherit = "ir.sequence" - @api.constrains('prefix', 'code') + @api.constrains("prefix", "code") def check_simplified_invoice_unique_prefix(self): - if self._context.get('copy_pos_config'): + if self._context.get("copy_pos_config"): return for sequence in self.filtered( - lambda x: x.code == 'pos.config.simplified_invoice'): - if self.search_count([ - ('code', '=', 'pos.config.simplified_invoice'), - ('prefix', '=', sequence.prefix)]) > 1: - raise UserError(_('There is already a simplified invoice ' - 'sequence with that prefix and it should be ' - 'unique.')) + lambda x: x.code == "pos.config.simplified_invoice" + ): + if ( + self.search_count( + [ + ("code", "=", "pos.config.simplified_invoice"), + ("prefix", "=", sequence.prefix), + ] + ) + > 1 + ): + raise UserError( + _( + "There is already a simplified invoice " + "sequence with that prefix and it should be " + "unique." + ) + ) diff --git a/l10n_es_pos/models/pos_config.py b/l10n_es_pos/models/pos_config.py index 9e322482e7d..2a0a4eeb088 100644 --- a/l10n_es_pos/models/pos_config.py +++ b/l10n_es_pos/models/pos_config.py @@ -1,74 +1,79 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import _, api, fields, models + import odoo.addons.decimal_precision as dp class PosConfig(models.Model): - _inherit = 'pos.config' + _inherit = "pos.config" - @api.depends('l10n_es_simplified_invoice_sequence_id.number_next_actual', - 'l10n_es_simplified_invoice_sequence_id.prefix', - 'l10n_es_simplified_invoice_sequence_id.padding') + @api.depends( + "l10n_es_simplified_invoice_sequence_id.number_next_actual", + "l10n_es_simplified_invoice_sequence_id.prefix", + "l10n_es_simplified_invoice_sequence_id.padding", + ) def _compute_simplified_invoice_sequence(self): for pos in self: seq = pos.l10n_es_simplified_invoice_sequence_id pos.l10n_es_simplified_invoice_number = ( - seq._get_current_sequence().number_next_actual) - pos.l10n_es_simplified_invoice_prefix = ( - seq._get_prefix_suffix()[0]) + seq._get_current_sequence().number_next_actual + ) + pos.l10n_es_simplified_invoice_prefix = seq._get_prefix_suffix()[0] pos.l10n_es_simplified_invoice_padding = seq.padding iface_l10n_es_simplified_invoice = fields.Boolean( - string='Use simplified invoices for this POS', + string="Use simplified invoices for this POS", ) l10n_es_simplified_invoice_sequence_id = fields.Many2one( - 'ir.sequence', - string='Simplified Invoice IDs Sequence', + "ir.sequence", + string="Simplified Invoice IDs Sequence", help="Autogenerate for each POS created", copy=False, readonly=True, ) l10n_es_simplified_invoice_limit = fields.Float( - string='Sim.Inv limit amount', - digits=dp.get_precision('Account'), - help='Over this amount is not legally posible to create ' - 'a simplified invoice', + string="Sim.Inv limit amount", + digits=dp.get_precision("Account"), + help="Over this amount is not legally posible to create " + "a simplified invoice", default=3000, # Spanish legal limit - oldname='simplified_invoice_limit', + oldname="simplified_invoice_limit", ) l10n_es_simplified_invoice_prefix = fields.Char( - 'Simplified Invoice prefix', + "Simplified Invoice prefix", readonly=True, - compute='_compute_simplified_invoice_sequence', - oldname='simple_invoice_prefix', + compute="_compute_simplified_invoice_sequence", + oldname="simple_invoice_prefix", ) l10n_es_simplified_invoice_padding = fields.Integer( - 'Simplified Invoice padding', + "Simplified Invoice padding", readonly=True, - compute='_compute_simplified_invoice_sequence', - oldname='simple_invoice_limit', + compute="_compute_simplified_invoice_sequence", + oldname="simple_invoice_limit", ) l10n_es_simplified_invoice_number = fields.Integer( - 'Sim.Inv number', + "Sim.Inv number", readonly=True, - compute='_compute_simplified_invoice_sequence', - oldname='simple_invoice_number', + compute="_compute_simplified_invoice_sequence", + oldname="simple_invoice_number", ) @api.model def create(self, vals): # Auto create simp. inv. sequence - prefix = "%s%s" % (vals['name'], self._get_default_prefix()) - simp_inv_seq_id = self.env['ir.sequence'].create({ - 'name': _('Simplified Invoice %s') % vals['name'], - 'implementation': 'no_gap', - 'padding': self._get_default_padding(), - 'prefix': prefix, - 'code': 'pos.config.simplified_invoice', - 'company_id': vals.get('company_id', False), - }) - vals['l10n_es_simplified_invoice_sequence_id'] = simp_inv_seq_id.id + prefix = "{}{}".format(vals["name"], self._get_default_prefix()) + simp_inv_seq_id = self.env["ir.sequence"].create( + { + "name": _("Simplified Invoice %s") % vals["name"], + "implementation": "no_gap", + "padding": self._get_default_padding(), + "prefix": prefix, + "code": "pos.config.simplified_invoice", + "company_id": vals.get("company_id", False), + } + ) + vals["l10n_es_simplified_invoice_sequence_id"] = simp_inv_seq_id.id return super(PosConfig, self).create(vals) def copy(self, default=None): @@ -77,33 +82,40 @@ def copy(self, default=None): return super(PosConfig, self.with_context(ctx)).copy(default) def write(self, vals): - if not self._context.get('copy_pos_config') and 'name' not in vals: + if not self._context.get("copy_pos_config") and "name" not in vals: for pos in self: - pos.l10n_es_simplified_invoice_sequence_id\ - .check_simplified_invoice_unique_prefix() - if 'name' in vals: + pos.l10n_es_simplified_invoice_sequence_id.check_simplified_invoice_unique_prefix() + if "name" in vals: prefix = self.l10n_es_simplified_invoice_prefix.replace( - self.name, vals['name']) + self.name, vals["name"] + ) if prefix != self.l10n_es_simplified_invoice_prefix: - self.l10n_es_simplified_invoice_sequence_id.update({ - 'prefix': prefix, - 'name': (self.l10n_es_simplified_invoice_sequence_id - .name.replace(self.name, vals['name'])), - }) + self.l10n_es_simplified_invoice_sequence_id.update( + { + "prefix": prefix, + "name": ( + self.l10n_es_simplified_invoice_sequence_id.name.replace( + self.name, vals["name"] + ) + ), + } + ) return super(PosConfig, self).write(vals) def unlink(self): - self.mapped('l10n_es_simplified_invoice_sequence_id').unlink() + self.mapped("l10n_es_simplified_invoice_sequence_id").unlink() return super(PosConfig, self).unlink() def _get_default_padding(self): - return self.env['ir.config_parameter'].get_param( - 'l10n_es_pos.simplified_invoice_sequence.padding', 4) + return self.env["ir.config_parameter"].get_param( + "l10n_es_pos.simplified_invoice_sequence.padding", 4 + ) def _get_default_prefix(self): - return self.env['ir.config_parameter'].get_param( - 'l10n_es_pos.simplified_invoice_sequence.prefix', '') + return self.env["ir.config_parameter"].get_param( + "l10n_es_pos.simplified_invoice_sequence.prefix", "" + ) def _get_l10n_es_sequence_name(self): """HACK: This is done for getting the proper translation.""" - return _('Simplified Invoice %s') + return _("Simplified Invoice %s") diff --git a/l10n_es_pos/models/pos_order.py b/l10n_es_pos/models/pos_order.py index b57f0873c35..44b825ac5c1 100644 --- a/l10n_es_pos/models/pos_order.py +++ b/l10n_es_pos/models/pos_order.py @@ -1,59 +1,57 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, fields, models -import odoo.addons.decimal_precision as dp from odoo.tools import float_compare +import odoo.addons.decimal_precision as dp + class PosOrder(models.Model): - _inherit = 'pos.order' + _inherit = "pos.order" is_l10n_es_simplified_invoice = fields.Boolean( - 'Simplified invoice', - copy=False, - default=False, - ) - l10n_es_unique_id = fields.Char( - 'Unique Order ID', - copy=False, + "Simplified invoice", copy=False, default=False, ) + l10n_es_unique_id = fields.Char("Unique Order ID", copy=False,) @api.model def _simplified_limit_check(self, amount_total, limit=3000): - precision_digits = dp.get_precision('Account')(self.env.cr)[1] + precision_digits = dp.get_precision("Account")(self.env.cr)[1] # -1 or 0: amount_total <= limit, simplified # 1: amount_total > limit, can not be simplified - return float_compare( - amount_total, limit, precision_digits=precision_digits) < 0 + return float_compare(amount_total, limit, precision_digits=precision_digits) < 0 @api.model def _order_fields(self, ui_order): res = super(PosOrder, self)._order_fields(ui_order) - if ui_order.get('simplified_invoice', False): - res.update({ - 'pos_reference': ui_order['simplified_invoice'], - 'is_l10n_es_simplified_invoice': True, - }) - res.update({ - 'l10n_es_unique_id': ui_order['uid'], - }) + if ui_order.get("simplified_invoice", False): + res.update( + { + "pos_reference": ui_order["simplified_invoice"], + "is_l10n_es_simplified_invoice": True, + } + ) + res.update( + {"l10n_es_unique_id": ui_order["uid"],} + ) return res @api.model def _process_order(self, pos_order): - simplified_invoice_number = pos_order.get('simplified_invoice', False) + simplified_invoice_number = pos_order.get("simplified_invoice", False) if not simplified_invoice_number: return super(PosOrder, self)._process_order(pos_order) - pos_order_obj = self.env['pos.order'] - pos = self.env['pos.session'].browse( - pos_order.get('pos_session_id')).config_id + pos_order_obj = self.env["pos.order"] + pos = self.env["pos.session"].browse(pos_order.get("pos_session_id")).config_id if pos_order_obj._simplified_limit_check( - pos_order.get('amount_total'), - pos.l10n_es_simplified_invoice_limit): - pos_order.update({ - 'pos_reference': simplified_invoice_number, - 'is_l10n_es_simplified_invoice': True, - }) + pos_order.get("amount_total"), pos.l10n_es_simplified_invoice_limit + ): + pos_order.update( + { + "pos_reference": simplified_invoice_number, + "is_l10n_es_simplified_invoice": True, + } + ) pos.l10n_es_simplified_invoice_sequence_id.next_by_id() return super(PosOrder, self)._process_order(pos_order) @@ -66,7 +64,7 @@ def create_from_ui(self, orders): # those orders that are really unique # TODO: Duplicated simp. invoice ids shouldn't happen but in certain # circumstances it can ocurr, so we choose to save them anyway. - submitted_uids = [o['data']['uid'] for o in orders] + submitted_uids = [o["data"]["uid"] for o in orders] self_ctx = self.with_context(l10n_es_pos_submitted_uids=submitted_uids) return super(PosOrder, self_ctx).create_from_ui(orders) @@ -76,15 +74,16 @@ def search(self, args, offset=0, limit=0, order=None, count=False): the unique_uid to the domain filter. This way, we prevent missing orders if a sequence is reset. If they belong to another session we grant them for valid despite the duped sequence number""" - submitted_uids = self.env.context.get('l10n_es_pos_submitted_uids') + submitted_uids = self.env.context.get("l10n_es_pos_submitted_uids") # Only use these context values for the specific case of # [('pos_reference', 'in', ids)] # to avoid side effects when other calls are received in the same ctx args_set = {x[0]: x[1] for x in args if len(x) > 1} filter_uids = False - if {'pos_reference'}.issubset(args_set): - filter_uids = args_set['pos_reference'] == 'in' + if {"pos_reference"}.issubset(args_set): + filter_uids = args_set["pos_reference"] == "in" if submitted_uids and filter_uids: - args += [('l10n_es_unique_id', 'in', submitted_uids)] - return super().search(args, offset=offset, limit=limit, - order=order, count=count) + args += [("l10n_es_unique_id", "in", submitted_uids)] + return super().search( + args, offset=offset, limit=limit, order=order, count=count + ) diff --git a/l10n_es_pos/static/src/js/models.js b/l10n_es_pos/static/src/js/models.js index adf9590c2d2..3b13abe2058 100644 --- a/l10n_es_pos/static/src/js/models.js +++ b/l10n_es_pos/static/src/js/models.js @@ -3,47 +3,61 @@ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */ -odoo.define('l10n_es_pos.models', function (require) { +odoo.define("l10n_es_pos.models", function(require) { "use strict"; - var models = require('point_of_sale.models'); + var models = require("point_of_sale.models"); var pos_super = models.PosModel.prototype; models.PosModel = models.PosModel.extend({ - initialize: function (attributes, options) { + initialize: function(attributes, options) { pos_super.initialize.apply(this, arguments); this.pushed_simple_invoices = []; return this; }, - get_simple_inv_next_number: function () { - if (this.pushed_simple_invoices.indexOf(this.config.l10n_es_simplified_invoice_number) > -1) { + get_simple_inv_next_number: function() { + if ( + this.pushed_simple_invoices.indexOf( + this.config.l10n_es_simplified_invoice_number + ) > -1 + ) { ++this.config.l10n_es_simplified_invoice_number; } - return this.config.l10n_es_simplified_invoice_prefix+this.get_padding_simple_inv(this.config.l10n_es_simplified_invoice_number); + return ( + this.config.l10n_es_simplified_invoice_prefix + + this.get_padding_simple_inv( + this.config.l10n_es_simplified_invoice_number + ) + ); }, - get_padding_simple_inv: function (number) { - var diff = this.config.l10n_es_simplified_invoice_padding - number.toString().length; - var result = ''; + get_padding_simple_inv: function(number) { + var diff = + this.config.l10n_es_simplified_invoice_padding - + number.toString().length; + var result = ""; if (diff <= 0) { result = number; } else { for (var i = 0; i < diff; i++) { - result += '0'; + result += "0"; } result += number; } return result; }, - push_simple_invoice: function (order) { - if (this.pushed_simple_invoices.indexOf(order.data.simplified_invoice) === -1) { + push_simple_invoice: function(order) { + if ( + this.pushed_simple_invoices.indexOf(order.data.simplified_invoice) === + -1 + ) { this.pushed_simple_invoices.push(order.data.simplified_invoice); ++this.config.l10n_es_simplified_invoice_number; } }, - _flush_orders: function (orders, options) { + _flush_orders: function(orders, options) { var self = this; // Save pushed orders numbers - _.each(orders, function (order) { + _.each(orders, function(order) { if (!order.data.to_invoice) { self.push_simple_invoice(order); } @@ -54,26 +68,25 @@ odoo.define('l10n_es_pos.models', function (require) { var order_super = models.Order.prototype; models.Order = models.Order.extend({ - get_total_with_tax: function () { + get_total_with_tax: function() { var total = order_super.get_total_with_tax.apply(this, arguments); - var below_limit = total <= - this.pos.config.l10n_es_simplified_invoice_limit; + var below_limit = total <= this.pos.config.l10n_es_simplified_invoice_limit; this.is_simplified_invoice = below_limit && this.pos.config.iface_l10n_es_simplified_invoice; return total; }, - set_simple_inv_number: function () { + set_simple_inv_number: function() { this.simplified_invoice = this.pos.get_simple_inv_next_number(); this.name = this.simplified_invoice; this.is_simplified_invoice = true; }, - get_base_by_tax: function () { + get_base_by_tax: function() { var base_by_tax = {}; - this.get_orderlines().forEach(function (line) { + this.get_orderlines().forEach(function(line) { var tax_detail = line.get_tax_details(); var base_price = line.get_price_without_tax(); if (tax_detail) { - Object.keys(tax_detail).forEach(function (tax) { + Object.keys(tax_detail).forEach(function(tax) { if (Object.keys(base_by_tax).includes(tax)) { base_by_tax[tax] += base_price; } else { @@ -84,12 +97,12 @@ odoo.define('l10n_es_pos.models', function (require) { }); return base_by_tax; }, - init_from_JSON: function (json) { + init_from_JSON: function(json) { order_super.init_from_JSON.apply(this, arguments); this.to_invoice = json.to_invoice; this.simplified_invoice = json.simplified_invoice; }, - export_as_JSON: function () { + export_as_JSON: function() { var res = order_super.export_as_JSON.apply(this, arguments); res.to_invoice = this.is_to_invoice(); if (!res.to_invoice) { @@ -99,6 +112,5 @@ odoo.define('l10n_es_pos.models', function (require) { }, }); - models.load_fields('res.company', ['street', 'city', 'state_id', 'zip']); - + models.load_fields("res.company", ["street", "city", "state_id", "zip"]); }); diff --git a/l10n_es_pos/static/src/js/screens.js b/l10n_es_pos/static/src/js/screens.js index 9c1e16a31a6..5ff81b8dd2a 100644 --- a/l10n_es_pos/static/src/js/screens.js +++ b/l10n_es_pos/static/src/js/screens.js @@ -3,18 +3,18 @@ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */ -odoo.define('l10n_es_pos.screens', function (require) { +odoo.define("l10n_es_pos.screens", function(require) { "use strict"; - var screens = require('point_of_sale.screens'); - + var screens = require("point_of_sale.screens"); screens.PaymentScreenWidget.include({ // When the order total is above the simplified invoice limit, wich // will be the legal one on each case, it's mandatory to force the // invoice in any case. - validate_order: function (force_validate) { - var below_limit = this.pos.get_order().get_total_with_tax() <= + validate_order: function(force_validate) { + var below_limit = + this.pos.get_order().get_total_with_tax() <= this.pos.config.l10n_es_simplified_invoice_limit; if (this.pos.config.iface_l10n_es_simplified_invoice) { var order = this.pos.get_order(); @@ -28,5 +28,4 @@ odoo.define('l10n_es_pos.screens', function (require) { this._super(force_validate); }, }); - }); diff --git a/l10n_es_pos/static/src/xml/pos.xml b/l10n_es_pos/static/src/xml/pos.xml index db1b7d1f5aa..0894d60497e 100644 --- a/l10n_es_pos/static/src/xml/pos.xml +++ b/l10n_es_pos/static/src/xml/pos.xml @@ -1,23 +1,29 @@ - + - - -
Simplified invoice: + +
+ Simplified invoice:

- VAT: + VAT: - + +
+
-
- - + + () @@ -45,34 +51,42 @@ - + - on + on - - -
- Simplified invoice -
+ +
+ Simplified invoice +
- -
+ +
Customer data
- Name:
- VAT:
- Address: + Name:
+ VAT:
+ Address:
on -
diff --git a/l10n_es_pos/views/pos_templates.xml b/l10n_es_pos/views/pos_templates.xml index 747bf223e18..e830c3d8487 100644 --- a/l10n_es_pos/views/pos_templates.xml +++ b/l10n_es_pos/views/pos_templates.xml @@ -1,11 +1,12 @@ - + -