From 475804ef51e6d0a659e2e0188917713ec7ac1be3 Mon Sep 17 00:00:00 2001 From: Iryna Vyshnevska Date: Wed, 26 Dec 2018 19:02:35 +0200 Subject: [PATCH] [ADD] hide contacts on partner --- .../wizard/aged_partner_balance_wizard.py | 5 ++++- .../wizard/general_ledger_wizard.py | 5 ++++- account_financial_report_qweb/wizard/open_items_wizard.py | 4 +++- account_financial_report_qweb/wizard/trial_balance_wizard.py | 4 +++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/account_financial_report_qweb/wizard/aged_partner_balance_wizard.py b/account_financial_report_qweb/wizard/aged_partner_balance_wizard.py index 8cf0f1b4..36046c12 100644 --- a/account_financial_report_qweb/wizard/aged_partner_balance_wizard.py +++ b/account_financial_report_qweb/wizard/aged_partner_balance_wizard.py @@ -60,8 +60,11 @@ class AgedPartnerBalance(models.TransientModel): res['domain']['account_ids'] += [ ('company_id', '=', self.company_id.id)] res['domain']['partner_ids'] += [ + '&', '|', ('company_id', '=', self.company_id.id), - ('company_id', '=', False)] + ('company_id', '=', False), + ('parent_id', '=', False) + ] return res @api.onchange('receivable_accounts_only', 'payable_accounts_only') diff --git a/account_financial_report_qweb/wizard/general_ledger_wizard.py b/account_financial_report_qweb/wizard/general_ledger_wizard.py index a431cfed..3c3db78a 100644 --- a/account_financial_report_qweb/wizard/general_ledger_wizard.py +++ b/account_financial_report_qweb/wizard/general_ledger_wizard.py @@ -132,8 +132,11 @@ class GeneralLedgerReportWizard(models.TransientModel): res['domain']['journal_ids'] += [ ('company_id', '=', self.company_id.id)] res['domain']['partner_ids'] += [ + '&', '|', ('company_id', '=', self.company_id.id), - ('company_id', '=', False)] + ('company_id', '=', False), + ('parent_id', '=', False) + ] res['domain']['cost_center_ids'] += [ ('company_id', '=', self.company_id.id)] res['domain']['date_range_id'] += [ diff --git a/account_financial_report_qweb/wizard/open_items_wizard.py b/account_financial_report_qweb/wizard/open_items_wizard.py index bc66935e..54df699b 100644 --- a/account_financial_report_qweb/wizard/open_items_wizard.py +++ b/account_financial_report_qweb/wizard/open_items_wizard.py @@ -73,8 +73,10 @@ class OpenItemsReportWizard(models.TransientModel): res['domain']['account_ids'] += [ ('company_id', '=', self.company_id.id)] res['domain']['partner_ids'] += [ + '&', '|', ('company_id', '=', self.company_id.id), - ('company_id', '=', False)] + ('company_id', '=', False), + ('parent_id', '=', False)] return res @api.onchange('receivable_accounts_only', 'payable_accounts_only') diff --git a/account_financial_report_qweb/wizard/trial_balance_wizard.py b/account_financial_report_qweb/wizard/trial_balance_wizard.py index a6b5c454..433c326f 100644 --- a/account_financial_report_qweb/wizard/trial_balance_wizard.py +++ b/account_financial_report_qweb/wizard/trial_balance_wizard.py @@ -137,8 +137,10 @@ class TrialBalanceReportWizard(models.TransientModel): res['domain']['account_ids'] += [ ('company_id', '=', self.company_id.id)] res['domain']['partner_ids'] += [ + '&', '|', ('company_id', '=', self.company_id.id), - ('company_id', '=', False)] + ('company_id', '=', False), + ('parent_id', '=', False)] res['domain']['date_range_id'] += [ '|', ('company_id', '=', self.company_id.id), ('company_id', '=', False)]