Nehal Panchal (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-573404-nep 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-573404-nep/+merge/101086

Hello,

If we create Invoice with total 0.00, and make payment with amount 0.00. The 
state remains open.

This fixes the issue.

Thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-573404-nep/+merge/101086
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-573404-nep.
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2012-03-20 07:20:19 +0000
+++ account_voucher/account_voucher.py	2012-04-06 10:34:20 +0000
@@ -736,10 +736,11 @@
             for line in inv.line_ids:
                 #create one move line per voucher line where amount is not 0.0
                 if not line.amount:
-                    continue
+                    if line.amount != line_total:
+                        continue
                 #we check if the voucher line is fully paid or not and create a move line to balance the payment and initial invoice if needed
                 if line.amount == line.amount_unreconciled:
-                    amount = line.move_line_id.amount_residual #residual amount in company currency
+                    amount = line.move_line_id.amount_residual or 0.0#residual amount in company currency
                 else:
                     amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=context_multi_currency)
                 move_line = {
@@ -757,7 +758,8 @@
                     'date': inv.date
                 }
                 if not amount:
-                    raise osv.except_osv(_('Warning'),
+                    if amount != line.amount:
+                        raise osv.except_osv(_('Warning'),
                         _("Error while processing 'account.voucher %s' (id:%s) for partner '%s', amount: %s !") % (inv.name, inv.id, inv.partner_id.name, inv.amount))
                 if amount < 0:
                     amount = -amount

_______________________________________________
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

Reply via email to