Skip to content

Commit f9a2773

Browse files
committed
[16.0][MIG] account_analytic_distribution_model_recalculate
1 parent 74d1a04 commit f9a2773

22 files changed

+2135
-0
lines changed
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
===============================================
2+
Account Analytic Distribution Model Recalculate
3+
===============================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:814b6566780ac734313e0b819b5e79fab90268cf7365ea4be8f81f182148f9c6
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
20+
:target: https://github.com/OCA/account-analytic/tree/16.0/account_analytic_distribution_model_recalculate
21+
:alt: OCA/account-analytic
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_distribution_model_recalculate
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-analytic&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows you to regenerate the analytic distribution of the
32+
journal items, that were generated by the distribution model.
33+
34+
It adds the posibility to add a Start Date and End Date for the
35+
distribution models too.
36+
37+
**Table of contents**
38+
39+
.. contents::
40+
:local:
41+
42+
Usage
43+
=====
44+
45+
1. **Navigate to Analytic Distribution Models**
46+
47+
- Go to Invoicing -> Configuration -> Analytic Distribution Models.
48+
49+
2. **Create or Edit a Distribution Model**
50+
51+
- Create a new distribution model or edit an existing one.
52+
- Set the **Start Date** and **End Date** to define the active period
53+
for the distribution. Only distributions within this date range will
54+
be applied.
55+
- Define filters such as **Partner** and **Account Prefix** to control
56+
when the model should apply.
57+
58+
3. **Create an Invoice or Vendor Bill**
59+
60+
- Select a customer and an account that match the conditions set in the
61+
distribution model.
62+
- If the invoice has a date, the system will use it to filter
63+
applicable distribution models; otherwise, it will use the current
64+
date.
65+
66+
4. **Use the Recalculate Function**
67+
68+
- Go to **Analytic Distribution Models**.
69+
- Enable the **Recalculate** option on the model you want to update.
70+
- Modify the analytic distribution as needed.
71+
- Click the **Recalculate** button. (Partner and account prefix needs
72+
to be set)
73+
- All journal items originally updated using this model, and still
74+
within its date range and matching its criteria, will be
75+
recalculated, using the current distribution of the model.
76+
77+
**Sync Distribution Models with Journal Items**
78+
-----------------------------------------------
79+
80+
You can use the **Sync** button to associate all journal items that
81+
match the distribution model's criteria.
82+
83+
This is especially useful in the following cases:
84+
85+
- Journal items were created **before** the distribution model existed.
86+
- The model has been **updated or changed**, and you want to reassign
87+
journal items accordingly.
88+
- You need to **sync lines** from other entries that now match the
89+
model's conditions.
90+
91+
By syncing, the system will disassociate any previous links and reassign
92+
journal items based on the current configuration of the distribution
93+
model.
94+
95+
Bug Tracker
96+
===========
97+
98+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/issues>`_.
99+
In case of trouble, please check there if your issue has already been reported.
100+
If you spotted it first, help us to smash it by providing a detailed and welcomed
101+
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20account_analytic_distribution_model_recalculate%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
102+
103+
Do not contact contributors directly about support or help with technical issues.
104+
105+
Credits
106+
=======
107+
108+
Authors
109+
-------
110+
111+
* APSL-Nagarro
112+
* Bernat Obrador
113+
114+
Contributors
115+
------------
116+
117+
- APSL - Nagarro <https://apsl.tech>
118+
119+
- Bernat Obrador
120+
121+
Maintainers
122+
-----------
123+
124+
This module is maintained by the OCA.
125+
126+
.. image:: https://odoo-community.org/logo.png
127+
:alt: Odoo Community Association
128+
:target: https://odoo-community.org
129+
130+
OCA, or the Odoo Community Association, is a nonprofit organization whose
131+
mission is to support the collaborative development of Odoo features and
132+
promote its widespread use.
133+
134+
.. |maintainer-BernatObrador| image:: https://github.com/BernatObrador.png?size=40px
135+
:target: https://github.com/BernatObrador
136+
:alt: BernatObrador
137+
138+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
139+
140+
|maintainer-BernatObrador|
141+
142+
This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/16.0/account_analytic_distribution_model_recalculate>`_ project on GitHub.
143+
144+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2024 (APSL-Nagarro) - Bernat Obrador
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Account Analytic Distribution Model Recalculate",
6+
"summary": """Add the posibility to change the analytic distribution of the journal
7+
items assigned by the distribution model""",
8+
"version": "16.0.1.0.1",
9+
"license": "AGPL-3",
10+
"author": "Odoo Community Association (OCA), APSL-Nagarro, Bernat Obrador",
11+
"website": "https://github.com/OCA/account-analytic",
12+
"maintainers": ["BernatObrador"],
13+
"depends": [
14+
"account",
15+
"analytic",
16+
],
17+
"data": [
18+
"views/account_analytic_distribution_model.xml",
19+
"views/account_move_line.xml",
20+
],
21+
"installable": True,
22+
"application": False,
23+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_analytic_distribution_model_recalculate
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 17.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: account_analytic_distribution_model_recalculate
17+
#. odoo-python
18+
#: code:addons/account_analytic_distribution_model_recalculate/models/account_analytic_distribution_model.py:0
19+
#, python-format
20+
msgid "%s analytic lines have been recalculated."
21+
msgstr ""
22+
23+
#. module: account_analytic_distribution_model_recalculate
24+
#: model:ir.model,name:account_analytic_distribution_model_recalculate.model_account_analytic_distribution_model
25+
msgid "Analytic Distribution Model"
26+
msgstr ""
27+
28+
#. module: account_analytic_distribution_model_recalculate
29+
#. odoo-python
30+
#: code:addons/account_analytic_distribution_model_recalculate/models/account_analytic_distribution_model.py:0
31+
#, python-format
32+
msgid "Cannot have overlapping dates for the same partner and account prefix."
33+
msgstr ""
34+
35+
#. module: account_analytic_distribution_model_recalculate
36+
#: model:ir.model.fields,field_description:account_analytic_distribution_model_recalculate.field_account_move_line__distribution_model_id
37+
msgid "Distribution Model"
38+
msgstr ""
39+
40+
#. module: account_analytic_distribution_model_recalculate
41+
#: model:ir.model.fields,field_description:account_analytic_distribution_model_recalculate.field_account_analytic_distribution_model__end_date
42+
msgid "End Date"
43+
msgstr ""
44+
45+
#. module: account_analytic_distribution_model_recalculate
46+
#: model_terms:ir.ui.view,arch_db:account_analytic_distribution_model_recalculate.inherit_account_analytic_distribution_model_form_view
47+
msgid "Filter Dates"
48+
msgstr ""
49+
50+
#. module: account_analytic_distribution_model_recalculate
51+
#: model:ir.model.fields,help:account_analytic_distribution_model_recalculate.field_account_analytic_distribution_model__recalculate
52+
msgid ""
53+
"If checked, you will be able to recalculate\n"
54+
" the analytic lines that where created by this model,\n"
55+
" and still matches the model criteria"
56+
msgstr ""
57+
58+
#. module: account_analytic_distribution_model_recalculate
59+
#: model:ir.model,name:account_analytic_distribution_model_recalculate.model_account_move_line
60+
msgid "Journal Item"
61+
msgstr ""
62+
63+
#. module: account_analytic_distribution_model_recalculate
64+
#. odoo-python
65+
#: code:addons/account_analytic_distribution_model_recalculate/models/account_analytic_distribution_model.py:0
66+
#, python-format
67+
msgid "No analytic lines have been recalculated."
68+
msgstr ""
69+
70+
#. module: account_analytic_distribution_model_recalculate
71+
#: model:ir.model.fields,field_description:account_analytic_distribution_model_recalculate.field_account_analytic_distribution_model__recalculate
72+
#: model_terms:ir.ui.view,arch_db:account_analytic_distribution_model_recalculate.inherit_account_analytic_distribution_model_tree_view
73+
msgid "Recalculate"
74+
msgstr ""
75+
76+
#. module: account_analytic_distribution_model_recalculate
77+
#: model:ir.actions.server,name:account_analytic_distribution_model_recalculate.action_recalculate_analytic_distribution
78+
msgid "Recalculate Analytic Lines"
79+
msgstr ""
80+
81+
#. module: account_analytic_distribution_model_recalculate
82+
#. odoo-python
83+
#: code:addons/account_analytic_distribution_model_recalculate/models/account_analytic_distribution_model.py:0
84+
#, python-format
85+
msgid "Recalculation Complete"
86+
msgstr ""
87+
88+
#. module: account_analytic_distribution_model_recalculate
89+
#: model:ir.model.fields,field_description:account_analytic_distribution_model_recalculate.field_account_analytic_distribution_model__start_date
90+
msgid "Start Date"
91+
msgstr ""
92+
93+
#. module: account_analytic_distribution_model_recalculate
94+
#: model_terms:ir.ui.view,arch_db:account_analytic_distribution_model_recalculate.inherit_account_analytic_distribution_model_tree_view
95+
msgid "Sync"
96+
msgstr ""
97+
98+
#. module: account_analytic_distribution_model_recalculate
99+
#: model_terms:ir.ui.view,arch_db:account_analytic_distribution_model_recalculate.inherit_account_analytic_distribution_model_tree_view
100+
msgid ""
101+
"Sync the journal items with the analytic distribution model. Used to sync "
102+
"lines that were generated before the model was created."
103+
msgstr ""
104+
105+
#. module: account_analytic_distribution_model_recalculate
106+
#. odoo-python
107+
#: code:addons/account_analytic_distribution_model_recalculate/models/account_analytic_distribution_model.py:0
108+
#, python-format
109+
msgid "The start date cannot be later than the end date."
110+
msgstr ""
111+
112+
#. module: account_analytic_distribution_model_recalculate
113+
#. odoo-python
114+
#: code:addons/account_analytic_distribution_model_recalculate/models/account_analytic_distribution_model.py:0
115+
#, python-format
116+
msgid "You must select a partner and account prefix to recalculate lines."
117+
msgstr ""

0 commit comments

Comments
 (0)