Skip to content

Commit

Permalink
Merge PR #691 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Oct 2, 2024
2 parents dd9ab02 + 4a00107 commit 4063e16
Show file tree
Hide file tree
Showing 22 changed files with 913 additions and 0 deletions.
90 changes: 90 additions & 0 deletions account_analytic_organization/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
=============================
Account Analytic Organization
=============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:92bd5b768344808442eab997cf8763b2cd25e851f2f3bf2e852d09ba6088dd9e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/16.0/account_analytic_organization
: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-16-0/account-analytic-16-0-account_analytic_organization
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-analytic&target_branch=16.0
:alt: Try me on Runboat

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

This module adds a new field on the partner. This organization field is
also added on the account analytic line and account move line so you can
filter and group by it.

**Table of contents**

.. contents::
:local:

Usage
=====

Go to Contacts > Select one > Fill the Analytic Organization field
Create an invoice and validate it Now you have this field filled in the
Account Move Line and in Analytic line if you provided an analytic
distribution on the invoice

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20account_analytic_organization%0Aversion:%2016.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
-------

* Miquel Pascual
* Bernat Obrador

Contributors
------------

- `APSL-Nagarro <https://apsl.tech>`__:

- Miquel Pascual <<[email protected]>>
- Bernat Obrador <<[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/16.0/account_analytic_organization>`_ project on GitHub.

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

from . import models
20 changes: 20 additions & 0 deletions account_analytic_organization/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 APSL - Nagarro
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Analytic Organization",
"summary": """Adds organization field on the partner so you can use it on your analytic""",
"version": "16.0.1.0.0",
"category": "Analytic Accounting",
"license": "AGPL-3",
"author": "Miquel Pascual, Bernat Obrador, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
"depends": ["analytic", "contacts", "account"],
"data": [
"security/ir.model.access.csv",
"views/res_partner.xml",
"views/account_analytic_line.xml",
"views/account_move_line.xml",
"views/account_analytic_organization.xml",
],
"installable": True,
}
93 changes: 93 additions & 0 deletions account_analytic_organization/i18n/ca_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_analytic_organization
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-18 11:09+0000\n"
"PO-Revision-Date: 2024-09-18 11:09+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_analytic_organization
#: model:ir.actions.act_window,name:account_analytic_organization.account_analytic_organization_action
#: model:ir.model,name:account_analytic_organization.model_account_analytic_organization
msgid "Account Analytic Organization"
msgstr ""

#. module: account_analytic_organization
#: model:ir.model,name:account_analytic_organization.model_account_analytic_line
msgid "Analytic Line"
msgstr "Línia analítica"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_line__analytic_org
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_move_line__analytic_org
#: model:ir.model.fields,field_description:account_analytic_organization.field_res_partner__analytic_org_id
#: model:ir.model.fields,field_description:account_analytic_organization.field_res_users__analytic_org_id
#: model:ir.ui.menu,name:account_analytic_organization.account_analytic_organization
#: model_terms:ir.ui.view,arch_db:account_analytic_organization.view_account_analytic_line_search_inherit
#: model_terms:ir.ui.view,arch_db:account_analytic_organization.view_account_move_line_search_inherit
msgid "Analytic Organization"
msgstr "Organització Analítica"

#. module: account_analytic_organization
#: model:ir.model,name:account_analytic_organization.model_res_partner
msgid "Contact"
msgstr "Contacte"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__create_uid
msgid "Created by"
msgstr "Creat per"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__create_date
msgid "Created on"
msgstr "Creat el"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__display_name
msgid "Display Name"
msgstr "Nom"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__id
msgid "ID"
msgstr ""

#. module: account_analytic_organization
#: model:ir.model,name:account_analytic_organization.model_account_move_line
msgid "Journal Item"
msgstr "Apunt comptable"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization____last_update
msgid "Last Modified on"
msgstr "Darrera Modificació el"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__write_uid
msgid "Last Updated by"
msgstr "Darrera Actualització per"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__write_date
msgid "Last Updated on"
msgstr "Darrera Actualització el"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__name
msgid "Name"
msgstr "Nom"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__old_id
msgid "Old"
msgstr "Antic"
93 changes: 93 additions & 0 deletions account_analytic_organization/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_analytic_organization
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-18 11:11+0000\n"
"PO-Revision-Date: 2024-09-18 11:11+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_analytic_organization
#: model:ir.actions.act_window,name:account_analytic_organization.account_analytic_organization_action
#: model:ir.model,name:account_analytic_organization.model_account_analytic_organization
msgid "Account Analytic Organization"
msgstr ""

#. module: account_analytic_organization
#: model:ir.model,name:account_analytic_organization.model_account_analytic_line
msgid "Analytic Line"
msgstr "Línea analítica"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_line__analytic_org
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_move_line__analytic_org
#: model:ir.model.fields,field_description:account_analytic_organization.field_res_partner__analytic_org_id
#: model:ir.model.fields,field_description:account_analytic_organization.field_res_users__analytic_org_id
#: model:ir.ui.menu,name:account_analytic_organization.account_analytic_organization
#: model_terms:ir.ui.view,arch_db:account_analytic_organization.view_account_analytic_line_search_inherit
#: model_terms:ir.ui.view,arch_db:account_analytic_organization.view_account_move_line_search_inherit
msgid "Analytic Organization"
msgstr "Organitzación Analítica"

#. module: account_analytic_organization
#: model:ir.model,name:account_analytic_organization.model_res_partner
msgid "Contact"
msgstr "Contacto"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__create_uid
msgid "Created by"
msgstr "Creado por"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__create_date
msgid "Created on"
msgstr "Creado el"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__display_name
msgid "Display Name"
msgstr "Nombre"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__id
msgid "ID"
msgstr ""

#. module: account_analytic_organization
#: model:ir.model,name:account_analytic_organization.model_account_move_line
msgid "Journal Item"
msgstr "Apunte contable"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization____last_update
msgid "Last Modified on"
msgstr "Última Modificación el"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__write_uid
msgid "Last Updated by"
msgstr "Última Actualización por"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__write_date
msgid "Last Updated on"
msgstr "Última Actualización el"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__name
msgid "Name"
msgstr "Nombre"

#. module: account_analytic_organization
#: model:ir.model.fields,field_description:account_analytic_organization.field_account_analytic_organization__old_id
msgid "Old"
msgstr "Antiguo"
7 changes: 7 additions & 0 deletions account_analytic_organization/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2023 APSL - Nagarro
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import res_partner
from . import account_analytic_organization
from . import account_move_line
from . import account_analytic_line
14 changes: 14 additions & 0 deletions account_analytic_organization/models/account_analytic_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 APSL - Nagarro
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountAnalyticLine(models.Model):
_inherit = "account.analytic.line"

analytic_org = fields.Char(
string="Analytic Organization",
related="partner_id.analytic_org_id.name",
store=True,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2023 APSL - Nagarro
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountAnalyticOrganization(models.Model):
_name = "account.analytic.organization"
_description = "Account Analytic Organization"

name = fields.Char(required=True)
14 changes: 14 additions & 0 deletions account_analytic_organization/models/account_move_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 APSL - Nagarro
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountMoveLine(models.Model):
_inherit = "account.move.line"

analytic_org = fields.Char(
string="Analytic Organization",
related="partner_id.analytic_org_id.name",
store=True,
)
12 changes: 12 additions & 0 deletions account_analytic_organization/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2023 APSL - Nagarro
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ResPartner(models.Model):
_inherit = "res.partner"

analytic_org_id = fields.Many2one(
"account.analytic.organization", string="Analytic Organization"
)
3 changes: 3 additions & 0 deletions account_analytic_organization/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions account_analytic_organization/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [APSL-Nagarro](<https://apsl.tech>):
- Miquel Pascual \<\<<[email protected]>\>\>
- Bernat Obrador \<\<<[email protected]>\>\>
3 changes: 3 additions & 0 deletions account_analytic_organization/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module adds a new field on the partner. This organization field is
also added on the account analytic line and account move line so you can
filter and group by it.
4 changes: 4 additions & 0 deletions account_analytic_organization/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Go to Contacts \> Select one \> Fill the Analytic Organization field
Create an invoice and validate it Now you have this field filled in the
Account Move Line and in Analytic line if you provided an analytic
distribution on the invoice
3 changes: 3 additions & 0 deletions account_analytic_organization/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_analytic_organization_group_user,account_analytic_organization_group_user,model_account_analytic_organization,base.group_user,1,0,0,0
access_account_analytic_organization_group_analytic_accounting,account_analytic_organization_group_analytic_accounting,model_account_analytic_organization,analytic.group_analytic_accounting,1,1,1,1
Loading

0 comments on commit 4063e16

Please sign in to comment.