Amit Parik (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1021130-amp into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1021130 in OpenERP Addons: "[trunk] hr_payroll: Can not duplicate salary 
structure"
  https://bugs.launchpad.net/openobject-addons/+bug/1021130

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1021130-amp/+merge/120962

Hello,

Fixes the copy method problem on this branch.
Salary structure has a 'rule_ids" m2m field, but we have written a copy method 
before adding this m2m field, that's why when we have duplicating "Salary 
Structure" it gives a traceback. 

This fix will solve this problem. But this should be also fix form server side 
when we have inherit the object which have already defined the copy method then 
this type of traceback will generated. I will post this bug on server side too. 

Thank you!
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1021130-amp/+merge/120962
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1021130-amp.
=== modified file 'hr_payroll/hr_payroll.py'
--- hr_payroll/hr_payroll.py	2012-08-07 11:31:37 +0000
+++ hr_payroll/hr_payroll.py	2012-08-23 10:49:46 +0000
@@ -51,6 +51,7 @@
         'note': fields.text('Description'),
         'parent_id':fields.many2one('hr.payroll.structure', 'Parent'),
         'children_ids':fields.one2many('hr.payroll.structure', 'parent_id', 'Children'),
+        'rule_ids':fields.many2many('hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id', 'Salary Rules'),
     }
 
     def _get_parent(self, cr, uid, context=None):
@@ -947,15 +948,6 @@
 
 hr_payslip_line()
 
-class hr_payroll_structure(osv.osv):
-
-    _inherit = 'hr.payroll.structure'
-    _columns = {
-        'rule_ids':fields.many2many('hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id', 'Salary Rules'),
-    }
-
-hr_payroll_structure()
-
 class hr_employee(osv.osv):
     '''
     Employee

_______________________________________________
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