Hide discount label when line type is not line

issue11452
review431071004
(grafted from d15dbdac52d0aa325e474fc461e555c1539279c0)

--HG--
branch : 6.0
This commit is contained in:
Sergi Almacellas Abellana committed 2022-05-05 09:41:30 +02:00
1 parent 801f46acb0
commit 0507f55a24
1 file changed
+8
+8
View File
@@ -140,3 +140,11 @@ class Line(metaclass=PoolMeta):
amount, self.sale.currency, digits=price_digits[1])
else:
return lang.format('%i', rate * 100) + '%'
@classmethod
def view_attributes(cls):
return super().view_attributes() + [
('/form//label[@id="discount"]', 'states', {
'invisible': Eval('type') != 'line',
}, ['type']),
]