1
# -*- coding: utf-8 -*-
2
##############################################################################
4
# account_fiscal_position_name module for OpenERP, Show name instead of description
5
# Copyright (C) 2011 SYLEAM Info Services (<http://www.Syleam.fr/>)
6
# Sebastien LANGE <sebastien.lange@syleam.fr>
8
# This file is a part of account_fiscal_position_name
10
# account_fiscal_position_name is free software: you can redistribute it and/or modify
11
# it under the terms of the GNU General Public License as published by
12
# the Free Software Foundation, either version 3 of the License, or
13
# (at your option) any later version.
15
# account_fiscal_position_name is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
# GNU Affero General Public License for more details.
20
# You should have received a copy of the GNU Affero General Public License
21
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23
##############################################################################
27
class account_tax(osv.osv):
28
_inherit = 'account.tax'
30
def name_get(self, cr, uid, ids, context=None):
31
""" Get name of account_tax"""
37
for record in self.read(cr, uid, ids, ['description','name'], context):
38
name = record['name'] or record['description']
39
res.append((record['id'],name ))
44
class account_tax_template(osv.osv):
45
_inherit = 'account.tax.template'
47
def name_get(self, cr, uid, ids, context=None):
48
""" Get name of account_tax_template"""
54
for record in self.read(cr, uid, ids, ['description','name'], context):
55
name = record['name'] or record['description']
56
res.append((record['id'],name ))
59
account_tax_template()
62
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: