← Back to team overview

openerp-community team mailing list archive

[Merge] lp:~openerp-community/openobject-addons/trunk-bugfix-1092044 into lp:openobject-addons

 

LudoRA has proposed merging lp:~openerp-community/openobject-addons/trunk-bugfix-1092044 into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1092044 in OpenERP Addons: "[membership] Incoice membership with wizard: no waiting member status"
  https://bugs.launchpad.net/openobject-addons/+bug/1092044

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bugfix-1092044/+merge/144663

Fix a bug of membership module that can't give waiting member status to a partner if using membership wizard in order to invoice method.
-- 
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bugfix-1092044/+merge/144663
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/trunk-bugfix-1092044.
=== modified file 'membership/membership.py'
--- membership/membership.py	2012-12-17 15:23:03 +0000
+++ membership/membership.py	2013-01-24 09:47:59 +0000
@@ -428,11 +428,10 @@
             invoice_id = invoice_obj.create(cr, uid, {
                 'partner_id': partner.id,
                 'account_id': account_id,
-                'fiscal_position': fpos_id or False
+                'fiscal_position': fpos_id or False,
+                'invoice_line': [(0, 0, line_value)]
                 }, context=context)
-            line_value['invoice_id'] = invoice_id
             invoice_line_id = invoice_line_obj.create(cr, uid, line_value, context=context)
-            invoice_obj.write(cr, uid, invoice_id, {'invoice_line': [(6, 0, [invoice_line_id])]}, context=context)
             invoice_list.append(invoice_id)
             if line_value['invoice_line_tax_id']:
                 tax_value = invoice_tax_obj.compute(cr, uid, invoice_id).values()


Follow ups