Aung Ko Ko Lin (Quartile)
Aung Ko Ko Lin (Quartile)
I can reproduce this issue. Just inheriting `analytic.mixin` from `purchase.order` can cause this error and coming from query of `project_purchase` compute method https://github.com/odoo/odoo/blob/3855829a0daf4321ab54cce3a71a92eb68c216b3/addons/project_purchase/models/project.py#L21-L31
After I checked the query of `_compute_purchase_orders_count`, there is LEFT JOIN with `purchase_order`. So, when we inherit `account.mixin` in purchase.order and query use analytic_distribution without model indicator and get ambiguous...
@azmykn > https://github.com/odoo/odoo/pull/121611 Fyi, this PR have already applied to the odoo source odoo, the issue is solved.
> I think it would be better to have the fields stored I don't see the reason to make the fields stored at the moment. > On the other hand,...
@jdidderen-noviat Thanks for the pointer. I overlooked a concept used in reporting.
Creating stored fields is challenging in this module. Simply adding the store attribute results in overly long table names, leading to errors. I encountered the following error: `odoo.http: Table name...
> A quick workaround I can think of is to shorten the field name to something like `analytic_acct_ids` which should keep the table name within 63-char limit. @yostashiro Unless I'm...
I've chosen to keep non-stored fields in this module for two main reasons: - **Technical**: Due to the reasons previously mentioned. (We might, however, force stored fields in each inherited...
@jdidderen-noviat Do you have any suggestions or concern regarding these comments (https://github.com/OCA/account-analytic/pull/565#issuecomment-1742393181, https://github.com/OCA/account-analytic/pull/565#issuecomment-1744047702)
@OCA/account-analytic-maintainers Could you please review this PR?