From 7f9899e936ee3d67259eada01957f19a2e3d5fd5 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 (grafted from a108ab1afc05e08e61e54a24ad0beab5c72c48b8) --HG-- branch : 6.0 --- account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account.py b/account.py index 1a5ba7df2e..0e6c292f36 100644 --- a/account.py +++ b/account.py @@ -197,7 +197,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: