Merge lp:~openerp-dev/openobject-addons/trunk-bug-862218-bde into lp:openobject-addons

Proposed by Bharat Devnani (Open ERP)
Status: Rejected
Rejected by: qdp (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-862218-bde
Merge into: lp:openobject-addons
Diff against target: 22 lines (+2/-2)
1 file modified
hr_payroll_account/hr_payroll_account.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-862218-bde
Reviewer Review Type Date Requested Status
Mustufa Rangwala (Open ERP) (community) Approve
qdp (OpenERP) Pending
Review via email: mp+77648@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) :
review: Approve
Revision history for this message
qdp (OpenERP) (qdp) wrote :

no, the right patch was the following:

=== 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-10-07 13:47:43 +0000
@@ -59,9 +59,10 @@
         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_to_cancel.append(slip.move_id.id)
+ if slip.move_id:
+ move_ids.append(slip.move_id.id)
+ if slip.move_id.state == 'posted':
+ 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)
         return super(hr_payslip, self).cancel_sheet(cr, uid, ids, context=context)

it's now merged in addons trunk

Revision history for this message
qdp (OpenERP) (qdp) wrote :

in revision 5315

Unmerged revisions

5239. By Bharat Devnani (Open ERP)

 hr : when tried to cancel Employee payslip

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_payroll_account/hr_payroll_account.py'
2--- hr_payroll_account/hr_payroll_account.py 2011-09-24 15:15:33 +0000
3+++ hr_payroll_account/hr_payroll_account.py 2011-09-30 06:10:30 +0000
4@@ -39,7 +39,7 @@
5 'journal_id': fields.many2one('account.journal', 'Expense Journal',states={'draft': [('readonly', False)]}, readonly=True, required=True),
6 'move_id': fields.many2one('account.move', 'Accounting Entry', readonly=True),
7 }
8-
9+
10 def create(self, cr, uid, vals, context=None):
11 if context is None:
12 context = {}
13@@ -59,8 +59,8 @@
14 move_ids = []
15 move_to_cancel = []
16 for slip in self.browse(cr, uid, ids, context=context):
17- move_ids.append(slip.move_id.id)
18 if slip.move_id.state == 'posted':
19+ move_ids.append(slip.move_id.id)
20 move_to_cancel.append(slip.move_id.id)
21 move_pool.button_cancel(cr, uid, move_to_cancel, context=context)
22 move_pool.unlink(cr, uid, move_ids, context=context)

Subscribers

People subscribed via source and target branches

to all changes: