From 83a99f20381a780a3c948317c973736975fa880f Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Mon, 14 Feb 2022 11:16:57 +0100 Subject: [PATCH] Add issue11240.diff --- issue11240.diff | 22 ++++++++++++++++++++++ series | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 issue11240.diff diff --git a/issue11240.diff b/issue11240.diff new file mode 100644 index 0000000..89fc9b8 --- /dev/null +++ b/issue11240.diff @@ -0,0 +1,22 @@ +diff --git a/trytond/trytond/modules/account/move.py b/trytond/trytond/modules/account/move.py +index 28ea9b8..7f7d9c6 100644 +--- a/trytond/trytond/modules/account/move.py ++++ b/trytond/trytond/modules/account/move.py +@@ -1683,6 +1683,8 @@ class Reconcile(Wizard): + lines = [l for l in self.records if not l.reconciliation] + return list({l.account for l in lines if l.account.reconcile}) + ++ company_id = Transaction().context.get('company') ++ + balance = line.debit - line.credit + cursor.execute(*line.join(account, + condition=line.account == account.id) +@@ -1690,7 +1692,7 @@ class Reconcile(Wizard): + .select( + account.id, + where=((line.reconciliation == Null) & account.reconcile +- & account.id.in_(account_rule)), ++ & account.id.in_(account_rule) & (account.company == company_id)), + group_by=[account.id, + account_type.receivable, account_type.payable], + having=(( diff --git a/series b/series index bbfb96f..7f04424 100644 --- a/series +++ b/series @@ -51,3 +51,5 @@ issue11181.diff # [stock] Require unit price also for view location like for sto issue11051.diff # [account_invoice_defer] Add default company to invoice deferred (only 6.0) issue11049.diff # [account_invoice_defer] Raise user error message for account not configured (only 6.0) + +issue11240.diff # [account_invoice] Can't reconcile by wizard in multicompany - patch pendent de core