translate: fix skipping one translation per .po file in a .tgz
[odoo/odoo.git] / addons / l10n_ch / dta.py
1 # -*- coding: utf-8 -*-
2 #  dat.py
3 #  l10n_ch
4 #
5 #  Created by Nicolas Bessi based on Credric Krier contribution
6 #
7 #  Copyright (c) 2009 CamptoCamp. All rights reserved.
8 ##############################################################################
9 #
10 # WARNING: This program as such is intended to be used by professional
11 # programmers who take the whole responsability of assessing all potential
12 # consequences resulting from its eventual inadequacies and bugs
13 # End users who are looking for a ready-to-use solution with commercial
14 # garantees and support are strongly adviced to contract a Free Software
15 # Service Company
16 #
17 # This program is Free Software; you can redistribute it and/or
18 # modify it under the terms of the GNU General Public License
19 # as published by the Free Software Foundation; either version 2
20 # of the License, or (at your option) any later version.
21 #
22 # This program is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25 # GNU General Public License for more details.
26 #
27 # You should have received a copy of the GNU General Public License
28 # along with this program; if not, write to the Free Software
29 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
30 #
31 ##############################################################################
32
33 from osv import osv, fields
34
35 class account_dta(osv.osv):
36     """class that implements bank DTA File format,
37     used to transfert bulk batch payment instruction to a bank"""
38     _name = "account.dta"
39     _description = "DTA History"
40     _columns = {
41         ### name of the file
42         'name': fields.binary('DTA file', readonly=True),
43         ### list of dta line linked to the dta order
44         'dta_line_ids': fields.one2many('account.dta.line','dta_id','DTA lines', readonly=True),
45         ## textual notes
46         'note': fields.text('Creation log', readonly=True,
47             help="Displays the problem during dta generation"),
48         ### bank how will execute DTA order
49         'bank': fields.many2one('res.partner.bank','Bank', readonly=True,select=True,
50             help="Bank how will execute DTA order"),
51         ### date of DTA order generation
52         'date': fields.date('Creation Date', readonly=True,select=True,
53             help="Date of DTA order generation"),
54         ### user how generate the DTA order
55         'user_id': fields.many2one('res.users','User', readonly=True, select=True),
56     }
57 account_dta()
58
59 class account_dta_line(osv.osv):
60     """Class that represent a DTA order line,
61     each line corressponds to a payment instruction"""
62     _name = "account.dta.line"
63     _description = "DTA line"
64     _columns = {
65         ### name of the line
66         'name' : fields.many2one('account.invoice','Invoice', required=True, size=256),
67         ### partner how will receive payments
68         'partner_id' : fields.many2one('res.partner','Partner',
69             help="Partenr to pay"),
70         ### due date of the payment
71         'due_date' : fields.date('Due date'),
72         ### date of the supplier invoice to pay
73         'invoice_date' : fields.date('Invoice date'),
74         ### cash discount date
75         'cashdisc_date' : fields.date('Cash Discount date'),
76         ### amount effectively paied on this line
77         'amount_to_pay' : fields.float('Amount to pay',
78             help="Amount effectively paid"),
79         ### amount that was on the supplier invoice
80         'amount_invoice': fields.float('Invoiced Amount',
81             help="Amount to pay base on the supplier invoice"),
82         ### Cash discount amount
83         'amount_cashdisc': fields.float('Cash Discount Amount'),
84         ### Linke to the main dta order
85         'dta_id': fields.many2one('account.dta','Associated DTA', required=True, ondelete='cascade'),
86         ### state of the invoice Drat, Cancel, Done
87         'state' : fields.selection([('draft','Draft'),('cancel','Error'),('done','Paid')],'State')
88     }
89     _defaults = {
90         'state' : lambda *a :'draft',
91     }
92
93 account_dta_line()
94
95 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: