diff --git a/contract_recurring_analytic_distribution/README.rst b/contract_recurring_analytic_distribution/README.rst new file mode 100644 index 00000000..7f0dd020 --- /dev/null +++ b/contract_recurring_analytic_distribution/README.rst @@ -0,0 +1,61 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============================================== +Analytic plans for contract recurring invoices +============================================== + +This module allows to include an analytic distribution on each recurring +invoice line, so if you set it, this will be taken to be transferred to the +invoice instead of the analytic account of the contract. + +Usage +===== + +On the contract view, select or create an analytic distribution for the +invoice recurring lines that you want. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/110/10.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 smash it by providing detailed and +welcomed feedback. + +Credits +======= + +Contributors +------------ + +* Tecnativa (https://www.tecnativa.com) + * Pedro M. Baeza + * Vicent Cubells + +Icon +---- + +* https://openclipart.org/detail/125071/pie-graph +* Subicon made by `Freepik `_ from + www.flaticon.com + +Maintainer +---------- + +.. 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/contract_recurring_analytic_distribution/__init__.py b/contract_recurring_analytic_distribution/__init__.py new file mode 100644 index 00000000..4d8ae82d --- /dev/null +++ b/contract_recurring_analytic_distribution/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from . import models diff --git a/contract_recurring_analytic_distribution/__manifest__.py b/contract_recurring_analytic_distribution/__manifest__.py new file mode 100644 index 00000000..f800aec3 --- /dev/null +++ b/contract_recurring_analytic_distribution/__manifest__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 Tecnativa - Pedro M. Baeza +# Copyright 2017 Tecnativa - Vicent Cubells +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + 'name': 'Analytic plans on contracts recurring invoices', + 'version': '10.0.1.0.0', + 'category': 'Contract Management', + 'author': 'Tecnativa, ' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/contract/', + 'license': 'AGPL-3', + 'depends': [ + 'account_analytic_distribution', + 'contract', + ], + 'data': [ + 'views/account_analytic_invoice_line_view.xml', + ], + 'installable': True, +} diff --git a/contract_recurring_analytic_distribution/i18n/ca.po b/contract_recurring_analytic_distribution/i18n/ca.po new file mode 100644 index 00000000..6840c695 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/ca.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +# Marc Tormo i Bochaca , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: Marc Tormo i Bochaca , 2017\n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Compte analític" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "account.analytic.invoice.line" diff --git a/contract_recurring_analytic_distribution/i18n/de.po b/contract_recurring_analytic_distribution/i18n/de.po new file mode 100644 index 00000000..1e3623dd --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/de.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +# Rudolf Schnapka , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: Rudolf Schnapka , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Kostenstelle" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "Kostenumlage" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "account.analytic.invoice.line" diff --git a/contract_recurring_analytic_distribution/i18n/el_GR.po b/contract_recurring_analytic_distribution/i18n/el_GR.po new file mode 100644 index 00000000..5598e3fd --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/el_GR.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: contract (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-07 03:42+0000\n" +"PO-Revision-Date: 2015-11-29 23:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-contract-8-0/language/el_GR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: el_GR\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Αναλυτικός Λογαριασμός" + +#. module: contract_recurring_analytic_distribution +#: field:account.analytic.invoice.line,analytics_id:0 +msgid "Analytic Distribution" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/es.po b/contract_recurring_analytic_distribution/i18n/es.po new file mode 100644 index 00000000..9edd1ee7 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/es.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Cuenta analítica" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "Distribución analítica" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "account.analytic.invoice.line" diff --git a/contract_recurring_analytic_distribution/i18n/es_MX.po b/contract_recurring_analytic_distribution/i18n/es_MX.po new file mode 100644 index 00000000..22e52dea --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/es_MX.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: contract (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-03 01:11+0000\n" +"PO-Revision-Date: 2015-11-29 23:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (Mexico) (http://www.transifex.com/oca/OCA-contract-8-0/language/es_MX/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_MX\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Cuenta analítica" + +#. module: contract_recurring_analytic_distribution +#: field:account.analytic.invoice.line,analytics_id:0 +msgid "Analytic Distribution" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/fi.po b/contract_recurring_analytic_distribution/i18n/fi.po new file mode 100644 index 00000000..4bd8e1e5 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/fi.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Analyyttinen tili" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "Analyyttinen jakelu" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/fr.po b/contract_recurring_analytic_distribution/i18n/fr.po new file mode 100644 index 00000000..2ea5b3fe --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/fr.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Compte analytique" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "Distribution analytique" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/gl.po b/contract_recurring_analytic_distribution/i18n/gl.po new file mode 100644 index 00000000..fd769778 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/gl.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# César Castro Cruz , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: César Castro Cruz , 2017\n" +"Language-Team: Galician (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Conta analítica" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/hr.po b/contract_recurring_analytic_distribution/i18n/hr.po new file mode 100644 index 00000000..def081d8 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/hr.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Analitički konto" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/hr_HR.po b/contract_recurring_analytic_distribution/i18n/hr_HR.po new file mode 100644 index 00000000..147e6cce --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/hr_HR.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr_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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Konto analitike" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "account.analytic.invoice.line" diff --git a/contract_recurring_analytic_distribution/i18n/hu.po b/contract_recurring_analytic_distribution/i18n/hu.po new file mode 100644 index 00000000..927edd8d --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/hu.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Hungarian (https://www.transifex.com/oca/teams/23907/hu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Analitikus gyűjtőkód könyvelés" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/it.po b/contract_recurring_analytic_distribution/i18n/it.po new file mode 100644 index 00000000..f9cf5f26 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/it.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# Nicola Malcontenti , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: Nicola Malcontenti , 2017\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Conto Analitico" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/nl.po b/contract_recurring_analytic_distribution/i18n/nl.po new file mode 100644 index 00000000..2b569c83 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/nl.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Kostenplaats" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "account.analytic.invoice.line" diff --git a/contract_recurring_analytic_distribution/i18n/pt.po b/contract_recurring_analytic_distribution/i18n/pt.po new file mode 100644 index 00000000..412e2754 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/pt.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Conta Analítica" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/pt_BR.po b/contract_recurring_analytic_distribution/i18n/pt_BR.po new file mode 100644 index 00000000..0c77d0d5 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/pt_BR.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Conta analítica" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "Distribuição analítica" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/pt_PT.po b/contract_recurring_analytic_distribution/i18n/pt_PT.po new file mode 100644 index 00000000..ee5b7a55 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/pt_PT.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# Daniel Reis , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: Daniel Reis , 2017\n" +"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_PT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Conta Analítica" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/ro.po b/contract_recurring_analytic_distribution/i18n/ro.po new file mode 100644 index 00000000..be12e769 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/ro.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ro\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Cont analitic" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/sk_SK.po b/contract_recurring_analytic_distribution/i18n/sk_SK.po new file mode 100644 index 00000000..f3d63f5c --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/sk_SK.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: contract (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-05-21 10:53+0000\n" +"PO-Revision-Date: 2015-11-29 23:23+0000\n" +"Last-Translator: <>\n" +"Language-Team: Slovak (Slovakia) (http://www.transifex.com/oca/OCA-contract-8-0/language/sk_SK/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sk_SK\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Analytický účet" + +#. module: contract_recurring_analytic_distribution +#: field:account.analytic.invoice.line,analytics_id:0 +msgid "Analytic Distribution" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/sl.po b/contract_recurring_analytic_distribution/i18n/sl.po new file mode 100644 index 00000000..807ee62a --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/sl.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "Analitični konto" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "Analitična distribucija" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/i18n/zh_CN.po b/contract_recurring_analytic_distribution/i18n/zh_CN.po new file mode 100644 index 00000000..f8e03804 --- /dev/null +++ b/contract_recurring_analytic_distribution/i18n/zh_CN.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_recurring_analytic_distribution +# +# Translators: +# ITGeeker , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 03:02+0000\n" +"PO-Revision-Date: 2017-06-09 03:02+0000\n" +"Last-Translator: ITGeeker , 2017\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/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: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_account +msgid "Analytic Account" +msgstr "核算科目" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model.fields,field_description:contract_recurring_analytic_distribution.field_account_analytic_invoice_line_analytic_distribution_id +msgid "Analytic Distribution" +msgstr "分析信息" + +#. module: contract_recurring_analytic_distribution +#: model:ir.model,name:contract_recurring_analytic_distribution.model_account_analytic_invoice_line +msgid "account.analytic.invoice.line" +msgstr "" diff --git a/contract_recurring_analytic_distribution/models/__init__.py b/contract_recurring_analytic_distribution/models/__init__.py new file mode 100644 index 00000000..4feee90a --- /dev/null +++ b/contract_recurring_analytic_distribution/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 Tecnativa - Pedro M. Baeza +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from . import account_analytic_account diff --git a/contract_recurring_analytic_distribution/models/account_analytic_account.py b/contract_recurring_analytic_distribution/models/account_analytic_account.py new file mode 100644 index 00000000..8eea4925 --- /dev/null +++ b/contract_recurring_analytic_distribution/models/account_analytic_account.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 Tecnativa - Pedro M. Baeza +# Copyright 2017 Tecnativa - Vicent Cubells +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo import api, fields, models + + +class AccountAnalyticAccount(models.Model): + _inherit = "account.analytic.account" + + @api.model + def _prepare_invoice_line(self, line, invoice_id): + res = super(AccountAnalyticAccount, self)._prepare_invoice_line( + line, invoice_id) + if line.analytic_distribution_id: + res.update({ + 'account_analytic_id': False, + 'analytic_distribution_id': line.analytic_distribution_id.id, + }) + return res + + +class AccountAnalyticInvoiceLine(models.Model): + _inherit = "account.analytic.invoice.line" + + analytic_distribution_id = fields.Many2one( + comodel_name='account.analytic.distribution', + string='Analytic Distribution', + oldname='analytics_id', + ) diff --git a/contract_recurring_analytic_distribution/static/description/icon.png b/contract_recurring_analytic_distribution/static/description/icon.png new file mode 100644 index 00000000..0fab733d Binary files /dev/null and b/contract_recurring_analytic_distribution/static/description/icon.png differ diff --git a/contract_recurring_analytic_distribution/tests/__init__.py b/contract_recurring_analytic_distribution/tests/__init__.py new file mode 100644 index 00000000..55df91fd --- /dev/null +++ b/contract_recurring_analytic_distribution/tests/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# (c) 2015 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from . import test_contract_recurring_distribution diff --git a/contract_recurring_analytic_distribution/tests/test_contract_recurring_distribution.py b/contract_recurring_analytic_distribution/tests/test_contract_recurring_distribution.py new file mode 100644 index 00000000..609c4215 --- /dev/null +++ b/contract_recurring_analytic_distribution/tests/test_contract_recurring_distribution.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 Tecnativa - Pedro M. Baeza +# Copyright 2017 Tecnativa - Vicent Cubells +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +import odoo.tests.common as common + + +@common.at_install(False) +@common.post_install(True) +class TestContractRecurringDistribution(common.HttpCase): + def setUp(self): + super(TestContractRecurringDistribution, self).setUp() + self.partner = self.env['res.partner'].create({'name': 'Test'}) + self.product = self.env['product.product'].create({ + 'name': 'Test product', + }) + self.account1 = self.env['account.analytic.account'].create({ + 'name': 'Test account #1', + }) + self.account2 = self.env['account.analytic.account'].create({ + 'name': 'Test account #2', + }) + self.uom = self.env.ref('product.product_uom_hour') + self.contract = self.env['account.analytic.account'].create({ + 'name': 'Test contract', + 'partner_id': self.partner.id, + 'recurring_invoices': 1, + 'recurring_interval': 1, + 'recurring_invoice_line_ids': [ + (0, 0, {'quantity': 2.0, + 'price_unit': 100.0, + 'name': 'Test', + 'product_id': self.product.id, + 'uom_id': self.uom.id})], + }) + self.distribution = self.env['account.analytic.distribution'].create({ + 'name': 'Test distribution', + 'rule_ids': [ + (0, 0, { + 'sequence': 10, + 'percent': 75.00, + 'analytic_account_id': self.account1.id, + }), + (0, 0, { + 'sequence': 20, + 'percent': 25.00, + 'analytic_account_id': self.account2.id, + }), + ] + }) + + def test_invoice_without_distribution(self): + self.contract.recurring_create_invoice() + invoice = self.env['account.invoice'].search( + [('partner_id', '=', self.partner.id)]) + self.assertEqual( + invoice.invoice_line_ids[0].account_analytic_id, self.contract) + + def test_invoice_with_distribution(self): + self.contract.recurring_invoice_line_ids.analytic_distribution_id = ( + self.distribution.id) + self.contract.recurring_create_invoice() + invoice = self.env['account.invoice'].search( + [('partner_id', '=', self.partner.id)]) + self.assertFalse(invoice.invoice_line_ids[0].account_analytic_id) + self.assertEqual( + invoice.invoice_line_ids[0].analytic_distribution_id, + self.distribution) diff --git a/contract_recurring_analytic_distribution/views/account_analytic_invoice_line_view.xml b/contract_recurring_analytic_distribution/views/account_analytic_invoice_line_view.xml new file mode 100644 index 00000000..bcc75fd5 --- /dev/null +++ b/contract_recurring_analytic_distribution/views/account_analytic_invoice_line_view.xml @@ -0,0 +1,15 @@ + + + + + Contract form (with plans) + account.analytic.account + + + + + + + + + diff --git a/oca_dependencies.txt b/oca_dependencies.txt index 58a52b60..66922e56 100644 --- a/oca_dependencies.txt +++ b/oca_dependencies.txt @@ -1,3 +1,4 @@ +account-analytic bank-payment sale-workflow web