diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index ac17ec4d170..823bb56a7a9 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -32,7 +32,7 @@ Customer and Supplier Invoices Bank statements Reconciliation process by partner - Creates a dashboards for accountants that includes: + Creates a dashboard for accountants that includes: * List of uninvoiced quotations * Graph of aged receivables * Graph of aged incomes diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 220e981f654..aebff216c3b 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -20,7 +20,6 @@ # ############################################################################## import time -from mx import DateTime from osv import osv, fields from decimal import Decimal @@ -192,7 +191,7 @@ class account_cash_statement(osv.osv): res.append(dct) return res - def _get_cash_close_box_lines(self, cr, ids, uid, context={}): + def _get_cash_close_box_lines(self, cr, uid, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: @@ -203,6 +202,20 @@ class account_cash_statement(osv.osv): res.append((0,0,dct)) return res + def _get_cash_open_close_box_lines(self, cr, uid, context={}): + res = {} + start_l = [] + end_l = [] + starting_details = self._get_cash_open_box_lines(cr, uid, context) + ending_details = self._get_default_cash_close_box_lines(cr, uid, context) + for start in starting_details: + start_l.append((0,0,start)) + for end in ending_details: + end_l.append((0,0,end)) + res['start'] = start_l + res['end'] = end_l + return res + _columns = { 'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"), 'state': fields.selection( @@ -234,11 +247,12 @@ class account_cash_statement(osv.osv): open_jrnl = self.search(cr, uid, sql) if open_jrnl: raise osv.except_osv('Error', _('You can not have two open register for the same journal')) - + if self.pool.get('account.journal').browse(cr, uid, vals['journal_id']).type == 'cash': - lines = end_lines = self._get_cash_close_box_lines(cr, uid, [], context) + open_close = self._get_cash_open_close_box_lines(cr, uid, context) vals.update({ - 'ending_details_ids':lines + 'ending_details_ids':open_close['start'], + 'starting_details_ids':open_close['end'] }) else: vals.update({ diff --git a/addons/account/installer.py b/addons/account/installer.py index 29895c9da33..b85ac874874 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -268,7 +268,7 @@ class account_installer(osv.osv_memory): vals_journal['name']= _('Bank Journal ') vals_journal['code']= _('BNK') vals_journal['sequence_id'] = seq_id - vals_journal['type'] = 'cash' + vals_journal['type'] = 'bank' vals_journal['analytic_journal_id'] = analitical_journal_bank if vals.get('currency_id', False): vals_journal['view_id'] = view_id_cur diff --git a/addons/account/project/report/analytic_balance.py b/addons/account/project/report/analytic_balance.py index 3df4fd9584b..8050b62753f 100644 --- a/addons/account/project/report/analytic_balance.py +++ b/addons/account/project/report/analytic_balance.py @@ -19,7 +19,6 @@ # ############################################################################## -import pooler import time from report import report_sxw @@ -43,7 +42,6 @@ class account_analytic_balance(report_sxw.rml_parse): self.acc_sum_list = []# maintains a list of all ids def get_children(self, ids): - ids2 = [] read_data = self.pool.get('account.analytic.account').read(self.cr, self.uid, ids,['child_ids','code','complete_name','balance']) for data in read_data: if (data['id'] not in self.acc_ids): @@ -54,7 +52,7 @@ class account_analytic_balance(report_sxw.rml_parse): self.acc_ids.append(data['id']) self.read_data.append(data) if data['child_ids']: - res = self.get_children(data['child_ids']) + self.get_children(data['child_ids']) return True diff --git a/addons/account/test/account_change_currency.yml b/addons/account/test/account_change_currency.yml index 4fe89534ce5..479afd2f2e2 100644 --- a/addons/account/test/account_change_currency.yml +++ b/addons/account/test/account_change_currency.yml @@ -50,7 +50,7 @@ !assert {model: account.invoice, id: account_invoice_currency}: - state == 'proforma2' - - I can't change the currency of invoice when it is not in draft state so i change the state to cancel + I can't change the currency of invoice when it is not in draft state so I change the state to cancel - !workflow {model: account.invoice, action: invoice_cancel, ref: account_invoice_currency} - diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index bd9af0f2a34..7e4295da45b 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -1,5 +1,5 @@ - - In order to test the PDF reports defined on an invoice, we will print an invoice + In order to test the PDF reports defined on an invoice, we will print an Invoice Report - !python {model: account.invoice}: | import netsvc, tools, os diff --git a/addons/account/test/account_sequence_test.yml b/addons/account/test/account_sequence_test.yml index 3be824d2ca0..4748175c118 100644 --- a/addons/account/test/account_sequence_test.yml +++ b/addons/account/test/account_sequence_test.yml @@ -32,7 +32,7 @@ reference_type: none period_id: period_1 -- I create the invoice, as is I clicked on the "Create" button +- I create the invoice, as I clicked on the "Create" button - !workflow {model: account.invoice, action: invoice_open, ref: invoice_seq_test} - I check that the invoice state is "Open" diff --git a/addons/account/test/test_parent_structure.yml b/addons/account/test/test_parent_structure.yml index aed40e6f0f3..3c4db5c3ff4 100644 --- a/addons/account/test/test_parent_structure.yml +++ b/addons/account/test/test_parent_structure.yml @@ -1,5 +1,5 @@ - - We retrieve all accounts and test they are in a tree data structure. + We retrieve all accounts and test that those are in a tree data structure. - !python {model: account.account}: | ids = self.search(cr, uid, []) diff --git a/addons/account_analytic_plans/test/acount_analytic_plans_report.yml b/addons/account_analytic_plans/test/acount_analytic_plans_report.yml index debeba7daa0..0990b9ba5f9 100644 --- a/addons/account_analytic_plans/test/acount_analytic_plans_report.yml +++ b/addons/account_analytic_plans/test/acount_analytic_plans_report.yml @@ -1,5 +1,5 @@ - - Print the Cross Overed Report in Normal mode + Print the Crossovered Analytic Report in Normal mode - !python {model: account.analytic.account}: | import netsvc, tools, os, time diff --git a/addons/account_budget/__openerp__.py b/addons/account_budget/__openerp__.py index 5d6d8da0def..4fd24da70e9 100644 --- a/addons/account_budget/__openerp__.py +++ b/addons/account_budget/__openerp__.py @@ -26,7 +26,7 @@ 'category': 'Generic Modules/Accounting', 'description': """This module allows accountants to manage analytic and crossovered budgets. -Once the Master Budgets and the Budgets defined (in Financial +Once the Master Budgets and the Budgets are defined (in Financial Management/Budgets/), the Project Managers can set the planned amount on each Analytic Account. diff --git a/addons/account_budget/crossovered_budget.py b/addons/account_budget/crossovered_budget.py index e0e1be5e2a2..6c7eb6639ec 100644 --- a/addons/account_budget/crossovered_budget.py +++ b/addons/account_budget/crossovered_budget.py @@ -18,6 +18,7 @@ # along with this program. If not, see . # ############################################################################## + import datetime from osv import osv, fields @@ -42,7 +43,7 @@ class account_budget_post(osv.osv): 'company_id': fields.many2one('res.company', 'Company', required=True), } _defaults = { - 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.budget.post', context=c) + 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.budget.post', context=c) } _order = "name" @@ -62,8 +63,8 @@ class account_budget_post(osv.osv): account_budget_post() class account_budget_post_dotation(osv.osv): - def _tot_planned(self, cr, uid, ids,name,args,context): - res={} + def _tot_planned(self, cr, uid, ids, name, args, context): + res = {} for line in self.browse(cr, uid, ids): if line.period_id: obj_period=self.pool.get('account.period').browse(cr, uid, line.period_id.id) @@ -75,7 +76,6 @@ class account_budget_post_dotation(osv.osv): OR (date_to >=%s and date_to <= %s) OR (date_from < %s and date_to > %s)" cr.execute(query,(budget_id,obj_period.date_start,obj_period.date_stop,obj_period.date_start,obj_period.date_stop,obj_period.date_start,obj_period.date_stop,)) res1=cr.fetchall() - tot_planned=0.00 for record in res1: obj_lines = self.pool.get('crossovered.budget.lines').browse(cr, uid, record[0]) @@ -84,9 +84,9 @@ class account_budget_post_dotation(osv.osv): count_days = strToDate(obj_lines.date_to) - strToDate(obj_lines.date_from) total_days_of_rec = count_days.days +1 tot_planned += obj_lines.planned_amount/total_days_of_rec* days_in_period - res[line.id]=tot_planned + res[line.id] = tot_planned else: - res[line.id]=0.00 + res[line.id] = 0.00 return res _name = 'account.budget.post.dotation' @@ -143,7 +143,6 @@ class crossovered_budget(osv.osv): return True def budget_cancel(self, cr, uid, ids, *args): - self.write(cr, uid, ids, { 'state':'cancel' }) @@ -165,7 +164,6 @@ class crossovered_budget_lines(osv.osv): acc_ids = [x.id for x in line.general_budget_id.account_ids] if not acc_ids: raise osv.except_osv(_('Error!'),_("The General Budget '%s' has no Accounts!") % str(line.general_budget_id.name)) - date_to = line.date_to date_from = line.date_from if context.has_key('wizard_date_from'): @@ -185,7 +183,6 @@ class crossovered_budget_lines(osv.osv): res={} for line in self.browse(cr, uid, ids): res[line.id]=self._prac_amt(cr, uid, [line.id], context=context)[line.id] - return res def _theo_amt(self, cr, uid, ids,context={}): @@ -233,7 +230,8 @@ class crossovered_budget_lines(osv.osv): else: res[line.id]=0.00 return res - _name="crossovered.budget.lines" + + _name = "crossovered.budget.lines" _description = "Budget Line" _columns = { 'crossovered_budget_id': fields.many2one('crossovered.budget', 'Budget', ondelete='cascade', select=True, required=True), @@ -252,7 +250,6 @@ class crossovered_budget_lines(osv.osv): crossovered_budget_lines() class account_analytic_account(osv.osv): - _name = 'account.analytic.account' _inherit = 'account.analytic.account' _columns = { diff --git a/addons/account_budget/crossovered_budget_view.xml b/addons/account_budget/crossovered_budget_view.xml index 263dee3f686..7a4883ec61d 100644 --- a/addons/account_budget/crossovered_budget_view.xml +++ b/addons/account_budget/crossovered_budget_view.xml @@ -266,8 +266,8 @@ id="act_account_analytic_account_cb_lines"/> - - account.analytic.account.form.inherot.cci + + account.analytic.account.form.inherot.budget form account.analytic.account diff --git a/addons/account_budget/report/__init__.py b/addons/account_budget/report/__init__.py index 085b4262b6c..d1104982f8c 100644 --- a/addons/account_budget/report/__init__.py +++ b/addons/account_budget/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,12 +15,13 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import crossovered_budget_report import analytic_account_budget_report import budget_report + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_budget/report/analytic_account_budget_report.py b/addons/account_budget/report/analytic_account_budget_report.py index 37fc4680d1f..c724968a06d 100644 --- a/addons/account_budget/report/analytic_account_budget_report.py +++ b/addons/account_budget/report/analytic_account_budget_report.py @@ -20,9 +20,10 @@ ############################################################################## import time +import datetime + import pooler from report import report_sxw -import datetime class analytic_account_budget_report(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): @@ -34,7 +35,6 @@ class analytic_account_budget_report(report_sxw.rml_parse): }) self.context=context - def funct(self,object,form,ids={}, done=None, level=1): if not ids: @@ -181,5 +181,5 @@ class analytic_account_budget_report(report_sxw.rml_parse): return result report_sxw.report_sxw('report.account.analytic.account.budget', 'account.analytic.account', 'addons/account_budget/report/analytic_account_budget_report.rml',parser=analytic_account_budget_report,header='internal') -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account_budget/report/budget_report.py b/addons/account_budget/report/budget_report.py index 648015b3d2b..171984e9851 100644 --- a/addons/account_budget/report/budget_report.py +++ b/addons/account_budget/report/budget_report.py @@ -20,8 +20,9 @@ ############################################################################## import time -from report import report_sxw import datetime + +from report import report_sxw import operator class budget_report(report_sxw.rml_parse): @@ -64,8 +65,8 @@ class budget_report(report_sxw.rml_parse): achievements = float(self.cr.fetchone()[0]) res.append({'name': a.name, 'code': a.code, 'achievements': achievements}) return res + report_sxw.report_sxw('report.account.budget', 'account.budget.post', 'addons/account_budget/report/budget_report.rml',parser=budget_report, header="internal") -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account_budget/test/account_budget.yml b/addons/account_budget/test/account_budget.yml index f77efa23b15..4a2d5023fc7 100644 --- a/addons/account_budget/test/account_budget.yml +++ b/addons/account_budget/test/account_budget.yml @@ -1,5 +1,5 @@ - - In order to check account budget module in OpenERP I created a budget with few budget position + In order to check account budget module in OpenERP I created a budget with few budget positions - Creating a crossovered.budget record - @@ -58,7 +58,7 @@ - state == 'validate' - - I pressed the done button to done the Budget + I pressed the done button to set the Budget to "Done" state - Performing a workflow action done on module crossovered.budget - diff --git a/addons/account_budget/test/account_budget_report.yml b/addons/account_budget/test/account_budget_report.yml index fa086e24a64..2115341c1a1 100644 --- a/addons/account_budget/test/account_budget_report.yml +++ b/addons/account_budget/test/account_budget_report.yml @@ -17,7 +17,7 @@ if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account_budget-budget_report.'+format), 'wb+').write(data) - - Print the Cross Overed Budget Report in Normal mode + Print the CrossOvered Budget Report in Normal mode - !python {model: crossovered.budget}: | import netsvc, tools, os, time diff --git a/addons/account_budget/test/account_budget_spread.yml b/addons/account_budget/test/account_budget_spread.yml index 98d85222859..c996c647025 100644 --- a/addons/account_budget/test/account_budget_spread.yml +++ b/addons/account_budget/test/account_budget_spread.yml @@ -1,5 +1,5 @@ - - In order to test Spread Wizard of account module I spread record with amount=1000 + In order to test Spread Wizard of account_budget module I spread record with amount=1000 - Creating a account.budget.spread record - @@ -9,7 +9,7 @@ - - Performing an osv_memory action check_spread on module account.budget.spread + Performing an osv_memory action check_spread on model account.budget.spread - !python {model: account.budget.spread}: | self.check_spread(cr, uid, [ref("account_budget_spread_0")], {"lang": 'en_US', diff --git a/addons/account_budget/wizard/account_budget_analytic.py b/addons/account_budget/wizard/account_budget_analytic.py index 62553520cbd..70ce1a5156b 100644 --- a/addons/account_budget/wizard/account_budget_analytic.py +++ b/addons/account_budget/wizard/account_budget_analytic.py @@ -53,5 +53,4 @@ class account_budget_analytic(osv.osv_memory): account_budget_analytic() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account_budget/wizard/account_budget_crossovered_report.py b/addons/account_budget/wizard/account_budget_crossovered_report.py index 2862cd1db48..2427044e681 100644 --- a/addons/account_budget/wizard/account_budget_crossovered_report.py +++ b/addons/account_budget/wizard/account_budget_crossovered_report.py @@ -18,6 +18,7 @@ # along with this program. If not, see . # ############################################################################## + import time from osv import fields, osv @@ -54,5 +55,4 @@ class account_budget_crossvered_report(osv.osv_memory): account_budget_crossvered_report() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account_budget/wizard/account_budget_spread.py b/addons/account_budget/wizard/account_budget_spread.py index b5ab413a862..31e059f754b 100644 --- a/addons/account_budget/wizard/account_budget_spread.py +++ b/addons/account_budget/wizard/account_budget_spread.py @@ -18,7 +18,7 @@ # along with this program. If not, see . # ############################################################################## -import netsvc + from osv import fields, osv import decimal_precision as dp diff --git a/addons/account_coda/wizard/account_coda_import.py b/addons/account_coda/wizard/account_coda_import.py index 8861c79e80e..8a88f4a255d 100644 --- a/addons/account_coda/wizard/account_coda_import.py +++ b/addons/account_coda/wizard/account_coda_import.py @@ -48,7 +48,7 @@ class account_coda_import(osv.osv_memory): 'journal_id': fields.many2one('account.journal', 'Bank Journal', required=True), 'def_payable': fields.many2one('account.account', 'Default Payable Account', domain=[('type', '=', 'payable')], required=True, help= 'Set here the payable account that will be used, by default, if the partner is not found'), 'def_receivable': fields.many2one('account.account', 'Default Receivable Account', domain=[('type', '=', 'receivable')], required=True, help= 'Set here the receivable account that will be used, by default, if the partner is not found',), - 'awaiting_account': fields.many2one('account.account', 'Default Account for Unrecognized Movement', required=True, help= 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',), + 'awaiting_account': fields.many2one('account.account', 'Default Account for Unrecognized Movement', domain=[('type', '=', 'liquidity')], required=True, help= 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled'), 'coda': fields.binary('Coda File', required=True), 'note':fields.text('Log'), } @@ -61,7 +61,6 @@ class account_coda_import(osv.osv_memory): bank_statement_obj = self.pool.get('account.bank.statement') move_line_obj = self.pool.get('account.move.line') bank_statement_line_obj = self.pool.get('account.bank.statement.line') -# statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile') voucher_obj = self.pool.get('account.voucher') voucher_line_obj = self.pool.get('account.voucher.line') account_coda_obj = self.pool.get('account.coda') @@ -196,59 +195,60 @@ class account_coda_import(osv.osv_memory): for statement in bank_statements: try: bk_st_id =bank_statement_obj.create(cr, uid, { - 'journal_id': statement['journal_id'], - 'date': time.strftime('%Y-%m-%d', time.strptime(statement['date'], "%y/%m/%d")), - 'period_id': statement['period_id'] or period, - 'balance_start': statement["balance_start"], - 'balance_end_real': statement["balance_end_real"], + 'journal_id': statement.get('journal_id',False), + 'date': time.strftime('%Y-%m-%d', time.strptime(statement.get('date',time.strftime('%Y-%m-%d')), "%y/%m/%d")), + 'period_id': statement.get('period_id',False) or period, + 'balance_start': statement.get('balance_start',False), + 'balance_end_real': statement.get('balance_end_real',False), 'state': 'draft', - 'name': statement['name'], + 'name': statement.get('name',False), }) - lines = statement["bank_statement_line"] - for value in lines: - line = lines[value] - voucher_id = False - if line['toreconcile']: # Fix me - name = line['name'][:3] + '/' + line['name'][3:7] + '/' + line['name'][7:] - rec_id = pool.get('account.move.line').search(cr, uid, [('name', '=', name), ('reconcile_id', '=', False), ('account_id.reconcile', '=', True)]) - if rec_id: - voucher_res = { 'type':(line['amount'] < 0 and 'payment' or 'receipt') , - 'name': line['name'],#line.name, - 'partner_id': line['partner_id'] ,#line.partner_id.id, - 'journal_id': statement['journal_id'], #statement.journal_id.id, - 'account_id': line['account_id'],#line.account_id.id, - 'company_id': statement['company_id'],#statement.company_id.id, - 'currency_id': statement['currency'],#statement.currency.id, - 'date': line['date'], #line.date, - 'amount':abs(line['amount']), - 'period_id':statement['period_id'] or period,# statement.period_id.id - } - voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context) - - result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt')) - voucher_line_dict = False - if result['value']['line_ids']: - for line_dict in result['value']['line_ids']: - move_line = line_obj.browse(cr, uid, line_dict['move_line_id'], context) - if line.move_id.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(cr, uid, voucher_line_dict, context=context) - -# reconcile_id = statement_reconcile_obj.create(cr, uid, { -# 'line_ids': [(6, 0, rec_id)] -# }, context=context) -# - - mv = pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context) - if mv.partner_id: - line['partner_id'] = mv.partner_id.id - if line['amount'] < 0 : - line['account_id'] = mv.partner_id.property_account_payable.id - else : - line['account_id'] = mv.partner_id.property_account_receivable.id + lines = statement.get('bank_statement_line',False) + if lines: + for value in lines: + line = lines[value] + voucher_id = False + if line.get('toreconcile',False): # Fix me + name = line['name'][:3] + '/' + line['name'][3:7] + '/' + line['name'][7:] + rec_id = self.pool.get('account.move.line').search(cr, uid, [('name', '=', name), ('reconcile_id', '=', False), ('account_id.reconcile', '=', True)]) + if rec_id: + voucher_res = { 'type':(line['amount'] < 0 and 'payment' or 'receipt') , + 'name': line['name'],#line.name, + 'partner_id': line['partner_id'] ,#line.partner_id.id, + 'journal_id': statement['journal_id'], #statement.journal_id.id, + 'account_id': line['account_id'],#line.account_id.id, + 'company_id': statement['company_id'],#statement.company_id.id, + 'currency_id': statement['currency'],#statement.currency.id, + 'date': line['date'], #line.date, + 'amount':abs(line['amount']), + 'period_id':statement.get('period_id',False) or period,# statement.period_id.id + } + voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context) + + result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt')) + voucher_line_dict = False + if result['value']['line_ids']: + for line_dict in result['value']['line_ids']: + move_line = line_obj.browse(cr, uid, line_dict['move_line_id'], context) + if line.move_id.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(cr, uid, voucher_line_dict, context=context) + + # reconcile_id = statement_reconcile_obj.create(cr, uid, { + # 'line_ids': [(6, 0, rec_id)] + # }, context=context) + # + + mv = self.pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context) + if mv.partner_id: + line['partner_id'] = mv.partner_id.id + if line['amount'] < 0 : + line['account_id'] = mv.partner_id.property_account_payable.id + else : + line['account_id'] = mv.partner_id.property_account_receivable.id str_not1 = '' if line.has_key('contry_name') and line.has_key('cntry_number'): str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"], line["cntry_number"], line["free_comm"]+line['extra_note'], line["val_date"][0], line["entry_date"][0]) diff --git a/addons/account_coda/wizard/account_coda_import.xml b/addons/account_coda/wizard/account_coda_import.xml index f344221c411..480e86d1b97 100644 --- a/addons/account_coda/wizard/account_coda_import.xml +++ b/addons/account_coda/wizard/account_coda_import.xml @@ -7,19 +7,20 @@ form
- - - - - - - - + + + + + + + + + - - + +