Hide sendcloud separator when it is not the shipping service

This commit is contained in:
Cédric Krier committed 2021-10-05 12:41:03 +02:00
1 parent 22ad1bda50
commit f40c3b16a0
1 file changed
+8
+8
View File
@@ -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',
}),
]