Launchpad automatic translations update.
[odoo/odoo.git] / addons / account_coda / account_coda.py
1 # -*- encoding: utf-8 -*-
2 ##############################################################################
3 #
4 #    OpenERP, Open Source Management Solution
5 #    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6 #
7 #    This program is free software: you can redistribute it and/or modify
8 #    it under the terms of the GNU Affero General Public License as
9 #    published by the Free Software Foundation, either version 3 of the
10 #    License, or (at your option) any later version.
11 #
12 #    This program is distributed in the hope that it will be useful,
13 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #    GNU Affero General Public License for more details.
16 #
17 #    You should have received a copy of the GNU Affero General Public License
18 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 #
20 ##############################################################################
21
22 import time
23
24 from osv import osv,fields
25
26 class account_coda(osv.osv):
27     _name = "account.coda"
28     _description = "coda for an Account"
29     _columns = {
30         'name': fields.binary('Coda file', readonly=True, help="Store the detail of bank statements"),
31         'statement_ids': fields.one2many('account.bank.statement', 'coda_id', 'Generated Bank Statements', readonly=True),
32         'note': fields.text('Import log', readonly=True),
33         'journal_id': fields.many2one('account.journal', 'Journal', readonly=True, select=True, help="Bank Journal"),
34         'date': fields.date('Date', readonly=True, select=True, help="Import Date"),
35         'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
36     }
37     _defaults = {
38         'date': time.strftime('%Y-%m-%d'),
39         'user_id': lambda self,cr,uid,context: uid,
40     }
41
42 account_coda()
43
44 class account_bank_statement(osv.osv):
45     _inherit = "account.bank.statement"
46     _columns = {
47         'coda_id':fields.many2one('account.coda', 'Coda'),
48     }
49
50 account_bank_statement()
51
52 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: