if voucher_line_dict:
voucher_line_dict.update({'voucher_id': voucher_id})
voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
+
+ #Updated the amount of voucher in case of partially paid invoice
+ amount_res = voucher_line_dict.get('amount_unreconciled',amount)
+ voucher_obj.write(cr, uid, voucher_id, {'amount':amount_res}, context=context)
+
if line.journal_id.type == 'sale':
type = 'customer'
elif line.journal_id.type == 'purchase':
type = 'general'
statement_line_obj.create(cr, uid, {
'name': line.name or '?',
- 'amount': amount,
+ 'amount': amount_res if amount >= 0 else -amount_res,
'type': type,
'partner_id': line.partner_id.id,
'account_id': line.account_id.id,
<form string="Import Entries">
<group colspan="4" expand="1">
<separator string="Payable and Receivables" colspan="4"/>
- <field height="300" width="700" name="line_ids" colspan="4" nolabel="1" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False), ('reconcile_partial_id','=',False), ('state', '=', 'valid')]"/>
+ <field height="300" width="700" name="line_ids" colspan="4" nolabel="1" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False), ('journal_id.type','not in',['bank','cash']), ('state', '=', 'valid')]"/>
</group>
<group colspan="4" col="6">
<label string ="" colspan="2"/>