clean
bzr revid: pinky-e369d03f4498bed926fd0ef71419045b0611c48b
This commit is contained in:
parent
e6eefb68a6
commit
090e6b9643
|
@ -31,20 +31,37 @@
|
|||
<record model="account.invoice" id="dta_invoice">
|
||||
<field name="name">DTA invoice</field>
|
||||
<field name="dta_state">2bpaid</field>
|
||||
<field name="number">200602</field>
|
||||
<field name="type">in_invoice</field>
|
||||
<field name="partner_id" ref="base.res_partner_agrolait"/>
|
||||
<field name="account_id" ref="account.a_recv"/>
|
||||
<field name="address_invoice_id" ref="base.res_partner_address_8"/>
|
||||
<field name="account_id" ref="account.a_pay"/>
|
||||
</record>
|
||||
<record model="account.invoice.line" id="dta_invoice_line">
|
||||
<field name="name">Dummy product</field>
|
||||
<field name="price_unit">54150</field>
|
||||
<field name="quantity">1</field>
|
||||
<field name="account_id" ref="account.a_expense"/>
|
||||
<field name="invoice_id" ref="dta_invoice"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record model="account.invoice" id="v11_invoice">
|
||||
<field name="name">V11 invoice</field>
|
||||
<field name="amount_total">54150</field>
|
||||
<field name="number">1</field>
|
||||
|
||||
<field name="partner_id" ref="base.res_partner_agrolait"/>
|
||||
<field name="address_invoice_id" ref="base.res_partner_address_8"/>
|
||||
<field name="account_id" ref="account.a_recv"/>
|
||||
</record>
|
||||
|
||||
<!-- need a invoice line ! -->
|
||||
<record model="account.invoice.line" id="v11_invoice_line">
|
||||
<field name="name">Dummy product</field>
|
||||
<field name="price_unit">54150</field>
|
||||
<field name="quantity">1</field>
|
||||
<field name="account_id" ref="account.a_sale"/>
|
||||
<field name="invoice_id" ref="v11_invoice"/>
|
||||
</record>
|
||||
|
||||
<record model="account.journal" id="account.sales_journal">
|
||||
<field name="default_debit_account_id" ref="account.a_recv"/>
|
||||
|
|
|
@ -69,7 +69,7 @@ res_form = """<?xml version="1.0"?>
|
|||
|
||||
res_fields = {
|
||||
'dta' : {
|
||||
'string':'V11 file',
|
||||
'string':'DTA file',
|
||||
'type':'binary',
|
||||
'required':True,
|
||||
},
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class wizard_invoice_dta_create(wizard.interface):
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [],
|
||||
'result': {'type':'state', 'state':'end'}
|
||||
}
|
||||
}
|
||||
wizard_invoice_confirm('account.invoice.dta.create')
|
|
@ -1,51 +0,0 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
# Fabien Pinckaers <fp@tiny.Be>
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
from osv import osv, fields
|
||||
import time
|
||||
|
||||
class account_v11(osv.osv):
|
||||
_name ='account.v11'
|
||||
_columns = {
|
||||
'name': fields.char('Date', size=64), # pe mettre une sequence
|
||||
'file': fields.binary('V11 file'),
|
||||
'state': fields.selection([('new','New'), # completely new file
|
||||
('partial','Partial'), # file with unknown lines
|
||||
('error','Error'), # file completely wrong
|
||||
('done','Done')], # file ok even if some lines were ignored
|
||||
'State',readonly= True),
|
||||
'note': fields.text('Import log'),
|
||||
}
|
||||
|
||||
_defaults= {
|
||||
'name': lambda *a : time.strftime('%Y-%m-%d'),
|
||||
'state': lambda *a : 'new',
|
||||
}
|
||||
account_v11()
|
||||
|
|
@ -215,8 +215,8 @@ def _v11_parsing(self, cr, uid, data, context):
|
|||
raise Exception("No moves associated to invoice number "+ rec['invoice_ref'].lstrip('0'))
|
||||
account_move_lines.append(line_id )
|
||||
pool.get('account.move.line').reconcile(cr,uid,account_move_lines,
|
||||
writeoff_acc_id=0,#FIXME
|
||||
writeoff_journal_id=0,#FIXME
|
||||
writeoff_acc_id=0,
|
||||
writeoff_journal_id=0,
|
||||
writeoff_period_id= 0,
|
||||
)
|
||||
cr.commit()
|
||||
|
@ -225,7 +225,9 @@ def _v11_parsing(self, cr, uid, data, context):
|
|||
cr.rollback()
|
||||
nb_err+=1
|
||||
if e.value.startswith('You have to provide an account for the write off entry !'):
|
||||
log= log +'\n * Error amount mismatch for invoice '+ rec['invoice_ref'].lstrip('0')+ ':\n line : '+rec['line']
|
||||
log= log +'\n * Error amount mismatch for invoice '+ rec['invoice_ref'].lstrip('0')+\
|
||||
'( expected amount: '+str(invoice.amount_total)+' got :'+rec['montant'].lstrip('0')+\
|
||||
').\n line : '+rec['line']
|
||||
else:
|
||||
log= log +'\n * '+str(e.value)+ ' :\n line : '+rec['line']
|
||||
#raise # REMOVEME
|
||||
|
|
Loading…
Reference in New Issue