Use declarative index definition for ModelSQL

issue5757
This commit is contained in:
Raimon Esteve 2022-11-09 18:29:39 +01:00
parent c643d0a4c8
commit d9b7ea99c6
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class Cnae(ModelSQL, ModelView, tree(separator='/')):
code = fields.Char('Code', required=True)
name = fields.Char('Name', required=True)
parent = fields.Many2One('party.cnae', 'Parent', select=True)
parent = fields.Many2One('party.cnae', 'Parent')
childs = fields.One2Many('party.cnae', 'parent', string='Children')
full_name = fields.Function(fields.Char('Full Name'),
'get_full_name')