Skip to content

Commit

Permalink
[MIG] analytic_partner: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
heliaktiv authored and gaelTorrecillas committed Jul 24, 2024
1 parent d4697a9 commit 80160cb
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 84 deletions.
33 changes: 19 additions & 14 deletions analytic_partner/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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.

Expand Down Expand Up @@ -104,8 +107,8 @@ 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:%20analytic_partner%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
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:%20analytic_partner%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.

Expand All @@ -132,6 +135,8 @@ Contributors

* Pimolnat Suntian <[email protected]>

* Daniel Reis <[email protected]>

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

Expand All @@ -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 <https://github.com/OCA/account-analytic/tree/14.0/analytic_partner>`_ project on GitHub.
This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/16.0/analytic_partner>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion analytic_partner/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
12 changes: 8 additions & 4 deletions analytic_partner/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions analytic_partner/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 2 additions & 0 deletions analytic_partner/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
* `Ecosoft <https://ecosoft.co.th/>`__:

* Pimolnat Suntian <[email protected]>

* Daniel Reis <[email protected]>
2 changes: 1 addition & 1 deletion analytic_partner/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
Loading

0 comments on commit 80160cb

Please sign in to comment.