Bharat Devnani (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-862218-bde into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #862218 in OpenERP Addons: "when tried to cancel Employee payslip"
  https://bugs.launchpad.net/openobject-addons/+bug/862218

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-862218-bde/+merge/77648

Hello Sir,

Thanks for your solution, i have applied the suggested solution and now the 
functionality in hr_payroll_account is working as expected.

Thanks & Regards,
Devnani Bharat R.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-862218-bde/+merge/77648
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-862218-bde.
=== modified file 'hr_payroll_account/hr_payroll_account.py'
--- hr_payroll_account/hr_payroll_account.py	2011-09-24 15:15:33 +0000
+++ hr_payroll_account/hr_payroll_account.py	2011-09-30 06:10:30 +0000
@@ -39,7 +39,7 @@
         'journal_id': fields.many2one('account.journal', 'Expense Journal',states={'draft': [('readonly', False)]}, readonly=True, required=True),
         'move_id': fields.many2one('account.move', 'Accounting Entry', readonly=True),
     }
-    
+
     def create(self, cr, uid, vals, context=None):
         if context is None:
             context = {}
@@ -59,8 +59,8 @@
         move_ids = []
         move_to_cancel = []
         for slip in self.browse(cr, uid, ids, context=context):
-            move_ids.append(slip.move_id.id)
             if slip.move_id.state == 'posted':
+                move_ids.append(slip.move_id.id)
                 move_to_cancel.append(slip.move_id.id)
         move_pool.button_cancel(cr, uid, move_to_cancel, context=context)
         move_pool.unlink(cr, uid, move_ids, context=context)

_______________________________________________
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