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. |
|
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. |
|
Thanks @ThiagoMForgeFlow and sorry for bothering you. I just tried and it works! |
|
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.