From 0ffc19fe9f4e8929970fda9ba5c9d8845a928b1f Mon Sep 17 00:00:00 2001 From: archetipo Date: Mon, 12 Oct 2015 09:05:24 +0200 Subject: [PATCH 1/4] [IMP] init new module --- .../README.rst | 65 ++++++++++++++++ .../__init__.py | 23 ++++++ .../__openerp__.py | 33 +++++++++ .../account.py | 68 +++++++++++++++++ .../company.py | 62 ++++++++++++++++ .../i18n/account_invoice_rounding.pot | 74 +++++++++++++++++++ .../i18n/de.po | 59 +++++++++++++++ .../i18n/en.po | 59 +++++++++++++++ .../i18n/es.po | 60 +++++++++++++++ .../i18n/fr.po | 62 ++++++++++++++++ .../i18n/it.po | 59 +++++++++++++++ .../i18n/nl.po | 59 +++++++++++++++ .../i18n/pt_BR.po | 60 +++++++++++++++ .../i18n/sl.po | 60 +++++++++++++++ .../i18n/zh_CN.po | 59 +++++++++++++++ .../res_company.xml | 28 +++++++ 16 files changed, 890 insertions(+) create mode 100644 account_invoice_rounding_by_currency/README.rst create mode 100644 account_invoice_rounding_by_currency/__init__.py create mode 100644 account_invoice_rounding_by_currency/__openerp__.py create mode 100644 account_invoice_rounding_by_currency/account.py create mode 100644 account_invoice_rounding_by_currency/company.py create mode 100644 account_invoice_rounding_by_currency/i18n/account_invoice_rounding.pot create mode 100644 account_invoice_rounding_by_currency/i18n/de.po create mode 100644 account_invoice_rounding_by_currency/i18n/en.po create mode 100644 account_invoice_rounding_by_currency/i18n/es.po create mode 100644 account_invoice_rounding_by_currency/i18n/fr.po create mode 100644 account_invoice_rounding_by_currency/i18n/it.po create mode 100644 account_invoice_rounding_by_currency/i18n/nl.po create mode 100644 account_invoice_rounding_by_currency/i18n/pt_BR.po create mode 100644 account_invoice_rounding_by_currency/i18n/sl.po create mode 100644 account_invoice_rounding_by_currency/i18n/zh_CN.po create mode 100644 account_invoice_rounding_by_currency/res_company.xml diff --git a/account_invoice_rounding_by_currency/README.rst b/account_invoice_rounding_by_currency/README.rst new file mode 100644 index 000000000000..6c899a3e2d32 --- /dev/null +++ b/account_invoice_rounding_by_currency/README.rst @@ -0,0 +1,65 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Unit rounded invoice (_`Swedish rounding`) by currency +========================================== + +This module extende functionallity of module Unit rounded invoice + +Add a parameter to give a unit for rounding such as CHF 0.05 for Swiss +invoices + +In Settings -> Configuration -> Accounting you will find 2 new types of +rounding + +- `Swedish Round globally` + + To round your invoice total amount, this option will do the adjustment in + the most important tax line of your invoice. + +- `Swedish Round by adding an invoice line` + + To round your invoice total amount, this option create a invoice line without + taxes on it. This invoice line is tagged as `is_rounding` + +You can choose the account on which the invoice line will be written + +.. _Swedish rounding : https://en.wikipedia.org/wiki/Swedish_rounding + + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/PR/8.0 + + +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 `_. + + +Credits +======= + +Contributors +------------ +Alessio Gerace + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://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 http://odoo-community.org. diff --git a/account_invoice_rounding_by_currency/__init__.py b/account_invoice_rounding_by_currency/__init__.py new file mode 100644 index 000000000000..a3b025848dc2 --- /dev/null +++ b/account_invoice_rounding_by_currency/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 Agile Business Group sagl () +# Author: Alessio Gerace +# +# 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 company +from . import account +# from . import tests diff --git a/account_invoice_rounding_by_currency/__openerp__.py b/account_invoice_rounding_by_currency/__openerp__.py new file mode 100644 index 000000000000..1334bc82ebd8 --- /dev/null +++ b/account_invoice_rounding_by_currency/__openerp__.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 Agile Business Group sagl () +# Author: Alessio Gerace +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{'name': 'Unit rounded invoice by currencies', + 'version': '8.0.1.0.0', + 'category': 'Accounting', + 'author': "Agile Business Group,,Odoo Community Association (OCA)", + 'maintainer': 'Camptocamp', + 'website': 'http://www.agilebg.com/', + 'license': 'AGPL-3', + 'depends': ['account_invoice_rounding'], + 'data': ['res_company.xml'], + 'installable': True, + 'auto_install': False, + 'application': False, + } diff --git a/account_invoice_rounding_by_currency/account.py b/account_invoice_rounding_by_currency/account.py new file mode 100644 index 000000000000..badc12b23897 --- /dev/null +++ b/account_invoice_rounding_by_currency/account.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 Agile Business Group sagl () +# Author: Alessio Gerace +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp import models, fields, api +from openerp.tools.float_utils import float_round, float_compare +from openerp.tools.translate import _ + +import openerp.addons.decimal_precision as dp + + +class AccountInvoice(models.Model): + _inherit = "account.invoice" + + + def _compute_swedish_rounding(self, cr, uid, invoice, context=None): + """ + Depending on the method defined, we add an invoice line or adapt the + tax lines to have a rounded total amount on the invoice + :param invoice: invoice browse record + :return dict: updated values for _amount_all + """ + # avoid recusivity + + if 'swedish_write' in context: + return {} + rounding_rule_model = self.pool.get('company.rounding') + company = invoice.company_id + round_method = '' + rounding_prec = 0.0 + if invoice.currency_id.id != company.currency_id.id: + ret_ids = rounding_rule_model.search( + [ + ('company_id', '=', company.id), + ('currency_id', '=', invoice.currency_id.id), + ]) + if ret_ids: + rule = rounding_rule_model.browse(ret_ids[0]) + company.tax_calculation_rounding_method =( + rule.tax_calculation_rounding_method) + company.tax_calculation_rounding = ( + rule.tax_calculation_rounding) + company.tax_calculation_rounding_account_id = ( + rule.tax_calculation_rounding_account_id) + else: + return {} + + return super(AccountInvoice, self)._compute_swedish_rounding( + cr, uid, invoice, context=context) + + + diff --git a/account_invoice_rounding_by_currency/company.py b/account_invoice_rounding_by_currency/company.py new file mode 100644 index 000000000000..23ee134c5171 --- /dev/null +++ b/account_invoice_rounding_by_currency/company.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 Agile Business Group sagl () +# Author: Alessio Gerace +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp import models, fields + + +class RoundingByCurrency(models.Model): + _name = 'company.rounding' + + company_id =fields.Many2one('res.company', 'Company', required=True) + currency_id = fields.Many2one('res.currency', 'Currency', required=True) + tax_calculation_rounding = fields.Float('Tax Rounding unit') + tax_calculation_rounding_account_id = fields.Many2one( + 'account.account', + 'Tax Rounding Account', + domain=[('type', '<>', 'view')]) + tax_calculation_rounding_method = fields.Selection( + [ + ('swedish_round_globally', 'Swedish Round globally'), + ('swedish_add_invoice_line', 'Swedish Round by adding a line'), + ], + string='Tax Calculation Rounding Method', + help="If you select 'Round per line' : for each tax, the tax " + "amount will first be computed and rounded for each " + "PO/SO/invoice line and then these rounded amounts will be " + "summed, leading to the total amount for that tax. If you " + "select 'Round globally': for each tax, the tax amount will " + "be computed for each PO/SO/invoice line, then these amounts" + " will be summed and eventually this total tax amount will " + "be rounded. If you sell with tax included, you should " + "choose 'Round per line' because you certainly want the sum " + "of your tax-included line subtotals to be equal to the " + "total amount with taxes.") + + _sql_constraints = [ + ('currency_id_uniq_per+company', 'unique (currency_id, company_id)', + 'Currency must be unique per Company!'), + ] + +class ResCompany(models.Model): + _inherit = 'res.company' + + currency_rounding_rules = fields.One2many( + 'company.rounding', 'company_id', + 'Rounding Rule') \ No newline at end of file diff --git a/account_invoice_rounding_by_currency/i18n/account_invoice_rounding.pot b/account_invoice_rounding_by_currency/i18n/account_invoice_rounding.pot new file mode 100644 index 000000000000..3e1a828acc8b --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/account_invoice_rounding.pot @@ -0,0 +1,74 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-01-14 15:15+0000\n" +"PO-Revision-Date: 2014-01-14 15:15+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: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "" + +#. module: account_invoice_rounding +#: field:account.invoice,global_round_line_id:0 +msgid "Invoice Line for total rounding" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_config_settings +msgid "account.config.settings" +msgstr "" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:52 +#, python-format +msgid "Rounding" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "" + +#. module: account_invoice_rounding +#: field:account.config.settings,tax_calculation_rounding:0 +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_invoice_rounding +#: field:account.config.settings,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding account" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "account.tax" +msgstr "" + diff --git a/account_invoice_rounding_by_currency/i18n/de.po b/account_invoice_rounding_by_currency/i18n/de.po new file mode 100644 index 000000000000..2893dde3c1c0 --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/de.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-25 16:48+0000\n" +"PO-Revision-Date: 2015-06-03 04:58+0000\n" +"Last-Translator: <>\n" +"Language-Team: German (http://www.transifex.com/oca/OCA-account-invoicing-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "Rechnungsposition" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "" diff --git a/account_invoice_rounding_by_currency/i18n/en.po b/account_invoice_rounding_by_currency/i18n/en.po new file mode 100644 index 000000000000..2eba69d3ded6 --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/en.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-25 16:48+0000\n" +"PO-Revision-Date: 2015-06-03 04:58+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: English (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "Companies" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "Invoice" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "Invoice Line" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "Rounding" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "Rounding Line" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "Tax" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "Tax Rounding Account" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "Tax Rounding unit" diff --git a/account_invoice_rounding_by_currency/i18n/es.po b/account_invoice_rounding_by_currency/i18n/es.po new file mode 100644 index 000000000000..41a9a31b85b9 --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/es.po @@ -0,0 +1,60 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +# FIRST AUTHOR , 2014 +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-25 16:48+0000\n" +"PO-Revision-Date: 2015-06-03 05:10+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-account-invoicing-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "Línea de factura" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "Redondeo" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "Línea de redondeo" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "Cuenta de redondeo del impuesto" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "Unidad de redondeo del impuesto" diff --git a/account_invoice_rounding_by_currency/i18n/fr.po b/account_invoice_rounding_by_currency/i18n/fr.po new file mode 100644 index 000000000000..34433455a770 --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/fr.po @@ -0,0 +1,62 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +# Bruno JOLIVEAU, 2015 +# Bruno JOLIVEAU, 2015 +# Maxime Chambreuil , 2015 +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-09 12:43+0000\n" +"PO-Revision-Date: 2015-09-12 22:39+0000\n" +"Last-Translator: Maxime Chambreuil \n" +"Language-Team: French (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "Facture" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "Ligne de facture" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "Arrondi" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "Ligne d'arrondi" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "Taxe" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "Compte d'arrondi des taxes" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "Unité d'arrondi des taxes" diff --git a/account_invoice_rounding_by_currency/i18n/it.po b/account_invoice_rounding_by_currency/i18n/it.po new file mode 100644 index 000000000000..e73bb44b885c --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/it.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-25 16:48+0000\n" +"PO-Revision-Date: 2015-06-03 04:58+0000\n" +"Last-Translator: <>\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-account-invoicing-8-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "Fattura" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "Righe Fattura" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "" diff --git a/account_invoice_rounding_by_currency/i18n/nl.po b/account_invoice_rounding_by_currency/i18n/nl.po new file mode 100644 index 000000000000..13820b349325 --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/nl.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-25 16:48+0000\n" +"PO-Revision-Date: 2015-06-03 04:58+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "Factuur" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "" diff --git a/account_invoice_rounding_by_currency/i18n/pt_BR.po b/account_invoice_rounding_by_currency/i18n/pt_BR.po new file mode 100644 index 000000000000..8d691db1088d --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/pt_BR.po @@ -0,0 +1,60 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +# danimaribeiro , 2015 +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-25 16:48+0000\n" +"PO-Revision-Date: 2015-06-19 02:03+0000\n" +"Last-Translator: danimaribeiro \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "Empresas" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "Fatura" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "LInha da fatura" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "Arredondamento" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "Arredondamento na linha" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "Imposto" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "Conta de arredondamento de impostos" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "Unidade de arredondamento de imposto" diff --git a/account_invoice_rounding_by_currency/i18n/sl.po b/account_invoice_rounding_by_currency/i18n/sl.po new file mode 100644 index 000000000000..ac74d3c226ce --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/sl.po @@ -0,0 +1,60 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-25 16:48+0000\n" +"PO-Revision-Date: 2015-08-16 11:39+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "Družbe" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "Račun" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "Postavka računa" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "Zaokroževanje" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "Postavka zaokroževanja" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "Davek" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "Konto zaokroževanja davka" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "Enota zaokroževanja davka" diff --git a/account_invoice_rounding_by_currency/i18n/zh_CN.po b/account_invoice_rounding_by_currency/i18n/zh_CN.po new file mode 100644 index 000000000000..9d1ee66473a1 --- /dev/null +++ b/account_invoice_rounding_by_currency/i18n/zh_CN.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_rounding +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: account-invoicing (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-25 16:48+0000\n" +"PO-Revision-Date: 2015-06-03 04:58+0000\n" +"Last-Translator: <>\n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-account-invoicing-8-0/language/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice +msgid "Invoice" +msgstr "发票" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line +msgid "Invoice Line" +msgstr "" + +#. module: account_invoice_rounding +#: code:addons/account_invoice_rounding/account.py:42 +#, python-format +msgid "Rounding" +msgstr "" + +#. module: account_invoice_rounding +#: field:account.invoice.line,is_rounding:0 +msgid "Rounding Line" +msgstr "" + +#. module: account_invoice_rounding +#: model:ir.model,name:account_invoice_rounding.model_account_tax +msgid "Tax" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding_account_id:0 +msgid "Tax Rounding Account" +msgstr "" + +#. module: account_invoice_rounding +#: field:res.company,tax_calculation_rounding:0 +msgid "Tax Rounding unit" +msgstr "" diff --git a/account_invoice_rounding_by_currency/res_company.xml b/account_invoice_rounding_by_currency/res_company.xml new file mode 100644 index 000000000000..7e370ba4e6be --- /dev/null +++ b/account_invoice_rounding_by_currency/res_company.xml @@ -0,0 +1,28 @@ + + + + + + res.company.add.rounding.correncies + res.company + 50 + + + + + + + + + + + + + + + + + + + From bddf322285feb1a8b1013614f4c5edb2cf7be8d5 Mon Sep 17 00:00:00 2001 From: archetipo Date: Mon, 12 Oct 2015 16:37:39 +0200 Subject: [PATCH 2/4] [FIX] module and description --- account_invoice_rounding_by_currency/README.rst | 7 ++++--- account_invoice_rounding_by_currency/__openerp__.py | 2 +- account_invoice_rounding_by_currency/account.py | 6 ++++-- .../tests/tests_rounding_by_currencies.py | 0 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 account_invoice_rounding_by_currency/tests/tests_rounding_by_currencies.py diff --git a/account_invoice_rounding_by_currency/README.rst b/account_invoice_rounding_by_currency/README.rst index 6c899a3e2d32..e7cc02df178a 100644 --- a/account_invoice_rounding_by_currency/README.rst +++ b/account_invoice_rounding_by_currency/README.rst @@ -4,13 +4,14 @@ Unit rounded invoice (_`Swedish rounding`) by currency ========================================== -This module extende functionallity of module Unit rounded invoice +This module extende functionallity of module `Unit rounded invoice `_. Add a parameter to give a unit for rounding such as CHF 0.05 for Swiss invoices -In Settings -> Configuration -> Accounting you will find 2 new types of -rounding +In Settings -> Company -> Configurations you will find +Currencies Rounding Rules +Set currency rule for aech type of currency you need hadled. - `Swedish Round globally` diff --git a/account_invoice_rounding_by_currency/__openerp__.py b/account_invoice_rounding_by_currency/__openerp__.py index 1334bc82ebd8..d4d74cc0e57c 100644 --- a/account_invoice_rounding_by_currency/__openerp__.py +++ b/account_invoice_rounding_by_currency/__openerp__.py @@ -18,7 +18,7 @@ # along with this program. If not, see . # ############################################################################## -{'name': 'Unit rounded invoice by currencies', +{'name': 'Unit rounded invoice by Currency', 'version': '8.0.1.0.0', 'category': 'Accounting', 'author': "Agile Business Group,,Odoo Community Association (OCA)", diff --git a/account_invoice_rounding_by_currency/account.py b/account_invoice_rounding_by_currency/account.py index badc12b23897..5b727a846b5b 100644 --- a/account_invoice_rounding_by_currency/account.py +++ b/account_invoice_rounding_by_currency/account.py @@ -46,12 +46,14 @@ def _compute_swedish_rounding(self, cr, uid, invoice, context=None): rounding_prec = 0.0 if invoice.currency_id.id != company.currency_id.id: ret_ids = rounding_rule_model.search( + cr, uid, [ ('company_id', '=', company.id), ('currency_id', '=', invoice.currency_id.id), - ]) + ], + context=context) if ret_ids: - rule = rounding_rule_model.browse(ret_ids[0]) + rule = rounding_rule_model.browse(cr, uid, ret_ids[0], context=context) company.tax_calculation_rounding_method =( rule.tax_calculation_rounding_method) company.tax_calculation_rounding = ( diff --git a/account_invoice_rounding_by_currency/tests/tests_rounding_by_currencies.py b/account_invoice_rounding_by_currency/tests/tests_rounding_by_currencies.py new file mode 100644 index 000000000000..e69de29bb2d1 From 662ef7ef6d263f62ed07baed1947519cf39cff2b Mon Sep 17 00:00:00 2001 From: archetipo Date: Mon, 12 Oct 2015 18:26:13 +0200 Subject: [PATCH 3/4] [FIX] Flake8 [IMP] test case [IMP] security rule [IMP] ITA Translation --- .../README.rst | 9 +- .../__init__.py | 2 +- .../__openerp__.py | 31 +++-- .../account.py | 17 +-- .../company.py | 38 +++--- .../demo/data.xml | 114 ++++++++++++++++ .../i18n/account_invoice_rounding.pot | 74 ----------- .../i18n/de.po | 59 --------- .../i18n/en.po | 59 --------- .../i18n/es.po | 60 --------- .../i18n/fr.po | 62 --------- .../i18n/it.po | 122 ++++++++++++------ .../i18n/nl.po | 59 --------- .../i18n/pt_BR.po | 60 --------- .../i18n/sl.po | 60 --------- .../i18n/zh_CN.po | 59 --------- .../security/ir.model.access.csv | 2 + .../tests/__init__.py | 21 +++ .../tests/test_rounding_by_currencies.py | 81 ++++++++++++ .../tests/tests_rounding_by_currencies.py | 0 20 files changed, 350 insertions(+), 639 deletions(-) create mode 100644 account_invoice_rounding_by_currency/demo/data.xml delete mode 100644 account_invoice_rounding_by_currency/i18n/account_invoice_rounding.pot delete mode 100644 account_invoice_rounding_by_currency/i18n/de.po delete mode 100644 account_invoice_rounding_by_currency/i18n/en.po delete mode 100644 account_invoice_rounding_by_currency/i18n/es.po delete mode 100644 account_invoice_rounding_by_currency/i18n/fr.po delete mode 100644 account_invoice_rounding_by_currency/i18n/nl.po delete mode 100644 account_invoice_rounding_by_currency/i18n/pt_BR.po delete mode 100644 account_invoice_rounding_by_currency/i18n/sl.po delete mode 100644 account_invoice_rounding_by_currency/i18n/zh_CN.po create mode 100644 account_invoice_rounding_by_currency/security/ir.model.access.csv create mode 100644 account_invoice_rounding_by_currency/tests/__init__.py create mode 100644 account_invoice_rounding_by_currency/tests/test_rounding_by_currencies.py delete mode 100644 account_invoice_rounding_by_currency/tests/tests_rounding_by_currencies.py diff --git a/account_invoice_rounding_by_currency/README.rst b/account_invoice_rounding_by_currency/README.rst index e7cc02df178a..e648c443be5d 100644 --- a/account_invoice_rounding_by_currency/README.rst +++ b/account_invoice_rounding_by_currency/README.rst @@ -1,8 +1,8 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg :alt: License: AGPL-3 -Unit rounded invoice (_`Swedish rounding`) by currency -========================================== +Unit rounded invoice (Swedish rounding) by currency +======================================================= This module extende functionallity of module `Unit rounded invoice `_. @@ -23,9 +23,6 @@ Set currency rule for aech type of currency you need hadled. To round your invoice total amount, this option create a invoice line without taxes on it. This invoice line is tagged as `is_rounding` -You can choose the account on which the invoice line will be written - -.. _Swedish rounding : https://en.wikipedia.org/wiki/Swedish_rounding Usage @@ -33,7 +30,7 @@ Usage .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/PR/8.0 + :target: https://runbot.odoo-community.org/runbot/95/8.0 Bug Tracker diff --git a/account_invoice_rounding_by_currency/__init__.py b/account_invoice_rounding_by_currency/__init__.py index a3b025848dc2..06173e1fc189 100644 --- a/account_invoice_rounding_by_currency/__init__.py +++ b/account_invoice_rounding_by_currency/__init__.py @@ -20,4 +20,4 @@ ############################################################################## from . import company from . import account -# from . import tests +from . import tests diff --git a/account_invoice_rounding_by_currency/__openerp__.py b/account_invoice_rounding_by_currency/__openerp__.py index d4d74cc0e57c..af23cf944095 100644 --- a/account_invoice_rounding_by_currency/__openerp__.py +++ b/account_invoice_rounding_by_currency/__openerp__.py @@ -18,16 +18,21 @@ # along with this program. If not, see . # ############################################################################## -{'name': 'Unit rounded invoice by Currency', - 'version': '8.0.1.0.0', - 'category': 'Accounting', - 'author': "Agile Business Group,,Odoo Community Association (OCA)", - 'maintainer': 'Camptocamp', - 'website': 'http://www.agilebg.com/', - 'license': 'AGPL-3', - 'depends': ['account_invoice_rounding'], - 'data': ['res_company.xml'], - 'installable': True, - 'auto_install': False, - 'application': False, - } +{ + 'name': 'Unit rounded invoice by Currency', + 'version': '8.0.1.0.0', + 'category': 'Accounting', + 'author': "Agile Business Group,,Odoo Community Association (OCA)", + 'maintainer': 'Camptocamp', + 'website': 'http://www.agilebg.com/', + 'license': 'AGPL-3', + 'depends': ['account_invoice_rounding'], + 'data': [ + 'res_company.xml', + 'security/ir.model.access.csv', + ], + "demo": ['demo/data.xml'], + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/account_invoice_rounding_by_currency/account.py b/account_invoice_rounding_by_currency/account.py index 5b727a846b5b..e8ba3542e08a 100644 --- a/account_invoice_rounding_by_currency/account.py +++ b/account_invoice_rounding_by_currency/account.py @@ -18,17 +18,12 @@ # along with this program. If not, see . # ############################################################################## -from openerp import models, fields, api -from openerp.tools.float_utils import float_round, float_compare -from openerp.tools.translate import _ - -import openerp.addons.decimal_precision as dp +from openerp import models class AccountInvoice(models.Model): _inherit = "account.invoice" - def _compute_swedish_rounding(self, cr, uid, invoice, context=None): """ Depending on the method defined, we add an invoice line or adapt the @@ -42,8 +37,6 @@ def _compute_swedish_rounding(self, cr, uid, invoice, context=None): return {} rounding_rule_model = self.pool.get('company.rounding') company = invoice.company_id - round_method = '' - rounding_prec = 0.0 if invoice.currency_id.id != company.currency_id.id: ret_ids = rounding_rule_model.search( cr, uid, @@ -53,8 +46,9 @@ def _compute_swedish_rounding(self, cr, uid, invoice, context=None): ], context=context) if ret_ids: - rule = rounding_rule_model.browse(cr, uid, ret_ids[0], context=context) - company.tax_calculation_rounding_method =( + rule = rounding_rule_model.browse( + cr, uid, ret_ids[0], context=context) + company.tax_calculation_rounding_method = ( rule.tax_calculation_rounding_method) company.tax_calculation_rounding = ( rule.tax_calculation_rounding) @@ -65,6 +59,3 @@ def _compute_swedish_rounding(self, cr, uid, invoice, context=None): return super(AccountInvoice, self)._compute_swedish_rounding( cr, uid, invoice, context=context) - - - diff --git a/account_invoice_rounding_by_currency/company.py b/account_invoice_rounding_by_currency/company.py index 23ee134c5171..8c423f3df23f 100644 --- a/account_invoice_rounding_by_currency/company.py +++ b/account_invoice_rounding_by_currency/company.py @@ -24,39 +24,43 @@ class RoundingByCurrency(models.Model): _name = 'company.rounding' - company_id =fields.Many2one('res.company', 'Company', required=True) + company_id = fields.Many2one('res.company', 'Company', required=True) currency_id = fields.Many2one('res.currency', 'Currency', required=True) tax_calculation_rounding = fields.Float('Tax Rounding unit') tax_calculation_rounding_account_id = fields.Many2one( 'account.account', 'Tax Rounding Account', - domain=[('type', '<>', 'view')]) + domain=[('type', '<>', 'view')] + ) tax_calculation_rounding_method = fields.Selection( [ - ('swedish_round_globally', 'Swedish Round globally'), - ('swedish_add_invoice_line', 'Swedish Round by adding a line'), - ], + ('swedish_round_globally', 'Swedish Round globally'), + ('swedish_add_invoice_line', 'Swedish Round by adding a line'), + ], string='Tax Calculation Rounding Method', help="If you select 'Round per line' : for each tax, the tax " - "amount will first be computed and rounded for each " - "PO/SO/invoice line and then these rounded amounts will be " - "summed, leading to the total amount for that tax. If you " - "select 'Round globally': for each tax, the tax amount will " - "be computed for each PO/SO/invoice line, then these amounts" - " will be summed and eventually this total tax amount will " - "be rounded. If you sell with tax included, you should " - "choose 'Round per line' because you certainly want the sum " - "of your tax-included line subtotals to be equal to the " - "total amount with taxes.") + "amount will first be computed and rounded for each " + "PO/SO/invoice line and then these rounded amounts will be " + "summed, leading to the total amount for that tax. If you " + "select 'Round globally': for each tax, the tax amount will " + "be computed for each PO/SO/invoice line, then these amounts" + " will be summed and eventually this total tax amount will " + "be rounded. If you sell with tax included, you should " + "choose 'Round per line' because you certainly want the sum " + "of your tax-included line subtotals to be equal to the " + "total amount with taxes." + ) _sql_constraints = [ ('currency_id_uniq_per+company', 'unique (currency_id, company_id)', 'Currency must be unique per Company!'), ] + class ResCompany(models.Model): _inherit = 'res.company' currency_rounding_rules = fields.One2many( - 'company.rounding', 'company_id', - 'Rounding Rule') \ No newline at end of file + 'company.rounding', 'company_id', + 'Rounding Rule' + ) diff --git a/account_invoice_rounding_by_currency/demo/data.xml b/account_invoice_rounding_by_currency/demo/data.xml new file mode 100644 index 000000000000..95d11525e4bb --- /dev/null +++ b/account_invoice_rounding_by_currency/demo/data.xml @@ -0,0 +1,114 @@ + + + + + + + + IVA a credito 10% + + + + IVA a credito 10% (imponibile) + + + + 10% test + 10 + 0.10 + + + + + + + + + + + + + + + + + + + + + + + + out_invoice + + + + + + + + + + + + + + [PCSC234] PC Assemble SC234-2 + + + + + + + + + + + out_invoice + + + + + + + + + + + + + + [PCSC234] PC Assemble SC234-2 + + + + + + + + + + out_invoice + + + + + + + + + + + + + + [PCSC234] PC Assemble SC234-2 + + + + diff --git a/account_invoice_rounding_by_currency/i18n/account_invoice_rounding.pot b/account_invoice_rounding_by_currency/i18n/account_invoice_rounding.pot deleted file mode 100644 index 3e1a828acc8b..000000000000 --- a/account_invoice_rounding_by_currency/i18n/account_invoice_rounding.pot +++ /dev/null @@ -1,74 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-14 15:15+0000\n" -"PO-Revision-Date: 2014-01-14 15:15+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: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "" - -#. module: account_invoice_rounding -#: field:account.invoice,global_round_line_id:0 -msgid "Invoice Line for total rounding" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_config_settings -msgid "account.config.settings" -msgstr "" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:52 -#, python-format -msgid "Rounding" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "" - -#. module: account_invoice_rounding -#: field:account.config.settings,tax_calculation_rounding:0 -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "" - -#. module: account_invoice_rounding -#: field:account.config.settings,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding account" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "account.tax" -msgstr "" - diff --git a/account_invoice_rounding_by_currency/i18n/de.po b/account_invoice_rounding_by_currency/i18n/de.po deleted file mode 100644 index 2893dde3c1c0..000000000000 --- a/account_invoice_rounding_by_currency/i18n/de.po +++ /dev/null @@ -1,59 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-25 16:48+0000\n" -"PO-Revision-Date: 2015-06-03 04:58+0000\n" -"Last-Translator: <>\n" -"Language-Team: German (http://www.transifex.com/oca/OCA-account-invoicing-8-0/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "Rechnungsposition" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "" diff --git a/account_invoice_rounding_by_currency/i18n/en.po b/account_invoice_rounding_by_currency/i18n/en.po deleted file mode 100644 index 2eba69d3ded6..000000000000 --- a/account_invoice_rounding_by_currency/i18n/en.po +++ /dev/null @@ -1,59 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-25 16:48+0000\n" -"PO-Revision-Date: 2015-06-03 04:58+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: English (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "Companies" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "Invoice" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "Invoice Line" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "Rounding" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "Rounding Line" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "Tax" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "Tax Rounding Account" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "Tax Rounding unit" diff --git a/account_invoice_rounding_by_currency/i18n/es.po b/account_invoice_rounding_by_currency/i18n/es.po deleted file mode 100644 index 41a9a31b85b9..000000000000 --- a/account_invoice_rounding_by_currency/i18n/es.po +++ /dev/null @@ -1,60 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: -# FIRST AUTHOR , 2014 -msgid "" -msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-25 16:48+0000\n" -"PO-Revision-Date: 2015-06-03 05:10+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-account-invoicing-8-0/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "Compañías" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "Factura" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "Línea de factura" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "Redondeo" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "Línea de redondeo" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "Cuenta de redondeo del impuesto" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "Unidad de redondeo del impuesto" diff --git a/account_invoice_rounding_by_currency/i18n/fr.po b/account_invoice_rounding_by_currency/i18n/fr.po deleted file mode 100644 index 34433455a770..000000000000 --- a/account_invoice_rounding_by_currency/i18n/fr.po +++ /dev/null @@ -1,62 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: -# Bruno JOLIVEAU, 2015 -# Bruno JOLIVEAU, 2015 -# Maxime Chambreuil , 2015 -msgid "" -msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-09 12:43+0000\n" -"PO-Revision-Date: 2015-09-12 22:39+0000\n" -"Last-Translator: Maxime Chambreuil \n" -"Language-Team: French (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "Sociétés" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "Facture" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "Ligne de facture" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "Arrondi" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "Ligne d'arrondi" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "Taxe" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "Compte d'arrondi des taxes" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "Unité d'arrondi des taxes" diff --git a/account_invoice_rounding_by_currency/i18n/it.po b/account_invoice_rounding_by_currency/i18n/it.po index e73bb44b885c..b380f454b09c 100644 --- a/account_invoice_rounding_by_currency/i18n/it.po +++ b/account_invoice_rounding_by_currency/i18n/it.po @@ -1,59 +1,107 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: +# * account_invoice_rounding_by_currency +# msgid "" msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" +"Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-25 16:48+0000\n" -"PO-Revision-Date: 2015-06-03 04:58+0000\n" +"POT-Creation-Date: 2015-10-12 16:28+0000\n" +"PO-Revision-Date: 2015-10-12 16:28+0000\n" "Last-Translator: <>\n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-account-invoicing-8-0/language/it/)\n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: \n" -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company +#. module: account_invoice_rounding_by_currency +#: model:ir.model,name:account_invoice_rounding_by_currency.model_res_company msgid "Companies" -msgstr "" +msgstr "Aziende" + +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,company_id:0 +msgid "Company" +msgstr "Company" + +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,create_uid:0 +msgid "Created by" +msgstr "Created by" + +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,create_date:0 +msgid "Created on" +msgstr "Created on" + +#. module: account_invoice_rounding_by_currency +#: view:res.company:account_invoice_rounding_by_currency.view_res_company_currencies_settings +msgid "Currencies Rounding Rules" +msgstr "Regole di Arrotondamento per Valuta" + +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,currency_id:0 +msgid "Currency" +msgstr "Valuta" + +#. module: account_invoice_rounding_by_currency +#: sql_constraint:company.rounding:0 +msgid "Currency must be unique per Company!" +msgstr "LA valuta deve essere univoca per azienda!" + +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_invoice_rounding_by_currency +#: help:company.rounding,tax_calculation_rounding_method:0 +msgid "If you select 'Round per line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes." +msgstr "Se si seleziona 'Arrotondamento per riga ' : per ciascuna imposta , l'importo dell'imposta viene calcolato e arrotondato per ogni riga di fattura e quindi tali importi arrotondati verranno riassunti , nella somma totale per tale imposta . Se si seleziona 'Arrotondamento a livello globale ' : per ciascuna imposta , l'importo dell'imposta sarà calcolato, quindi questi importi saranno sommati e alla fine l'importo totale dell'imposta sarà arrotondato . Se si vende con tasse incluse , si dovrebbe scegliere 'Arrotondamento per linea ' perché si vuole certamente la somma dei subtotali per riga fiscale incluso per essere pari all'importo totale con le tasse" -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice +#. module: account_invoice_rounding_by_currency +#: model:ir.model,name:account_invoice_rounding_by_currency.model_account_invoice msgid "Invoice" msgstr "Fattura" -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "Righe Fattura" +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,write_uid:0 +msgid "Last Updated by" +msgstr "Last Updated by" -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "" +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,write_date:0 +msgid "Last Updated on" +msgstr "Last Updated on" -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "" +#. module: account_invoice_rounding_by_currency +#: field:res.company,currency_rounding_rules:0 +msgid "Rounding Rule" +msgstr "Regola di Arrotondamento" -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "" +#. module: account_invoice_rounding_by_currency +#: selection:company.rounding,tax_calculation_rounding_method:0 +msgid "Swedish Round by adding a line" +msgstr "Swedish Round , per riga" + +#. module: account_invoice_rounding_by_currency +#: selection:company.rounding,tax_calculation_rounding_method:0 +msgid "Swedish Round globally" +msgstr "Swedish Round Globale" -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,tax_calculation_rounding_method:0 +msgid "Tax Calculation Rounding Method" +msgstr "Metodo di arrotondamento calcolo Imposte" + +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,tax_calculation_rounding_account_id:0 msgid "Tax Rounding Account" -msgstr "" +msgstr "Conto per arrotondamento imposte" -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 +#. module: account_invoice_rounding_by_currency +#: field:company.rounding,tax_calculation_rounding:0 msgid "Tax Rounding unit" -msgstr "" +msgstr "Percentuale di arrotondamento" + diff --git a/account_invoice_rounding_by_currency/i18n/nl.po b/account_invoice_rounding_by_currency/i18n/nl.po deleted file mode 100644 index 13820b349325..000000000000 --- a/account_invoice_rounding_by_currency/i18n/nl.po +++ /dev/null @@ -1,59 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-25 16:48+0000\n" -"PO-Revision-Date: 2015-06-03 04:58+0000\n" -"Last-Translator: <>\n" -"Language-Team: Dutch (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "Factuur" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "" diff --git a/account_invoice_rounding_by_currency/i18n/pt_BR.po b/account_invoice_rounding_by_currency/i18n/pt_BR.po deleted file mode 100644 index 8d691db1088d..000000000000 --- a/account_invoice_rounding_by_currency/i18n/pt_BR.po +++ /dev/null @@ -1,60 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: -# danimaribeiro , 2015 -msgid "" -msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-25 16:48+0000\n" -"PO-Revision-Date: 2015-06-19 02:03+0000\n" -"Last-Translator: danimaribeiro \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "Empresas" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "Fatura" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "LInha da fatura" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "Arredondamento" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "Arredondamento na linha" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "Imposto" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "Conta de arredondamento de impostos" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "Unidade de arredondamento de imposto" diff --git a/account_invoice_rounding_by_currency/i18n/sl.po b/account_invoice_rounding_by_currency/i18n/sl.po deleted file mode 100644 index ac74d3c226ce..000000000000 --- a/account_invoice_rounding_by_currency/i18n/sl.po +++ /dev/null @@ -1,60 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: -# Matjaž Mozetič , 2015 -msgid "" -msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-25 16:48+0000\n" -"PO-Revision-Date: 2015-08-16 11:39+0000\n" -"Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-account-invoicing-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: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "Družbe" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "Račun" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "Postavka računa" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "Zaokroževanje" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "Postavka zaokroževanja" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "Davek" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "Konto zaokroževanja davka" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "Enota zaokroževanja davka" diff --git a/account_invoice_rounding_by_currency/i18n/zh_CN.po b/account_invoice_rounding_by_currency/i18n/zh_CN.po deleted file mode 100644 index 9d1ee66473a1..000000000000 --- a/account_invoice_rounding_by_currency/i18n/zh_CN.po +++ /dev/null @@ -1,59 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_invoice_rounding -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: account-invoicing (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-08-25 16:48+0000\n" -"PO-Revision-Date: 2015-06-03 04:58+0000\n" -"Last-Translator: <>\n" -"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-account-invoicing-8-0/language/zh_CN/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: zh_CN\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_res_company -msgid "Companies" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice -msgid "Invoice" -msgstr "发票" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_invoice_line -msgid "Invoice Line" -msgstr "" - -#. module: account_invoice_rounding -#: code:addons/account_invoice_rounding/account.py:42 -#, python-format -msgid "Rounding" -msgstr "" - -#. module: account_invoice_rounding -#: field:account.invoice.line,is_rounding:0 -msgid "Rounding Line" -msgstr "" - -#. module: account_invoice_rounding -#: model:ir.model,name:account_invoice_rounding.model_account_tax -msgid "Tax" -msgstr "" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding_account_id:0 -msgid "Tax Rounding Account" -msgstr "" - -#. module: account_invoice_rounding -#: field:res.company,tax_calculation_rounding:0 -msgid "Tax Rounding unit" -msgstr "" diff --git a/account_invoice_rounding_by_currency/security/ir.model.access.csv b/account_invoice_rounding_by_currency/security/ir.model.access.csv new file mode 100644 index 000000000000..6d3848de0766 --- /dev/null +++ b/account_invoice_rounding_by_currency/security/ir.model.access.csv @@ -0,0 +1,2 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_company_rounding","access_company_rounding","model_company_rounding","",1,0,0,0 diff --git a/account_invoice_rounding_by_currency/tests/__init__.py b/account_invoice_rounding_by_currency/tests/__init__.py new file mode 100644 index 000000000000..92f4c19d54af --- /dev/null +++ b/account_invoice_rounding_by_currency/tests/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 Agile Business Group sagl () +# Author: Alessio Gerace +# +# 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 test_rounding_by_currencies diff --git a/account_invoice_rounding_by_currency/tests/test_rounding_by_currencies.py b/account_invoice_rounding_by_currency/tests/test_rounding_by_currencies.py new file mode 100644 index 000000000000..332178e01516 --- /dev/null +++ b/account_invoice_rounding_by_currency/tests/test_rounding_by_currencies.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 Agile Business Group sagl () +# Author: Alessio Gerace +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp import workflow +import openerp.tests.common as test_common + + +class TestRoundingByCurrencies(test_common.SingleTransactionCase): + + def setUp(self): + super(TestRoundingByCurrencies, self).setUp() + self.data_model = self.registry('ir.model.data') + self.invoice_model = self.registry('account.invoice') + self.context = {} + self.maxDiff = None + self.company = self.env.ref('base.main_company') + + def test_0_xml_export(self): + cr, uid = self.cr, self.uid + invoice_id = self.data_model.get_object_reference( + cr, uid, 'account_invoice_rounding_by_currency', + 'invtest_invoice_0' + ) + if invoice_id: + invoice_id = invoice_id and invoice_id[1] or False + invoice = self.invoice_model.browse(cr, uid, invoice_id) + self.assertEqual(invoice.state, 'draft') + workflow.trg_validate( + uid, 'account.invoice', invoice_id, 'invoice_open', cr + ) + self.assertEqual(invoice.state, 'open') + self.assertEqual(invoice.amount_total, 110.0) + + def test_1_xml_export(self): + cr, uid = self.cr, self.uid + invoice_id = self.data_model.get_object_reference( + cr, uid, 'account_invoice_rounding_by_currency', + 'invtest_invoice_1' + ) + if invoice_id: + invoice_id = invoice_id and invoice_id[1] or False + invoice = self.invoice_model.browse(cr, uid, invoice_id) + self.assertEqual(invoice.state, 'draft') + workflow.trg_validate( + uid, 'account.invoice', invoice_id, 'invoice_open', cr + ) + self.assertEqual(invoice.state, 'open') + self.assertEqual(invoice.amount_total, 110.45) + + def test_2_xml_export(self): + cr, uid = self.cr, self.uid + invoice_id = self.data_model.get_object_reference( + cr, uid, 'account_invoice_rounding_by_currency', + 'invtest_invoice_2' + ) + if invoice_id: + invoice_id = invoice_id and invoice_id[1] or False + invoice = self.invoice_model.browse(cr, uid, invoice_id) + self.assertEqual(invoice.state, 'draft') + workflow.trg_validate( + uid, 'account.invoice', invoice_id, 'invoice_open', cr + ) + self.assertEqual(invoice.state, 'open') + self.assertEqual(invoice.amount_total, 110.50) diff --git a/account_invoice_rounding_by_currency/tests/tests_rounding_by_currencies.py b/account_invoice_rounding_by_currency/tests/tests_rounding_by_currencies.py deleted file mode 100644 index e69de29bb2d1..000000000000 From 0247b68d15a2950d5c327cd517cac96518900a4a Mon Sep 17 00:00:00 2001 From: archetipo Date: Tue, 13 Oct 2015 09:49:32 +0200 Subject: [PATCH 4/4] [FIX] flake8 --- account_invoice_rounding_by_currency/__openerp__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_invoice_rounding_by_currency/__openerp__.py b/account_invoice_rounding_by_currency/__openerp__.py index af23cf944095..03dc2a6d5d06 100644 --- a/account_invoice_rounding_by_currency/__openerp__.py +++ b/account_invoice_rounding_by_currency/__openerp__.py @@ -28,8 +28,8 @@ 'license': 'AGPL-3', 'depends': ['account_invoice_rounding'], 'data': [ - 'res_company.xml', - 'security/ir.model.access.csv', + 'res_company.xml', + 'security/ir.model.access.csv', ], "demo": ['demo/data.xml'], 'installable': True,