Browse Source

Merge pull request #106 from Tecnativa/10.0-mig-contract_recurring_analytic_distribution

[MIG] contract_recurring_analytic_distribution: Migration to 10.0
pull/135/head
Pedro M. Baeza 7 years ago
committed by GitHub
parent
commit
55b3f16e1d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 61
      contract_recurring_analytic_distribution/README.rst
  2. 4
      contract_recurring_analytic_distribution/__init__.py
  3. 22
      contract_recurring_analytic_distribution/__manifest__.py
  4. 35
      contract_recurring_analytic_distribution/i18n/ca.po
  5. 35
      contract_recurring_analytic_distribution/i18n/de.po
  6. 28
      contract_recurring_analytic_distribution/i18n/el_GR.po
  7. 34
      contract_recurring_analytic_distribution/i18n/es.po
  8. 28
      contract_recurring_analytic_distribution/i18n/es_MX.po
  9. 34
      contract_recurring_analytic_distribution/i18n/fi.po
  10. 34
      contract_recurring_analytic_distribution/i18n/fr.po
  11. 34
      contract_recurring_analytic_distribution/i18n/gl.po
  12. 34
      contract_recurring_analytic_distribution/i18n/hr.po
  13. 34
      contract_recurring_analytic_distribution/i18n/hr_HR.po
  14. 34
      contract_recurring_analytic_distribution/i18n/hu.po
  15. 34
      contract_recurring_analytic_distribution/i18n/it.po
  16. 34
      contract_recurring_analytic_distribution/i18n/nl.po
  17. 34
      contract_recurring_analytic_distribution/i18n/pt.po
  18. 34
      contract_recurring_analytic_distribution/i18n/pt_BR.po
  19. 34
      contract_recurring_analytic_distribution/i18n/pt_PT.po
  20. 34
      contract_recurring_analytic_distribution/i18n/ro.po
  21. 28
      contract_recurring_analytic_distribution/i18n/sk_SK.po
  22. 34
      contract_recurring_analytic_distribution/i18n/sl.po
  23. 34
      contract_recurring_analytic_distribution/i18n/zh_CN.po
  24. 5
      contract_recurring_analytic_distribution/models/__init__.py
  25. 31
      contract_recurring_analytic_distribution/models/account_analytic_account.py
  26. BIN
      contract_recurring_analytic_distribution/static/description/icon.png
  27. 5
      contract_recurring_analytic_distribution/tests/__init__.py
  28. 69
      contract_recurring_analytic_distribution/tests/test_contract_recurring_distribution.py
  29. 15
      contract_recurring_analytic_distribution/views/account_analytic_invoice_line_view.xml
  30. 1
      oca_dependencies.txt

61
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 <https://github.com/OCA/contract/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 <pedro.baeza@tecnativa.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>
Icon
----
* https://openclipart.org/detail/125071/pie-graph
* Subicon made by `Freepik <http://www.flaticon.com/authors/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.

4
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

22
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,
}

35
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 <transbot@odoo-community.org>, 2017
# Marc Tormo i Bochaca <mtbochaca@gmail.com>, 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 <mtbochaca@gmail.com>, 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"

35
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 <transbot@odoo-community.org>, 2017
# Rudolf Schnapka <rs@techno-flex.de>, 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 <rs@techno-flex.de>, 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"

28
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 ""

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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"

28
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 ""

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""

34
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 <ulmroan@gmail.com>, 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 <ulmroan@gmail.com>, 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 ""

34
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 <bole@dajmi5.com>, 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 <bole@dajmi5.com>, 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 ""

34
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 <bole@dajmi5.com>, 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 <bole@dajmi5.com>, 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"

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""

34
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 <nicola.malcontenti@gmail.com>, 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 <nicola.malcontenti@gmail.com>, 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 ""

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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"

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""

34
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 <dreis.pt@gmail.com>, 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 <dreis.pt@gmail.com>, 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 ""

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""

28
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 ""

34
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 <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""

34
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 <alanljj@qq.com>, 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 <alanljj@qq.com>, 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 ""

5
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

31
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',
)

BIN
contract_recurring_analytic_distribution/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 6.1 KiB

5
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

69
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)

15
contract_recurring_analytic_distribution/views/account_analytic_invoice_line_view.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_analytic_account_form_form" model="ir.ui.view">
<field name="name">Contract form (with plans)</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="contract.account_analytic_account_recurring_form_form"/>
<field name="arch" type="xml">
<field name="quantity" position="before">
<field name="analytic_distribution_id"/>
</field>
</field>
</record>
</odoo>

1
oca_dependencies.txt

@ -1,3 +1,4 @@
account-analytic
bank-payment
sale-workflow
web
Loading…
Cancel
Save