Commit Graph

2 Commits

Author SHA1 Message Date
Jared Kipe
f6e6681ca7 [FIX] l10n_us_hr_payroll: payslip category sum over date range now includes child categories
There is a distinct difference between the way payslips compute categories and how they sum categories over periods of time.
On payslips, children of categories are included, however not if using `sum_category` over a period of time.

After this commit they behave the same by recursively computing child categories in the `sum_category` query.
2020-11-09 09:43:57 -08:00
Jared Kipe
310bcf1c4a IMP l10n_us_hr_payroll Allow configurable changes to payslip summing behavior.
In stock Odoo, summing anything in payroll rules (but most importantly rule amounts and category amounts by code), the considered payslips are referenced from their `date_from` field.  However in the USA, it is in fact the `date_to` that is more important (or accounting date). A Payslip made for 2019-12-20 to 2020-01-04 should in fact be considered a '2020' payslip, and thus the summation on other '2020' payslips must find it by considering payslips `date_to`.
2020-04-18 15:35:43 -07:00