diff --git a/analytic_partner/README.rst b/analytic_partner/README.rst index 68b88d9e39..3c52906ba2 100644 --- a/analytic_partner/README.rst +++ b/analytic_partner/README.rst @@ -2,10 +2,13 @@ Link analytic items and partner =============================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:5e7afaf509abf67fe7fc641af01f7a1c706adc6896aaf8ce2f3f9fdbcc649926 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ Link analytic items and partner :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/analytic_partner + :target: https://github.com/OCA/account-analytic/tree/16.0/analytic_partner :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-analytic_partner + :target: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-analytic_partner :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 +.. |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| +|badge1| |badge2| |badge3| |badge4| |badge5| This module adds a commercial partner on each analytic item for allowing to have another dimension for data analysis. @@ -41,14 +44,14 @@ Configuration To configure this module, you need to: -#. Go to **Setting > Users > Users** and check you have as at least "Adviser" - in your user profile and have checked the "Show Full Accounting Features" and - "Analytic Accounting" access rights. +#. Go to **Setting > Users > Groups** and check that + your user has the "Show Full Accounting Features" and + "Analytic Accounting" access rights. Usage ===== -#. Go to **Invoicing > Configuration > Management > Analytic Items**. +#. Go to **Invoicing > Accounting > Management > Analytic Items**. #. Set the **other partner** in the form view of an the analytic entry. #. Go back to list view where you can search and group by this new field. @@ -104,8 +107,8 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -132,6 +135,8 @@ Contributors * Pimolnat Suntian +* Daniel Reis + Maintainers ~~~~~~~~~~~ @@ -145,6 +150,6 @@ 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 `_ project on GitHub. +This module is part of the `OCA/account-analytic `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/analytic_partner/__manifest__.py b/analytic_partner/__manifest__.py index b2caf13df5..35567164bb 100644 --- a/analytic_partner/__manifest__.py +++ b/analytic_partner/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Link analytic items and partner", "summary": "Search and group analytic entries by partner", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "category": "Analytic Accounting", "website": "https://github.com/OCA/account-analytic", "author": "Tecnativa," "Odoo Community Association (OCA)", diff --git a/analytic_partner/models/account_move_line.py b/analytic_partner/models/account_move_line.py index 432e59574c..27ebedfca3 100644 --- a/analytic_partner/models/account_move_line.py +++ b/analytic_partner/models/account_move_line.py @@ -8,7 +8,11 @@ class AccountMoveLine(models.Model): _inherit = "account.move.line" - def _prepare_analytic_line(self): - res = super(AccountMoveLine, self)._prepare_analytic_line() - res[0]["other_partner_id"] = self.move_id.partner_id.commercial_partner_id.id - return res + def _prepare_analytic_distribution_line( + self, distribution, account_id, distribution_on_each_plan + ): + vals = super()._prepare_analytic_distribution_line( + distribution, account_id, distribution_on_each_plan + ) + vals["other_partner_id"] = self.move_id.partner_id.commercial_partner_id.id + return vals diff --git a/analytic_partner/readme/CONFIGURE.rst b/analytic_partner/readme/CONFIGURE.rst index c4f228e818..757c1ca386 100644 --- a/analytic_partner/readme/CONFIGURE.rst +++ b/analytic_partner/readme/CONFIGURE.rst @@ -1,5 +1,5 @@ To configure this module, you need to: -#. Go to **Setting > Users > Users** and check you have as at least "Adviser" - in your user profile and have checked the "Show Full Accounting Features" and - "Analytic Accounting" access rights. +#. Go to **Setting > Users > Groups** and check that + your user has the "Show Full Accounting Features" and + "Analytic Accounting" access rights. diff --git a/analytic_partner/readme/CONTRIBUTORS.rst b/analytic_partner/readme/CONTRIBUTORS.rst index 34fe7c591c..c2dead897c 100644 --- a/analytic_partner/readme/CONTRIBUTORS.rst +++ b/analytic_partner/readme/CONTRIBUTORS.rst @@ -9,3 +9,5 @@ * `Ecosoft `__: * Pimolnat Suntian + +* Daniel Reis diff --git a/analytic_partner/readme/USAGE.rst b/analytic_partner/readme/USAGE.rst index eadfe5eb35..b428968249 100644 --- a/analytic_partner/readme/USAGE.rst +++ b/analytic_partner/readme/USAGE.rst @@ -1,4 +1,4 @@ -#. Go to **Invoicing > Configuration > Management > Analytic Items**. +#. Go to **Invoicing > Accounting > Management > Analytic Items**. #. Set the **other partner** in the form view of an the analytic entry. #. Go back to list view where you can search and group by this new field. diff --git a/analytic_partner/static/description/index.html b/analytic_partner/static/description/index.html index f030adcf88..8565acf6cb 100644 --- a/analytic_partner/static/description/index.html +++ b/analytic_partner/static/description/index.html @@ -1,20 +1,21 @@ - + - + Link analytic items and partner