Hide discount label when line type is not line
issue11452 review431071004
This commit is contained in:
@@ -137,3 +137,11 @@ class Line(metaclass=PoolMeta):
|
|||||||
amount, self.sale.currency, digits=price_digits[1])
|
amount, self.sale.currency, digits=price_digits[1])
|
||||||
else:
|
else:
|
||||||
return lang.format('%i', rate * 100) + '%'
|
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']),
|
||||||
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user