-
-
Notifications
You must be signed in to change notification settings - Fork 423
[18.0][MIG/REF] product_analytic #850
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
base: 18.0
Are you sure you want to change the base?
Conversation
* OCA fixes * Analytic account creating invoice lines * Tests product_analytic: Add Antiun to authors
… to the one _get_product_accounts() of the account module product_analytic: add demo data Add modules product_analytic_pos and product_analytic_purchase
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-11.0/account-analytic-11.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-11-0/account-analytic-11-0-product_analytic/ar/
Currently translated at 100,0% (5 of 5 strings) Translation: account-analytic-11.0/account-analytic-11.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-11-0/account-analytic-11-0-product_analytic/ca/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-analytic-12.0/account-analytic-12.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-product_analytic/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-12.0/account-analytic-12.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-product_analytic/pt_BR/
Currently translated at 60.0% (3 of 5 strings) Translation: account-analytic-12.0/account-analytic-12.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-product_analytic/fi/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-analytic-13.0/account-analytic-13.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-13-0/account-analytic-13-0-product_analytic/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-13.0/account-analytic-13.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-13-0/account-analytic-13-0-product_analytic/pt_BR/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-13.0/account-analytic-13.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-13-0/account-analytic-13-0-product_analytic/ca/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-13.0/account-analytic-13.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-13-0/account-analytic-13-0-product_analytic/es/
Currently translated at 100.0% (5 of 5 strings) Translation: account-analytic-16.0/account-analytic-16.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-product_analytic/ca/
The analytic distribution model serves to provide the analytic account. Rely on this to collect the product analytic.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-analytic-16.0/account-analytic-16.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-product_analytic/
Currently translated at 100.0% (6 of 6 strings) Translation: account-analytic-16.0/account-analytic-16.0-product_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-product_analytic/it/
UI can misbehave if `depends_context` is used on stored fields.
…and categories To respect the analytic distribution models defined by Odoo, a refactor is proposed for this module. In this way, analytic distribution models can be directly added, edited, or deleted from the form views of the respective Product or Product Category models.
How can you see this new view? I just tried a functional review on the runboat of this pr. But the view is not appearing. |
bosd
left a comment
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.
LGTM
|
Hi @Saran440, What is your opinion on this refactoring proposal? |
|
Hi @ThiagoMForgeFlow, I just tried this module on the runboat, but I don't found any analytic account set on invoice: |
|
Hi @matteonext, from what I can see in the images you shared, the product’s analytic distribution model has an account prefix “123”, and the account prefix of the Product Sales account is 400000. If this field has a value, they must match. Also, just to mention: when there are two analytic distribution models that assign an analytic account from the same plan, Odoo only applies the first one according to the sequence. |
matteonext
left a comment
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.
LGTM
|
Thanks @ThiagoMForgeFlow and sorry for bothering you. I just tried and it works! |
Saran440
left a comment
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.
Functional Test 👍
|
FYI: Should we add |
The analytic distribution models only contain the fields product.product and product.category. If we add the ability to edit them from the product.template form, we would need to add new logic to support this field in the analytic distribution models. |



As mention in #838,
To respect the analytic distribution models defined by Odoo, a refactor is proposed for this module. In this way, analytic distribution models can be directly added, edited, or deleted from the form views of the respective Product or Product Category models.
Product variant form view:

Product category form view

With this change, the standard logic proposed by Odoo through the distribution models will be directly respected. In the previous version, the configurations set on a product or category were not merged with those defined in the distribution models.