[16.0][IMP]analytic_mixin_analytic_account and stock_analytic #833
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
analytic_mixin_analytic_account
Make it compatible with other module account_financial_report of OCA/account-financial-reporting
Just add
compute_sudo=Trueto both fieldsanalytic_account_idsandanalytic_account_names, so that the console does not throw the erroraccount.move.line: inconsistent 'compute_sudo' for computed fields: analytic_account_ids, analytic_account_namesIndeed this last module also computes a field
analytic_account_idswith `store=Truestock_analytic
Add a
_compute_analytic_distributionmethod, quite generic, to apply by default the analytic distribution model atstock.movecreation, like on any other object using analytic (purchase order, invoice, ...).