Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] analytic_operating_unit: Migration to 18.0 #720

Open
wants to merge 28 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
94af883
analytic_operating_unit
JordiBForgeFlow Jan 24, 2017
3d69e5a
[MIG] analytic_operating_unit to v10.0
LoisRForgeFlow Jan 30, 2017
7a37d3f
[11.0] Port analytic operating unit
gdgellatly May 21, 2018
f1a979b
[MIG]analytic_operating_unit to v12
sudhir-erpharbor Nov 26, 2018
70aaf24
[FIX]security in analytic_operating_unit
AaronHForgeFlow Nov 30, 2018
831cc44
[UPD] Update analytic_operating_unit.pot
oca-travis Sep 25, 2019
8855a78
[IMP] analytic_operating_unit: black, isort
alan196 Dec 30, 2019
de1f595
[IMP] analytic_operating_unit: Migration to V13
alan196 Dec 30, 2019
7c75832
[UPD] Update analytic_operating_unit.pot
oca-travis Jan 8, 2020
b738f24
Translated using Weblate (Spanish (Mexico))
alan196 Feb 15, 2020
be5d2f3
[UPD] Eficent -> ForgeFlow
MiquelRForgeFlow Oct 5, 2020
822c972
[IMP] analytic_operating_unit: black, isort, prettier
alan196 Oct 10, 2020
3eb4bf3
[MIG] analytic_operating_unit: Migration to 14.0
alan196 Oct 10, 2020
9a72341
[MIG] analytic_operating_unit: Migration to 15.0
alan196 Oct 23, 2021
44365e2
Translated using Weblate (Spanish (Argentina))
ibuioli Aug 6, 2022
e2f51bf
[FIX] analytic_operating_unit: Error when search operating units in a…
Saran440 Jan 24, 2023
a467b5e
[MIG] analytic_operating_unit: Migration to 16.0
BT-aleonard May 11, 2023
910a5bc
[UPD] Update analytic_operating_unit.pot
Jun 5, 2023
b2d8076
[UPD] README.rst
OCA-git-bot Jun 5, 2023
d180d90
[UPD] README.rst
OCA-git-bot Sep 3, 2023
4333b73
Added translation using Weblate (Italian)
mymage Jan 18, 2024
f81213a
Translated using Weblate (Italian)
mymage Jan 19, 2024
b0801ff
[IMP] analytic_operating_unit: pre-commit execution
jdidderen-nsi May 28, 2024
c6a264b
[MIG] analytic_operating_unit: Migration to 17.0
jdidderen-nsi May 28, 2024
34cb443
[UPD] Update analytic_operating_unit.pot
Jul 9, 2024
ffb228c
[BOT] post-merge updates
OCA-git-bot Jul 9, 2024
1a2d23a
[IMP] analytic_operating_unit: pre-commit auto fixes
BT-dlagin Dec 6, 2024
d0c1449
[18.0][MIG] analytic_operating_unit: Migration to 18.0
BT-dlagin Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions analytic_operating_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
=======================
Analytic Operating Unit
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d37288e0a3b46e348f21756b1af1eb8b7d732f3ab3d80acf1723ef93a1ff15d3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Foperating--unit-lightgray.png?logo=github
:target: https://github.com/OCA/operating-unit/tree/18.0/analytic_operating_unit
:alt: OCA/operating-unit
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/operating-unit-18-0/operating-unit-18-0-analytic_operating_unit
: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/operating-unit&target_branch=18.0
:alt: Try me on Runboat

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

This module allows users to introduce into the analytic accounts the
allowed operating units. Only a user with permissions to operate on the
operating units indicated in an analytic account will have the rights to
use it.

**Table of contents**

.. contents::
:local:

Usage
=====

- Go to 'Accounting / Configuration / Analytic Accounting / Analytic
Accounts' and add the accepted Operating Units to each analytic
account.

Analytic accounts with no Operating Unit assigned to them will be
accessible by all users with access to analytic accounts.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/operating-unit/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/operating-unit/issues/new?body=module:%20analytic_operating_unit%0Aversion:%2018.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
-------

* ForgeFlow

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

- Jordi Ballester Alomar <[email protected]>
- Sudhir Arya <[email protected]>
- Alan Ramos <[email protected]>
- Alejandro Leonard <[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/operating-unit <https://github.com/OCA/operating-unit/tree/18.0/analytic_operating_unit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions analytic_operating_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from . import models
21 changes: 21 additions & 0 deletions analytic_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2016-17 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"name": "Analytic Operating Unit",
"version": "18.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "LGPL-3",
"website": "https://github.com/OCA/operating-unit",
"category": "Sales",
"depends": ["analytic", "operating_unit"],
"data": [
"security/analytic_account_security.xml",
"views/analytic_account_view.xml",
],
"assets": {
"web.assets_backend": [
"analytic_operating_unit/static/src/components/analytic_distribution.esm.js",
],
},
"installable": True,
}
24 changes: 24 additions & 0 deletions analytic_operating_unit/i18n/analytic_operating_unit.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * analytic_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \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: analytic_operating_unit
#: model:ir.model,name:analytic_operating_unit.model_account_analytic_account
msgid "Analytic Account"
msgstr ""

#. module: analytic_operating_unit
#: model:ir.model.fields,field_description:analytic_operating_unit.field_account_analytic_account__operating_unit_ids
msgid "Operating Units"
msgstr ""
27 changes: 27 additions & 0 deletions analytic_operating_unit/i18n/es_AR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * analytic_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-08-06 20:07+0000\n"
"Last-Translator: Ignacio Buioli <[email protected]>\n"
"Language-Team: none\n"
"Language: es_AR\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"
"X-Generator: Weblate 4.3.2\n"

#. module: analytic_operating_unit
#: model:ir.model,name:analytic_operating_unit.model_account_analytic_account
msgid "Analytic Account"
msgstr "Cuenta Analítica"

#. module: analytic_operating_unit
#: model:ir.model.fields,field_description:analytic_operating_unit.field_account_analytic_account__operating_unit_ids
msgid "Operating Units"
msgstr "Unidades Operativas"
27 changes: 27 additions & 0 deletions analytic_operating_unit/i18n/es_MX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * analytic_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-02-15 14:13+0000\n"
"Last-Translator: Jesús Alan Ramos Rodríguez <[email protected]>\n"
"Language-Team: none\n"
"Language: es_MX\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"
"X-Generator: Weblate 3.10\n"

#. module: analytic_operating_unit
#: model:ir.model,name:analytic_operating_unit.model_account_analytic_account
msgid "Analytic Account"
msgstr "Cuenta Analítica"

#. module: analytic_operating_unit
#: model:ir.model.fields,field_description:analytic_operating_unit.field_account_analytic_account__operating_unit_ids
msgid "Operating Units"
msgstr "Unidades Operativas"
27 changes: 27 additions & 0 deletions analytic_operating_unit/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * analytic_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-19 07:35+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\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"
"X-Generator: Weblate 4.17\n"

#. module: analytic_operating_unit
#: model:ir.model,name:analytic_operating_unit.model_account_analytic_account
msgid "Analytic Account"
msgstr "Conto analitico"

#. module: analytic_operating_unit
#: model:ir.model.fields,field_description:analytic_operating_unit.field_account_analytic_account__operating_unit_ids
msgid "Operating Units"
msgstr "Unità operative"
2 changes: 2 additions & 0 deletions analytic_operating_unit/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from . import account_analytic_account
17 changes: 17 additions & 0 deletions analytic_operating_unit/models/account_analytic_account.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2016-17 ForgeFlow S.L.
# Copyright 2016-17 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models


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

operating_unit_ids = fields.Many2many(
comodel_name="operating.unit",
string="Operating Units",
relation="analytic_account_operating_unit_rel",
column1="analytic_account_id",
column2="operating_unit_id",
check_company=True,
)
3 changes: 3 additions & 0 deletions analytic_operating_unit/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions analytic_operating_unit/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Jordi Ballester Alomar \<<[email protected]>\>
- Sudhir Arya \<<[email protected]>\>
- Alan Ramos \<<[email protected]>\>
- Alejandro Leonard \<<[email protected]>\>
- Daniel Lagin \<<[email protected]>\>
4 changes: 4 additions & 0 deletions analytic_operating_unit/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module allows users to introduce into the analytic accounts the
allowed operating units. Only a user with permissions to operate on the
operating units indicated in an analytic account will have the rights to
use it.
6 changes: 6 additions & 0 deletions analytic_operating_unit/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- Go to 'Accounting / Configuration / Analytic Accounting / Analytic
Accounts' and add the accepted Operating Units to each analytic
account.

Analytic accounts with no Operating Unit assigned to them will be
accessible by all users with access to analytic accounts.
17 changes: 17 additions & 0 deletions analytic_operating_unit/security/analytic_account_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016-17 ForgeFlow S.L.
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl) -->
<odoo>
<record id="ir_rule_analytic_account_allowed_operating_units" model="ir.rule">
<field name="model_id" ref="analytic.model_account_analytic_account" />
<field name="domain_force">
['|',('operating_unit_ids','=',False),('operating_unit_ids','in',operating_unit_ids)]
</field>
<field name="name">Analytic Accounts from allowed operating units</field>
<field name="global" eval="True" />
<field eval="0" name="perm_unlink" />
<field eval="0" name="perm_write" />
<field eval="1" name="perm_read" />
<field eval="0" name="perm_create" />
</record>
</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading