openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #15137
[Bug 1045278] Re: hr_payroll - contract_id in payslip should be restricted by a date domain
*** This bug is a duplicate of bug 1039496 ***
https://bugs.launchpad.net/bugs/1039496
** This bug has been marked a duplicate of bug 1039496
[6.1]Unable to enter worked_days on payslip unless in extended interface - Contract field missing
--
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):
New
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