Skip to content

Commit

Permalink
[FIX] l10n_it_ateco (OCA#280)
Browse files Browse the repository at this point in the history
remove select parameter

add index parameter to parent_id
  • Loading branch information
CiroBoxHub authored and eLBati committed Mar 20, 2020
1 parent 38ff9fc commit f09c9f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions l10n_it_ateco/model/ateco.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ class AtecoCategory(models.Model):
_description = 'ATECO Code'

name = fields.Char(required=True)
code = fields.Char('ATECO Code', size=9, required=False)
code = fields.Char(string='ATECO Code', size=9, required=False)
description = fields.Text()
parent_id = fields.Many2one(
'ateco.category', 'Parent Category', select=True)
'ateco.category', string='Parent Category', index=True)
child_ids = fields.One2many(
'ateco.category', 'parent_id', 'Child Categories')
'ateco.category', 'parent_id', string='Child Categories')
partner_ids = fields.Many2many(
'res.partner', 'ateco_category_partner_rel',
'ateco_id', 'partner_id', 'Partners'
'ateco_id', 'partner_id', string='Partners'
)
10 changes: 5 additions & 5 deletions l10n_it_ateco/model/partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class ResPartner(models.Model):
_inherit = 'res.partner'

ateco_category_ids = fields.Many2many(
'ateco.category',
'ateco_category_partner_rel',
'partner_id',
'ateco_id',
'Ateco categories'
comodel_name='ateco.category',
relation='ateco_category_partner_rel',
column1='partner_id',
column2='ateco_id',
string='Ateco categories'
)

0 comments on commit f09c9f8

Please sign in to comment.