openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #21813
[Bug 1101909] [NEW] hr payroll rules python code
Public bug reported:
1) Steps to reproduce the issue you have observed
I create two Rule and one Category.
first rule is like:
Code: TEST2
Name: TEST2
Fixed Amount = 100
Second Rule:
Code: TEST
Name: TEST
Python Code: result = rules.TEST2
2) The result you observed
File ".../addons_v6.1/addons/hr_payroll/hr_payroll.py", line 399, in compute_sheet
lines = [(0,0,line) for line in self.pool.get('hr.payslip').get_payslip_lines(cr, uid, contract_ids, payslip.id, context=context)]
File ".../addons_v6.1/addons/hr_payroll/hr_payroll.py", line 592, in get_payslip_lines
tot_rule = amount * qty * rate / 100.0
TypeError: unsupported operand type(s) for *: 'browse_record' and 'float'
2013-01-19 21:21:16,736 11013 ERROR ? openerp.netsvc: unsupported operand type(s) for *: 'browse_record' and 'float'
3) The result you expected
I expected that rule TEST give me a result = 100 and when i use rules: object containing the rules code (previously computed)
it's doesnt work well
4) The platform you are using (and browser version, if relevant)
Ubuntu 12.04 LTS
5) The OpenERP version you are using
Openerp Server 6.1 REV.: 4333
Openerp Client 6.1 REV.: 2085
Openerp Addons 6.1 REV.: 7132
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1101909
Title:
hr payroll rules python code
Status in OpenERP Addons (modules):
New
Bug description:
1) Steps to reproduce the issue you have observed
I create two Rule and one Category.
first rule is like:
Code: TEST2
Name: TEST2
Fixed Amount = 100
Second Rule:
Code: TEST
Name: TEST
Python Code: result = rules.TEST2
2) The result you observed
File ".../addons_v6.1/addons/hr_payroll/hr_payroll.py", line 399, in compute_sheet
lines = [(0,0,line) for line in self.pool.get('hr.payslip').get_payslip_lines(cr, uid, contract_ids, payslip.id, context=context)]
File ".../addons_v6.1/addons/hr_payroll/hr_payroll.py", line 592, in get_payslip_lines
tot_rule = amount * qty * rate / 100.0
TypeError: unsupported operand type(s) for *: 'browse_record' and 'float'
2013-01-19 21:21:16,736 11013 ERROR ? openerp.netsvc: unsupported operand type(s) for *: 'browse_record' and 'float'
3) The result you expected
I expected that rule TEST give me a result = 100 and when i use rules: object containing the rules code (previously computed)
it's doesnt work well
4) The platform you are using (and browser version, if relevant)
Ubuntu 12.04 LTS
5) The OpenERP version you are using
Openerp Server 6.1 REV.: 4333
Openerp Client 6.1 REV.: 2085
Openerp Addons 6.1 REV.: 7132
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1101909/+subscriptions
Follow ups
References