[REF] account move line
bzr revid: mra@mra-laptop-20100611130342-cfd8r0nf2syuxwp3
This commit is contained in:
parent
2ef34e8773
commit
e7e7ba0e58
|
@ -577,13 +577,16 @@ class account_move_line(osv.osv):
|
||||||
# writeoff; entry generated for the difference between the lines
|
# writeoff; entry generated for the difference between the lines
|
||||||
#
|
#
|
||||||
|
|
||||||
def reconcile_partial(self, cr, uid, ids, type='auto', context={}):
|
def reconcile_partial(self, cr, uid, ids, type='auto', context=None):
|
||||||
merges = []
|
merges = []
|
||||||
unmerge = []
|
unmerge = []
|
||||||
total = 0.0
|
total = 0.0
|
||||||
merges_rec = []
|
merges_rec = []
|
||||||
|
|
||||||
company_list = []
|
company_list = []
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
|
|
||||||
for line in self.browse(cr, uid, ids, context=context):
|
for line in self.browse(cr, uid, ids, context=context):
|
||||||
if company_list and not line.company_id.id in company_list:
|
if company_list and not line.company_id.id in company_list:
|
||||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
||||||
|
@ -613,13 +616,15 @@ class account_move_line(osv.osv):
|
||||||
self.pool.get('account.move.reconcile').reconcile_partial_check(cr, uid, [r_id] + merges_rec, context=context)
|
self.pool.get('account.move.reconcile').reconcile_partial_check(cr, uid, [r_id] + merges_rec, context=context)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context={}):
|
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None):
|
||||||
lines = self.browse(cr, uid, ids, context=context)
|
lines = self.browse(cr, uid, ids, context=context)
|
||||||
unrec_lines = filter(lambda x: not x['reconcile_id'], lines)
|
unrec_lines = filter(lambda x: not x['reconcile_id'], lines)
|
||||||
credit = debit = 0.0
|
credit = debit = 0.0
|
||||||
currency = 0.0
|
currency = 0.0
|
||||||
account_id = False
|
account_id = False
|
||||||
partner_id = False
|
partner_id = False
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
|
|
||||||
company_list = []
|
company_list = []
|
||||||
for line in self.browse(cr, uid, ids, context=context):
|
for line in self.browse(cr, uid, ids, context=context):
|
||||||
|
|
Loading…
Reference in New Issue