Skip to content

Commit

Permalink
[FIX] l10n_it_account_tax_kind: Porting OCA#557 to v11 (OCA#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoRubi authored and eLBati committed Nov 10, 2018
1 parent bf6ad8d commit d743143
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion l10n_it_account_tax_kind/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
'name': 'Italian Localisation - Natura delle aliquote IVA',
'version': '11.0.1.0.0',
'version': '11.0.1.0.1',
'category': 'Localisation/Italy',
'author': "Odoo Community Association (OCA), Apulia Software s.r.l",
'website': 'https://www.odoo-italia.net/',
Expand Down
14 changes: 7 additions & 7 deletions l10n_it_account_tax_kind/model/account_tax_kind.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
class AccountTaxKind(models.Model):

_name = 'account.tax.kind'
_rec_name = 'display_name'

code = fields.Char(string='Code', size=3, required=True)
name = fields.Char(string='Name', required=True)
display_name = fields.Char(string='Name', compute='_compute_display_name')

@api.depends('code', 'name')
@api.multi
def _compute_display_name(self):
for record in self:
record.display_name = u'[%s] %s' % (record.code, record.name)
def name_get(self):
res = []
for tax_kind in self:
res.append(
(tax_kind.id, '[%s] %s' % (tax_kind.code, tax_kind.name)))
return res

@api.model
def name_search(self, name, args=None, operator='ilike', limit=100):
def name_search(self, name='', args=None, operator='ilike', limit=100):
if not args:
args = []
if name:
Expand Down

0 comments on commit d743143

Please sign in to comment.