Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payroll #85

Open
wants to merge 85 commits into
base: 8.0
Choose a base branch
from
Open

Payroll #85

wants to merge 85 commits into from

Conversation

yoyo2k
Copy link
Contributor

@yoyo2k yoyo2k commented Mar 25, 2015

Adaptare inițială de Salarizare.

Sugestiile și comentariile sunt întotdeauna binevenite.

@yoyo2k yoyo2k self-assigned this Mar 25, 2015
@yoyo2k yoyo2k added this to the 8.0 milestone Mar 25, 2015
@yoyo2k yoyo2k mentioned this pull request Mar 25, 2015
_name = 'hr.advantages'
_description = 'Advantages'

company = fields.Many2one('res.company', _('Company'), required = True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adi, de ce folosesti _( in loc de string='...', la ce te ajuta...ca nu am chef acuma sa caut...

@feketemihai
Copy link
Owner

@yoyo2k La holidays nu ai modificat sa ia zilele efective fara week-end???

@yoyo2k
Copy link
Contributor Author

yoyo2k commented Apr 3, 2015

programu se ia dupa scheduler (programul de lucru) si am modificat sa nu mai apara in calendar public holidays (se batea cap in cap cu orice alt concediu de ex medical)

@feketemihai
Copy link
Owner

da ok...da i-am pus de luni pana vineri, cu holiday din 3 pana in 8 si ia 6 zile de concediu...trebuia sa ia 4 doar...

@mcojocaru
Copy link

pentru luarea in calcul a weekend-urilor (public holidays), am testat local cu codul de mai jos, este copy/paste si putin modidficat de la metoda get_employer_days(self), cred ca ar fi ok de integrat cu refactoringul corespunzator

l10n_ro_hr_payroll/models/hr_holidays.py

def onchange_date_to(self, cr, uid, ids, date_to, date_from):
        result = super(hr_holidays, self).onchange_date_to(cr, uid, ids, date_to, date_from)
        if not (date_to and date_from):
            return result

        from_dt = datetime.strptime(date_from, tools.DEFAULT_SERVER_DATETIME_FORMAT).replace(
            hour = 0, minute = 0, second = 0)
        to_dt = datetime.strptime(date_to, tools.DEFAULT_SERVER_DATETIME_FORMAT).replace(
            hour = 23, minute = 59, second = 59)
        nb_of_days = (to_dt - from_dt).days + 1

        holidays = 0
        for day in range(0, nb_of_days):
            curr_day = (from_dt + timedelta(days = day)).replace(hour=0,minute=0)

            if self.pool['hr.holidays.public'].is_public_holiday(cr, uid, curr_day):
                holidays += 1

        result['value']['number_of_days_temp'] = nb_of_days - holidays

        return result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants