Skip to content
Snippets Groups Projects
Commit 97d1afb9 authored by gawa-odoo's avatar gawa-odoo
Browse files

[FIX] analytic: accounts from another company were shown in widget


The accounts shown in the widget could be shown while being in the wrong company.
Previously, only the plans were limited by the company.

closes odoo/odoo#105188

Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
parent 26b5c8c2
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,13 @@ export class AnalyticDistribution extends Component {
async loadOptionsSourceAnalytic(request) {
let domain = [['id', 'not in', this.existingAnalyticAccountIDs]];
if (this.props.record.data.company_id){
domain.push(
'|',
['company_id', '=', this.props.record.data.company_id[0]],
['company_id', '=', false]
);
}
if (this.activeGroup) {
domain.push(['root_plan_id', '=', this.activeGroup]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment