openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #16101
[Bug 1045278] Re: hr_payroll - contract_id in payslip should be restricted by a date domain
merged in trunk, thanks for the contrib.
Your domain was right.
** Changed in: openobject-addons
Status: Fix Committed => Fix Released
--
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/1045278
Title:
hr_payroll - contract_id in payslip should be restricted by a date
domain
Status in OpenERP Addons (modules):
Fix Released
Bug description:
Hello, I've noticed that in the hr_payroll module, the contract_id in
payslip in trunk rev 7337 has no domain filter.
The form view only defines a domain to match employee:
domain="[('employee_id','=',employee_id)]"
while a domain like this could be implemented on the model instead:
domain="[('employee_id','=',employee_id),('date_start','<=',date_to),'|',('date_end','>=',date_from),('date_end','=',False)]"
I have also checked the method get_contract() and the implementation
of such a domain filter there is for some reason overly complicated.
Mine will satisfy the same condition as long as the contract dates or
payslip dates are not messed up (end < start).
The trouble now is that a user can choose a contract for a payslip,
which is not valid anymore. And this can be avoided with a good domain
filter.
Thank you.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1045278/+subscriptions
References