From 090e6b96431ae95449e2a16f387cf56c077ac2e8 Mon Sep 17 00:00:00 2001 From: pinky <> Date: Tue, 19 Dec 2006 08:36:35 +0000 Subject: [PATCH] clean bzr revid: pinky-e369d03f4498bed926fd0ef71419045b0611c48b --- addons/l10n_ch/dta/dta_demo.xml | 25 +++++++++++++--- addons/l10n_ch/dta/dta_wizard.py | 2 +- addons/l10n_ch/dta/wizard_dta.py | 42 -------------------------- addons/l10n_ch/v11/v11.py | 51 -------------------------------- addons/l10n_ch/v11/v11_import.py | 10 ++++--- 5 files changed, 28 insertions(+), 102 deletions(-) delete mode 100644 addons/l10n_ch/dta/wizard_dta.py delete mode 100644 addons/l10n_ch/v11/v11.py diff --git a/addons/l10n_ch/dta/dta_demo.xml b/addons/l10n_ch/dta/dta_demo.xml index 9255ac7389c..3716356d941 100644 --- a/addons/l10n_ch/dta/dta_demo.xml +++ b/addons/l10n_ch/dta/dta_demo.xml @@ -31,20 +31,37 @@ DTA invoice 2bpaid - 200602 + in_invoice - + + + + Dummy product + 54150 + 1 + + + + + V11 invoice 54150 1 + + - - + + Dummy product + 54150 + 1 + + + diff --git a/addons/l10n_ch/dta/dta_wizard.py b/addons/l10n_ch/dta/dta_wizard.py index 218a924f9f1..ba91c266cad 100644 --- a/addons/l10n_ch/dta/dta_wizard.py +++ b/addons/l10n_ch/dta/dta_wizard.py @@ -69,7 +69,7 @@ res_form = """ res_fields = { 'dta' : { - 'string':'V11 file', + 'string':'DTA file', 'type':'binary', 'required':True, }, diff --git a/addons/l10n_ch/dta/wizard_dta.py b/addons/l10n_ch/dta/wizard_dta.py deleted file mode 100644 index 93b11149cf1..00000000000 --- a/addons/l10n_ch/dta/wizard_dta.py +++ /dev/null @@ -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') diff --git a/addons/l10n_ch/v11/v11.py b/addons/l10n_ch/v11/v11.py deleted file mode 100644 index cb8446dcda3..00000000000 --- a/addons/l10n_ch/v11/v11.py +++ /dev/null @@ -1,51 +0,0 @@ -############################################################################## -# -# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved. -# Fabien Pinckaers -# -# 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() - diff --git a/addons/l10n_ch/v11/v11_import.py b/addons/l10n_ch/v11/v11_import.py index a3127861cbf..76e4f6350bc 100644 --- a/addons/l10n_ch/v11/v11_import.py +++ b/addons/l10n_ch/v11/v11_import.py @@ -215,17 +215,19 @@ 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() except osv.except_osv, e: - cr.rollback() + 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