neu: kategorie, config + test
This commit is contained in:
parent
b9bb433c39
commit
d6a8b254a3
28 changed files with 1255 additions and 35 deletions
6
types.py
6
types.py
|
@ -18,9 +18,9 @@ class Type(ModelSQL, ModelView):
|
|||
super(Type, cls).__setup__()
|
||||
cls._order.insert(0, ('name', 'ASC'))
|
||||
t = cls.__table__()
|
||||
cls._sql_constraints = [
|
||||
cls._sql_constraints.extend([
|
||||
('code_uniq', Unique(t, t.short), 'cashbook.msg_type_short_unique'),
|
||||
]
|
||||
])
|
||||
|
||||
def get_rec_name(self, name):
|
||||
""" short + name
|
||||
|
@ -32,7 +32,7 @@ class Type(ModelSQL, ModelView):
|
|||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
""" search in tracker + ticket-name
|
||||
""" search in name + short
|
||||
"""
|
||||
return ['OR',
|
||||
('name',) + tuple(clause[1:]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue