-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
[16.0][mig] analytic_partner #609
Conversation
Classify analytic items by partner ================================== This module adds a partner on each analytic item for allowing to have another dimension for analysing data. It also handles the proper propagation of this field to the created analytic entries when validating invoices. Configuration ============= You have to be granted as at least "Accountant" in your user profile and have checked the "Analytic Accounting" access right. Usage ===== Go to Accounting > Analytic Journal Items, and there, you can set the partner for the analytic items, and search or group by it. You can also go to a partner, and click on the smart-button "Cost/Revenue", placed on the upper-right part, and you will navigate to the analytic items associated to this partner. Known issues / Roadmap ====================== * This module hasn't been tested with *account_analytic_plans* module installed, so maybe it's incompatible with it.
* IMP: Distinguish between the partner of the account and the specific partner * FIX: Allow grouping on partner_id field. Fixes OCA#41 * FIX: README - Indentation is not correct in Known issues.
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-12.0/account-analytic-12.0-analytic_partner Translate-URL: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-analytic_partner/gl/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-12.0/account-analytic-12.0-analytic_partner Translate-URL: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-analytic_partner/ca/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-12.0/account-analytic-12.0-analytic_partner Translate-URL: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-analytic_partner/pt_BR/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-12.0/account-analytic-12.0-analytic_partner Translate-URL: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-analytic_partner/zh_CN/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-14.0/account-analytic-14.0-analytic_partner Translate-URL: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-analytic_partner/fr/
Currently translated at 87.5% (7 of 8 strings) Translation: account-analytic-14.0/account-analytic-14.0-analytic_partner Translate-URL: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-analytic_partner/fr_FR/
e15e516
to
8701283
Compare
222226e
to
329642e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @dreispt I'm struggling to find out why this module is still needed. Searching for previous internal issues the problem seemed to be that when the analytic account used had a partner set it took that one instead of the one in the move line...
But I can't reproduce that issue anymore. What case are we covering here right now? As far as I could test, the other partner is always the same as the partner.
@@ -0,0 +1,9 @@ | |||
#. Go to **Invoicing > Configuration > Management > Analytic Items**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#. Go to **Invoicing > Configuration > Management > Analytic Items**. | |
#. Go to **Invoicing > Accounting > Management > Analytic Items**. |
def _prepare_analytic_line(self): | ||
res = super()._prepare_analytic_line() | ||
res[0]["other_partner_id"] = self.move_id.partner_id.commercial_partner_id.id | ||
def _prepare_analytic_lines(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that _prepare_analytic_distribution_line
is the proper method to hook into now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chienandalu , I think you are right, we can add other_partner_id
to the dict returned by _prepare_analytic_distribution_line.
Somethings like:
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
Hi @dreispt, How do you want to proceed? Can I create a PR on your fork?
def _prepare_analytic_line(self): | ||
res = super()._prepare_analytic_line() | ||
res[0]["other_partner_id"] = self.move_id.partner_id.commercial_partner_id.id | ||
def _prepare_analytic_lines(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chienandalu , I think you are right, we can add other_partner_id
to the dict returned by _prepare_analytic_distribution_line.
Somethings like:
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
Hi @dreispt, How do you want to proceed? Can I create a PR on your fork?
Hi @maisim , thanks for review with @chienandalu |
@maisim Yes, you are welcome to pull this branch into your fork and make your own PR. |
/ocabot migration analytic_partner |
Supersedes #581