[FIX] Corrected small things in swiss accounting
bzr revid: nicolas.vanhoren@openerp.com-20101026150632-lsvdofxrqdbnmlxh
This commit is contained in:
parent
e6b58a33cf
commit
e380d5d55c
|
@ -36,7 +36,6 @@ import wizard
|
|||
import invoice
|
||||
import company
|
||||
import partner
|
||||
import company
|
||||
import payment
|
||||
import report
|
||||
import bank
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from osv import osv
|
||||
|
||||
class AccountMoveLine(osv.osv):
|
||||
""" Inherit account.move.line in order to add a custom link
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from osv import osv, fields
|
||||
|
||||
class account_dta(osv.osv):
|
||||
|
|
|
@ -72,12 +72,10 @@ def _reconstruct_invoice_ref(cursor, user, reference, context=None):
|
|||
def _import(self, cursor, user, data, context=None):
|
||||
|
||||
statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
# statement_reconcile_obj = pool.get('account.bank.statement.reconcile')
|
||||
statement_obj = self.pool.get('account.bank.statement')
|
||||
voucher_obj = self.pool.get('account.voucher')
|
||||
voucher_line_obj = self.pool.get('account.voucher.line')
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
property_obj = self.pool.get('ir.property')
|
||||
model_fields_obj = self.pool.get('ir.model.fields')
|
||||
attachment_obj = self.pool.get('ir.attachment')
|
||||
file = data['form']['file']
|
||||
statement_id = data['id']
|
||||
|
@ -204,13 +202,13 @@ def _import(self, cursor, user, data, context=None):
|
|||
values['voucher_id'] = voucher_id
|
||||
voucher_line_dict = False
|
||||
if result['value']['line_ids']:
|
||||
for line_dict in result['value']['line_ids']:
|
||||
move_line = move_line_obj.browse(cursor, user, line_dict['move_line_id'], context)
|
||||
if move_id == move_line.move_id.id:
|
||||
voucher_line_dict = line_dict
|
||||
for line_dict in result['value']['line_ids']:
|
||||
move_line = move_line_obj.browse(cursor, user, line_dict['move_line_id'], context)
|
||||
if move_id == move_line.move_id.id:
|
||||
voucher_line_dict = line_dict
|
||||
if voucher_line_dict:
|
||||
voucher_line_dict.update({'voucher_id':voucher_id})
|
||||
voucher_line_obj.create(cursor, user, voucher_line_dict, context=context)
|
||||
voucher_line_dict.update({'voucher_id':voucher_id})
|
||||
voucher_line_obj.create(cursor, user, voucher_line_dict, context=context)
|
||||
|
||||
if not account_id:
|
||||
if record['amount'] >= 0:
|
||||
|
|
|
@ -385,7 +385,6 @@ def _create_dta(obj, cr, uid, data, context=None):
|
|||
raise osv.except_osv(_('Error'),
|
||||
_('No IBAN for the company bank account.'))
|
||||
|
||||
dta_line_obj = pool.get('account.dta.line')
|
||||
res_partner_bank_obj = pool.get('res.partner.bank')
|
||||
|
||||
seq = 1
|
||||
|
|
Loading…
Reference in New Issue