From a56b1a7e1e006dd2b4ec8235c52f3affd279a7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 26 May 2021 23:44:13 +0200 Subject: [PATCH] Limit invoice line to same company as landed cost issue10438 review336251002 --- account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account.py b/account.py index 3fbab3dc78..513ddea6dc 100644 --- a/account.py +++ b/account.py @@ -111,12 +111,13 @@ class LandedCost(Workflow, ModelSQL, ModelView, MatchMixin): ('landed_cost', '=', None), ], domain=[ + ('company', '=', Eval('company', -1)), ('invoice.state', 'in', ['posted', 'paid']), ('invoice.type', '=', 'in'), ('product.landed_cost', '=', True), ('type', '=', 'line'), ], - depends=['state']) + depends=['state', 'company']) allocation_method = fields.Selection([ ('value', 'By Value'), ], 'Allocation Method', required=True,