Add issue11240.diff

This commit is contained in:
Raimon Esteve 2022-02-14 11:16:57 +01:00
parent 2622530b10
commit 83a99f2038
2 changed files with 24 additions and 0 deletions

22
issue11240.diff Normal file
View File

@ -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=((

2
series
View File

@ -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