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: