Browse Source
Merge pull request #106 from Tecnativa/10.0-mig-contract_recurring_analytic_distribution
Merge pull request #106 from Tecnativa/10.0-mig-contract_recurring_analytic_distribution
[MIG] contract_recurring_analytic_distribution: Migration to 10.0pull/135/head
Pedro M. Baeza
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 877 additions and 0 deletions
-
61contract_recurring_analytic_distribution/README.rst
-
4contract_recurring_analytic_distribution/__init__.py
-
22contract_recurring_analytic_distribution/__manifest__.py
-
35contract_recurring_analytic_distribution/i18n/ca.po
-
35contract_recurring_analytic_distribution/i18n/de.po
-
28contract_recurring_analytic_distribution/i18n/el_GR.po
-
34contract_recurring_analytic_distribution/i18n/es.po
-
28contract_recurring_analytic_distribution/i18n/es_MX.po
-
34contract_recurring_analytic_distribution/i18n/fi.po
-
34contract_recurring_analytic_distribution/i18n/fr.po
-
34contract_recurring_analytic_distribution/i18n/gl.po
-
34contract_recurring_analytic_distribution/i18n/hr.po
-
34contract_recurring_analytic_distribution/i18n/hr_HR.po
-
34contract_recurring_analytic_distribution/i18n/hu.po
-
34contract_recurring_analytic_distribution/i18n/it.po
-
34contract_recurring_analytic_distribution/i18n/nl.po
-
34contract_recurring_analytic_distribution/i18n/pt.po
-
34contract_recurring_analytic_distribution/i18n/pt_BR.po
-
34contract_recurring_analytic_distribution/i18n/pt_PT.po
-
34contract_recurring_analytic_distribution/i18n/ro.po
-
28contract_recurring_analytic_distribution/i18n/sk_SK.po
-
34contract_recurring_analytic_distribution/i18n/sl.po
-
34contract_recurring_analytic_distribution/i18n/zh_CN.po
-
5contract_recurring_analytic_distribution/models/__init__.py
-
31contract_recurring_analytic_distribution/models/account_analytic_account.py
-
BINcontract_recurring_analytic_distribution/static/description/icon.png
-
5contract_recurring_analytic_distribution/tests/__init__.py
-
69contract_recurring_analytic_distribution/tests/test_contract_recurring_distribution.py
-
15contract_recurring_analytic_distribution/views/account_analytic_invoice_line_view.xml
-
1oca_dependencies.txt
@ -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. |
@ -0,0 +1,4 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html |
||||
|
|
||||
|
from . import models |
@ -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, |
||||
|
} |
@ -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" |
@ -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" |
@ -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 "" |
@ -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" |
@ -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 "" |
@ -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 "" |
@ -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 "" |
@ -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 "" |
@ -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 "" |
@ -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" |
@ -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 "" |
@ -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 "" |
@ -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" |
@ -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 "" |
@ -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 "" |
@ -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 "" |
@ -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 "" |
@ -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 "" |
@ -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 "" |
@ -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 "" |
@ -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 |
@ -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', |
||||
|
) |
After Width: 128 | Height: 128 | Size: 6.1 KiB |
@ -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 |
@ -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) |
@ -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,3 +1,4 @@ |
|||||
|
account-analytic |
||||
bank-payment |
bank-payment |
||||
sale-workflow |
sale-workflow |
||||
web |
web |
Write
Preview
Loading…
Cancel
Save
Reference in new issue