CybroOdoo / OpenHRMS

GNU Affero General Public License v3.0
126 stars 214 forks source link

Employee request overtime permission error #92

Open drpsyko101 opened 1 year ago

drpsyko101 commented 1 year ago

Hi, I'm experiencing an issue where a normal employee user failed to create an overtime request due to the lack of permission of accessing hr.contract. Is it possible to calculate duration of date_from to date_to using pandas instead of accessing contract when creating a new overtime request? Or is it intended to be used by HR officer only?

The code in question: https://github.com/CybroOdoo/OpenHRMS/blob/0d23237f051d16e14b0d39f5401e892b2aebd386/ohrms_overtime/models/overtime_request.py#L250