Skip to content

Commit

Permalink
Merge PR #434 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Feb 6, 2022
2 parents 16d63a9 + 02d77eb commit f675ff1
Show file tree
Hide file tree
Showing 41 changed files with 3,434 additions and 0 deletions.
98 changes: 98 additions & 0 deletions account_analytic_parent/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
=======================
Account Analytic Parent
=======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
:target: https://github.com/OCA/account-analytic/tree/14.0/account_analytic_parent
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-account_analytic_parent
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/87/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module reintroduces the hierarchy to the analytic accounts as
it was in previous versions of Odoo. This module is a base module for
other modules to manage the hierarchy concept in analytics.

**Table of contents**

.. contents::
:local:

Usage
=====

Activate the analytic accounting in Accounting > Configuration > Settings

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20account_analytic_parent%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Matmoz d.o.o.
* Luxim d.o.o.
* Deneroteam
* ForgeFlow
* Tecnativa
* CorporateHub

Contributors
~~~~~~~~~~~~

* ForgeFlow <http://www.forgeflow.com>
* Luxim d.o.o. <http://www.luxim.si>
* Matmoz d.o.o. <http://www.matmoz.si>
* Deneroteam. <[email protected]>
* SerpentCS <http://www.serpentcs.com/>
* Pedro M. Baeza <[email protected]>
* Vicent Cubells <[email protected]>
* David Vidal <[email protected]>
* Jaume Planas <[email protected]>
* `CorporateHub <https://corporatehub.eu/>`__

* Alexey Pelykh <[email protected]>

* Pedro Gonzalez <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/14.0/account_analytic_parent>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions account_analytic_parent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import models
from .hooks import post_init_hook
30 changes: 30 additions & 0 deletions account_analytic_parent/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Luxim d.o.o.
# Copyright 2017 Matmoz d.o.o.
# Copyright 2017 Deneroteam.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 Tecnativa
# Copyright 2018 Brainbean Apps
# Copyright 2020 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Account Analytic Parent",
"summary": """
This module reintroduces the hierarchy to the analytic accounts.""",
"version": "15.0.1.0.0",
"category": "Accounting & Finance",
"license": "AGPL-3",
"author": "Matmoz d.o.o., "
"Luxim d.o.o., "
"Deneroteam, "
"ForgeFlow, "
"Tecnativa, "
"CorporateHub, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
"depends": ["account", "analytic"],
"data": ["views/account_analytic_account_view.xml"],
"demo": ["demo/analytic_account_demo.xml"],
"post_init_hook": "post_init_hook",
}
167 changes: 167 additions & 0 deletions account_analytic_parent/demo/analytic_account_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!--
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-->
<record id="analytic_project_1" model="account.analytic.account">
<field name="name">Project 1</field>
</record>
<record id="analytic_project_2" model="account.analytic.account">
<field name="name">Project 2</field>
</record>
<record id="analytic_journal_trainings" model="account.analytic.account">
<field name="name">Training</field>
<field name="parent_id" ref="analytic.analytic_internal" />
</record>
<record id="analytic_in_house" model="account.analytic.account">
<field name="name">In House</field>
<field name="parent_id" ref="analytic_journal_trainings" />
</record>
<record id="analytic_online" model="account.analytic.account">
<field name="name">Online</field>
<field name="parent_id" ref="analytic_journal_trainings" />
</record>
<record id="analytic_support" model="account.analytic.account">
<field name="name">Support</field>
<field name="parent_id" ref="analytic.analytic_our_super_product" />
</record>
<record id="analytic_partners" model="account.analytic.account">
<field name="name">Partners</field>
<field name="parent_id" ref="analytic_support" />
</record>
<record id="analytic_customers" model="account.analytic.account">
<field name="name">Customers</field>
<field name="parent_id" ref="analytic_support" />
</record>
<record id="analytic_support_internal" model="account.analytic.account">
<field name="name">Internal</field>
<field name="parent_id" ref="analytic_support" />
</record>
<record id="analytic_integration" model="account.analytic.account">
<field name="name">Integration</field>
<field name="parent_id" ref="analytic.analytic_our_super_product" />
</record>
<record id="analytic_consultancy" model="account.analytic.account">
<field name="name">Consultancy</field>
<field name="parent_id" ref="analytic.analytic_our_super_product" />
</record>
<record id="analytic_super_product_trainings" model="account.analytic.account">
<field name="name">Training</field>
<field name="parent_id" ref="analytic.analytic_our_super_product" />
</record>
<record id="analytic_seagate_p1" model="account.analytic.account">
<field name="name">Seagate P1</field>
<field name="parent_id" ref="analytic_integration" />
</record>
<record id="analytic_seagate_p2" model="account.analytic.account">
<field name="name">Seagate P2</field>
<field name="parent_id" ref="analytic_integration" />
<field name="partner_id" ref="base.res_partner_4" />
</record>
<record
id="analytic.analytic_millennium_industries"
model="account.analytic.account"
>
<field name="name">Millennium Industries</field>
<field name="parent_id" ref="analytic_integration" />
<field name="partner_id" ref="base.res_partner_2" />
</record>
<record id="analytic.analytic_integration_c2c" model="account.analytic.account">
<field name="name">CampToCamp</field>
<field name="parent_id" ref="analytic_integration" />
<field name="partner_id" ref="base.res_partner_1" />
</record>
<record id="analytic.analytic_agrolait" model="account.analytic.account">
<field name="name">Agrolait</field>
<field name="parent_id" ref="analytic_customers" />
<field name="partner_id" ref="base.res_partner_2" />
</record>
<record id="analytic.analytic_asustek" model="account.analytic.account">
<field name="name">Asustek</field>
<field name="parent_id" ref="analytic_customers" />
<field name="partner_id" ref="base.res_partner_1" />
</record>
<record id="analytic.analytic_deltapc" model="account.analytic.account">
<field name="name">Delta PC</field>
<field name="parent_id" ref="analytic_customers" />
<field name="partner_id" ref="base.res_partner_4" />
</record>
<record id="analytic.analytic_spark" model="account.analytic.account">
<field name="name">Spark Systems</field>
<field name="parent_id" ref="analytic_partners" />
<field name="partner_id" ref="base.res_partner_1" />
</record>
<record id="analytic.analytic_nebula" model="account.analytic.account">
<field name="name">Nebula</field>
<field name="parent_id" ref="analytic_partners" />
<field name="partner_id" ref="base.res_partner_2" />
</record>
<record
id="analytic.analytic_luminous_technologies"
model="account.analytic.account"
>
<field name="name">Luminous Technologies</field>
<field name="parent_id" ref="analytic_partners" />
<field name="partner_id" ref="base.res_partner_1" />
</record>
<record id="analytic.analytic_think_big_systems" model="account.analytic.account">
<field name="name">Think Big Systems</field>
<field name="parent_id" ref="analytic_partners" />
<field name="partner_id" ref="base.res_partner_2" />
</record>
<record
id="analytic.analytic_partners_camp_to_camp"
model="account.analytic.account"
>
<field name="name">Camp to Camp</field>
<field name="parent_id" ref="analytic_partners" />
<field name="partner_id" ref="base.res_partner_3" />
</record>
<record id="analytic_project_2_support" model="account.analytic.account">
<field name="name">Support</field>
<field name="parent_id" ref="analytic_project_2" />
</record>
<record id="analytic_project_2_development" model="account.analytic.account">
<field name="name">Development</field>
<field name="parent_id" ref="analytic_project_2" />
</record>
<record id="analytic_project_1_trainings" model="account.analytic.account">
<field name="name">Training</field>
<field name="parent_id" ref="analytic_project_1" />
</record>
<record id="analytic_project_1_development" model="account.analytic.account">
<field name="name">Development</field>
<field name="parent_id" ref="analytic_project_1" />
</record>
<record id="analytic_administratif" model="account.analytic.account">
<field name="name">Administrative</field>
<field name="parent_id" ref="analytic.analytic_internal" />
</record>
<record id="analytic_commercial_marketing" model="account.analytic.account">
<field name="name">Commercial &amp; Marketing</field>
<field name="parent_id" ref="analytic.analytic_internal" />
</record>
<record
id="analytic_our_super_product_development"
model="account.analytic.account"
>
<field name="name">Our Super Product Development</field>
<field name="parent_id" ref="analytic.analytic_internal" />
</record>
<record id="analytic_stable" model="account.analytic.account">
<field name="name">Stable</field>
<field name="parent_id" ref="analytic_our_super_product_development" />
</record>
<record id="analytic_trunk" model="account.analytic.account">
<field name="name">Trunk</field>
<field name="parent_id" ref="analytic_our_super_product_development" />
</record>
<record id="analytic_paid" model="account.analytic.account">
<field name="name">Paid</field>
<field name="parent_id" ref="analytic.analytic_absences" />
</record>
<record id="analytic_unpaid" model="account.analytic.account">
<field name="name">Unpaid</field>
<field name="parent_id" ref="analytic.analytic_absences" />
</record>
</odoo>
10 changes: 10 additions & 0 deletions account_analytic_parent/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2018 Brainbean Apps
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import SUPERUSER_ID, api


def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})

env["account.analytic.account"]._parent_store_compute()
76 changes: 76 additions & 0 deletions account_analytic_parent/i18n/ab.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_analytic_parent
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ab\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"

#. module: account_analytic_parent
#: code:addons/account_analytic_parent/models/account_analytic_account.py:0
#, python-format
msgid "%(name)s - %(partner)s"
msgstr ""

#. module: account_analytic_parent
#: code:addons/account_analytic_parent/models/account_analytic_account.py:0
#, python-format
msgid "%(parent)s / %(own)s"
msgstr ""

#. module: account_analytic_parent
#: model:ir.model,name:account_analytic_parent.model_account_analytic_account
msgid "Analytic Account"
msgstr ""

#. module: account_analytic_parent
#: model:ir.model.fields,field_description:account_analytic_parent.field_account_analytic_account__child_ids
msgid "Child Accounts"
msgstr ""

#. module: account_analytic_parent
#: model:ir.model.fields,field_description:account_analytic_parent.field_account_analytic_account__complete_name
msgid "Complete Name"
msgstr ""

#. module: account_analytic_parent
#: model_terms:ir.ui.view,arch_db:account_analytic_parent.view_account_analytic_account_list
msgid "Name"
msgstr ""

#. module: account_analytic_parent
#: model:ir.model.fields,field_description:account_analytic_parent.field_account_analytic_account__parent_id
#: model_terms:ir.ui.view,arch_db:account_analytic_parent.view_account_analytic_account_form
msgid "Parent Analytic Account"
msgstr ""

#. module: account_analytic_parent
#: model:ir.model.fields,field_description:account_analytic_parent.field_account_analytic_account__parent_path
msgid "Parent Path"
msgstr ""

#. module: account_analytic_parent
#: code:addons/account_analytic_parent/models/account_analytic_account.py:0
#, python-format
msgid "Please activate first parent account %s"
msgstr ""

#. module: account_analytic_parent
#: code:addons/account_analytic_parent/models/account_analytic_account.py:0
#, python-format
msgid "You can not create recursive analytic accounts."
msgstr ""

#. module: account_analytic_parent
#: code:addons/account_analytic_parent/models/account_analytic_account.py:0
#, python-format
msgid "[%(code)s] %(name)s"
msgstr ""
Loading

0 comments on commit f675ff1

Please sign in to comment.