31
31
_description = 'Analytic Journal'
32
32
_inherit = 'account.analytic.journal'
34
def get_journal_type(self, cr, uid, context=None):
34
def get_journal_type(self, cr, uid, context={}):
36
36
Get all analytic journal type
40
('purchase','Purchase'),
42
('general','General'),
43
('situation','Situation'),
44
('engagement', 'Engagement'),
40
46
('correction', 'Correction'),
41
47
('cur_adj', 'Currency Adjustement'),
42
('engagement', 'Engagement'),
43
('general','General'),
46
49
('inkind', 'In-kind Donation'),
47
50
('intermission', 'Intermission'),
48
('migration', 'Migration'),
49
('extra', 'OD-Extra Accounting'),
50
('purchase','Purchase'),
51
('revaluation', 'Revaluation'),
53
('situation','Situation'),
57
54
'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
55
(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
58
account_analytic_journal()
74
59
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: