formatting, line: test for delete of party

This commit is contained in:
Frederik Jaeckel 2023-05-18 12:15:53 +02:00
parent 78f160bf0b
commit 619a17bcd6
16 changed files with 701 additions and 516 deletions

View file

@ -14,9 +14,11 @@ class Type(ModelSQL, ModelView):
name = fields.Char(string='Name', required=True, translate=True)
short = fields.Char(string='Abbreviation', required=True, size=3)
company = fields.Many2One(string='Company', model_name='company.company',
company = fields.Many2One(
string='Company', model_name='company.company',
required=True, ondelete="RESTRICT")
feature = fields.Selection(string='Feature', required=True,
feature = fields.Selection(
string='Feature', required=True,
selection='get_sel_feature', select=True,
help='Select feature set of the Cashbook.')
@ -53,7 +55,8 @@ class Type(ModelSQL, ModelView):
def search_rec_name(cls, name, clause):
""" search in name + short
"""
return ['OR',
return [
'OR',
('name',) + tuple(clause[1:]),
('short',) + tuple(clause[1:]),
]