From f40c3b16a011accccf4267955dfb87c61a94cd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 5 Oct 2021 12:41:03 +0200 Subject: [PATCH] Hide sendcloud separator when it is not the shipping service --- carrier.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/carrier.py b/carrier.py index d58f260031..cd0402426b 100644 --- a/carrier.py +++ b/carrier.py @@ -262,3 +262,11 @@ class Carrier(metaclass=PoolMeta): @classmethod def default_sendcloud_format(cls): return 'label' + + @classmethod + def view_attributes(cls): + return super(Carrier, cls).view_attributes() + [ + ("/form/separator[@id='sendcloud']", 'states', { + 'invisible': Eval('shipping_service') != 'sendcloud', + }), + ]