Rifakat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-383540-rha into
lp:openobject-addons/6.0.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-383540-rha/+merge/94745
Hello,
When we provide secondary currency in account and try paying through voucher,
then it raises warning to provide write off account even if we have already
provided it.
Improved argument for method reconcile() and partial_reconcile(), passed write
off account, journal and period.
Please review it.
Regards,
Rifakat
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-383540-rha/+merge/94745
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-383540-rha.
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2012-01-10 14:42:15 +0000
+++ account/account_move_line.py 2012-02-27 10:19:21 +0000
@@ -726,7 +726,7 @@
)
return cr.fetchone()
- def reconcile_partial(self, cr, uid, ids, type='auto', context=None):
+ def reconcile_partial(self, cr, uid, ids, type='auto', context=None, writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False):
move_rec_obj = self.pool.get('account.move.reconcile')
merges = []
unmerge = []
@@ -755,7 +755,7 @@
unmerge.append(line.id)
total += (line.debit or 0.0) - (line.credit or 0.0)
if self.pool.get('res.currency').is_zero(cr, uid, company_currency_id, total):
- res = self.reconcile(cr, uid, merges+unmerge, context=context)
+ res = self.reconcile(cr, uid, merges+unmerge, context=context, writeoff_acc_id=writeoff_acc_id, writeoff_period_id=writeoff_period_id, writeoff_journal_id=writeoff_journal_id)
return res
r_id = move_rec_obj.create(cr, uid, {
'type': type,
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2012-02-24 14:14:41 +0000
+++ account_voucher/account_voucher.py 2012-02-27 10:19:21 +0000
@@ -794,7 +794,7 @@
move_pool.post(cr, uid, [move_id], context={})
for rec_ids in rec_list_ids:
if len(rec_ids) >= 2:
- move_line_pool.reconcile_partial(cr, uid, rec_ids)
+ move_line_pool.reconcile_partial(cr, uid, rec_ids, writeoff_acc_id=inv.writeoff_acc_id.id, writeoff_period_id=inv.period_id.id, writeoff_journal_id=inv.journal_id.id)
return True
def copy(self, cr, uid, id, default={}, context=None):
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp