Add way to "ignore" a pending product
and some related tweaks for sake of grid
This commit is contained in:
parent
1fc17658ff
commit
fe4a178d43
3 changed files with 143 additions and 56 deletions
|
|
@ -612,10 +612,11 @@ class AlchemyNumericFilter(AlchemyGridFilter):
|
|||
"""
|
||||
value_renderer_factory = NumericValueRenderer
|
||||
|
||||
# expose greater-than / less-than verbs in addition to core
|
||||
default_verbs = ['equal', 'not_equal', 'greater_than', 'greater_equal',
|
||||
'less_than', 'less_equal', 'between',
|
||||
'is_null', 'is_not_null', 'is_any']
|
||||
def default_verbs(self):
|
||||
# expose greater-than / less-than verbs in addition to core
|
||||
return ['equal', 'not_equal', 'greater_than', 'greater_equal',
|
||||
'less_than', 'less_equal', 'between',
|
||||
'is_null', 'is_not_null', 'is_any']
|
||||
|
||||
# TODO: what follows "works" in that it prevents an error...but from the
|
||||
# user's perspective it still fails silently...need to improve on front-end
|
||||
|
|
@ -670,6 +671,14 @@ class AlchemyIntegerFilter(AlchemyNumericFilter):
|
|||
"""
|
||||
bigint = False
|
||||
|
||||
def default_verbs(self):
|
||||
|
||||
# limited verbs if choices are defined
|
||||
if self.choices:
|
||||
return ['equal', 'not_equal', 'is_null', 'is_not_null', 'is_any']
|
||||
|
||||
return super().default_verbs()
|
||||
|
||||
def value_invalid(self, value):
|
||||
if value:
|
||||
if isinstance(value, int):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue