2
#-*- encoding:utf-8 -*-
4
##############################################################################
6
# OpenERP, Open Source Management Solution
7
# Copyright (C) 2011 TeMPO Consulting, MSF. All Rights Reserved
8
# Developer: Olivier DOSSMANN
10
# This program is free software: you can redistribute it and/or modify
11
# it under the terms of the GNU Affero General Public License as
12
# published by the Free Software Foundation, either version 3 of the
13
# License, or (at your option) any later version.
15
# This program 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
##############################################################################
26
from osv import fields
27
from tools.translate import _
29
class account_analytic_journal(osv.osv):
30
_name = 'account.analytic.journal'
31
_description = 'Analytic Journal'
32
_inherit = 'account.analytic.journal'
34
def get_journal_type(self, cr, uid, context=None):
36
Get all analytic journal type
40
('correction', 'Correction'),
41
('cur_adj', 'Currency Adjustement'),
42
('engagement', 'Engagement'),
43
('general','General'),
46
('inkind', 'In-kind Donation'),
47
('intermission', 'Intermission'),
48
('migration', 'Migration'),
49
('extra', 'OD-Extra Accounting'),
50
('purchase','Purchase'),
51
('revaluation', 'Revaluation'),
53
('situation','Situation'),
57
'type': fields.selection(get_journal_type, 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document \
58
(eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."),
59
'code': fields.char('Journal Code', size=8, required=True),
62
def name_get(self, cr, user, ids, context=None):
66
result = self.read(cr, user, ids, ['code'])
69
txt = rs.get('code', '')
70
res += [(rs.get('id'), txt)]
73
account_analytic_journal()
74
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: