← Back to team overview

openerp-india team mailing list archive

[Bug 1045278] Re: hr_payroll - contract_id in payslip should be restricted by a date domain

 

Hello Robajz,

Thanks for the contribution.
It has been fixed in lp:~openerp-dev/openobject-addons/trunk-bug-1045278-mma
Revision ID: mma@xxxxxxxxxxx-20120912091934-0bfop7t2b7s1mcuq
Revision num: 7422

It will be available in trunk soon.


** Changed in: openobject-addons
       Status: In Progress => Fix Committed

-- 
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 Committed

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