1
# -*- encoding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
6
# Copyright (c) 2012 Noviat nv/sa (www.noviat.be). All rights reserved.
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU Affero General Public License as
10
# published by the Free Software Foundation, either version 3 of the
11
# License, or (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU Affero General Public License for more details.
18
# You should have received a copy of the GNU Affero General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
24
from osv import fields, osv
25
from tools.translate import _
27
_logger = logging.getLogger(__name__)
29
class account_account_type(osv.osv):
30
''' add active flag to hide unused account types from UI '''
31
_inherit = 'account.account.type'
33
'active': fields.boolean('Active', select=True),
38
account_account_type()
40
class account_account_template(osv.osv):
41
_inherit = 'account.account.template'
43
'name': fields.char('Name', size=256, required=True, select=True, translate=True),
45
account_account_template()
47
class account_account(osv.osv):
48
_inherit = 'account.account'
50
'name': fields.char('Name', size=256, required=True, select=True, translate=True),
54
class account_tax_code(osv.osv):
55
_inherit = 'account.tax.code'
57
('code_company_uniq', 'unique (code,company_id)', 'The code of the Tax Case must be unique per company !')
61
class account_tax_code_template(osv.osv):
62
_inherit = 'account.tax.code.template'
64
'name': fields.char('Tax Case Name', size=64, required=True, translate=True),
66
account_tax_code_template()
68
class account_chart_template(osv.osv):
69
_inherit = 'account.chart.template'
71
'name': fields.char('Name', size=64, required=True, translate=True),
72
'bank_from_template':fields.boolean('Banks/Cash from Template', help="Generate Bank/Cash accounts and journals from the Templates."),
75
'bank_from_template': False,
78
account_chart_template()
80
class account_fiscal_position_template(osv.osv):
81
_inherit = 'account.fiscal.position.template'
83
'name': fields.char('Fiscal Position Template', size=64, required=True, translate=True),
85
account_fiscal_position_template()
87
class account_journal(osv.osv):
88
_inherit = 'account.journal'
90
'name': fields.char('Journal Name', size=64, required=True, translate=True),