From 0709ffb0c95d06d3d4bbc71ff1f25e5371a2d20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 23 Sep 2021 10:07:39 +0200 Subject: [PATCH] Use invoice company when searching invoices to send issue10755 review373581002 --- account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account.py b/account.py index 714b4aed40..a716e18fc5 100644 --- a/account.py +++ b/account.py @@ -199,7 +199,8 @@ class InvoiceChorus(ModelSQL, ModelView, _SyntaxMixin, metaclass=PoolMeta): records = cls.search(['OR', ('number', '=', None), ('number', '=', ''), - ('company', '=', transaction.context.get('company')), + ('invoice.company', '=', + transaction.context.get('company')), ]) for record in records: