changeset c0b8d9ef4290 in modules/stock_package_shipping_sendcloud:default
details: 
https://hg.tryton.org/modules/stock_package_shipping_sendcloud?cmd=changeset&node=c0b8d9ef4290
description:
        Hide sendcloud separator when it is not the shipping service
diffstat:

 carrier.py |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 816f8f4ca824 -r c0b8d9ef4290 carrier.py
--- a/carrier.py        Tue Oct 05 12:02:05 2021 +0200
+++ b/carrier.py        Tue Oct 05 12:41:03 2021 +0200
@@ -262,3 +262,11 @@
     @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',
+                    }),
+            ]

Reply via email to