openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #01298
Re: Payroll - Personal Deductions
Daniel and list, to clarify further and incorporate your suggestions could add the following:
Add class hr_payroll_employee_deductions with the columns:
'name': fields.char
'code': fields.char
'employee_id': fields.many2one
'ytd_amount': fields.function('_get_ytd_amount', etc, etc),
'ytd_occurence': fields.function('_get_ytd_occurence', etc, etc),
'date_start': fields.date
'date_end': fields.date
This would be available on the employee or contract form, and country specific defaults could be loaded with 0 amounts.
Include functions _get_ytd_occurence, _get_ytd_amount. Also add a function to return a browseable object based on the code, although I think this may require overwriting browse() instead (?). Or I might be able to just add an additional field which returns a browseable object or dictionary of the values.
To the Available Variables (hr_payroll) add employee_deductions that will allow use of employee_deductions.X.ytd_amount, employee_deductions.X.date_start, etc (where X is the code from hr_payroll_employee_deductions). With that approach, you could add rules with Condition based on: Range and the range based on date or a minimum/maximum of YTD amount. I haven't tried using the range for dates or looked at the function so it may also require modification.
The only issue I can see with this is that all unique deductions would need to have a corresponding rule within the salary structure, but there should be a limited number of deductions.
On 2012-10-02, at 9:48 AM, Daniel Reis <dreis.pt@xxxxxxxxxxx> wrote:
> My explanation was not very clear, I'm sorry.
>
> AFAIK, Salary Rules are declared in Salary Structures.
> You can't associate a Salary Rule directly to an Employee.
> Closest thing you can do is to create a specific Salary Structure for that person. It'll do the job, but I think it's rather clumsy.
>
> I feel that the possibility to also associate Salary Rules directly with Contracts/Employees would allow to solve this issue.
> This way it would be easy, for example, to add a specific fixed deduction to an employee.
> Additionally, if it includes a "date from" and "date to", or a "number of occurrences", it could the user with the cases where the deductions are to be made during a 4 month period or in the next 3 payslips.
>
> Regards
> Daniel Reis
>
>
> From: justbe.john@xxxxxxxxx
> Date: Tue, 2 Oct 2012 09:06:33 -0400
> To: openerp-community@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Openerp-community] Payroll - Personal Deductions
>
> Not sure I'm following. Wouldn't that be the same as the existing Salary Rules, since you'd need to enter a separate one per employee? I think the one additional requirement that you mentioned (and I'm looking into) is have a different cycle than the actual pay cycle - for example a deduction/allowance could be made once monthly when the pay cycle is weekly.
>
> My thinking for country specific variables add single fields to the employee object and a single salary rule that uses that field for all employees that require it. I realize that's likely a country specific way of doing it, but it could be added to whatever rules are standard for that country as the local payroll module.
>
> Does that make sense, or were you thinking something else?
>
> On 2012-10-02, at 8:42 AM, Daniel Reis <dreis.pt@xxxxxxxxxxx> wrote:
>
> In my experience, typical payroll sw has a "Fixed Values" table and "Variable Values" table (weekly, monthly, etc) associated with employees.
> To add a fixed allowance to an employee you just add a row woth the code, value and date period.
>
> If anyone is willing to add such a feature to OpenERP I'm willing to help.
>
> Regards
> Daniel Reis
>
>
> Date: Tue, 2 Oct 2012 09:16:29 +0800
> From: eric.caudal@xxxxxxxxxxxxxx
> To: openerp-community@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Openerp-community] Payroll - Personal Deductions
>
> Adding a field in the employee or contract and referring to it in the payroll rules is probably the easiest.
>
> <Logo-Elico90.gif>
> Eric CAUDAL, Elico Corp, Shanghai.
> eric.caudal@xxxxxxxxxxxxxx
> Cell: + 86 186 2136 1670. Skype: elico.corp
> Premium Certified Training Partner - OpenERP Ready Partner.
>
> <CTP-Premium-Partner-logo-300x62.png>
> http://www.openerp.net.cn
> On 10/02/2012 08:45 AM, John Boyle wrote:
> Hi folks,
>
> Just wondering what's the best way to handle personal deductions for payroll? Specifically, I'm referring to cases where there's a deduction for many/most employees but the amount differs by employee.
>
> Adding a specific rule for each employees deduction seems a little tedious. Should a field be added to the Employee or Contract and a single rule used? Or is there a better way?
>
> Thanks!
> John
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________ Mailing list: https://launchpad.net/~openerp-community Post to : openerp-community@xxxxxxxxxxxxxxxxxxx Unsubscribe : https://launchpad.net/~openerp-community More help : https://help.launchpad.net/ListHelp
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________ Mailing list: https://launchpad.net/~openerp-community Post to : openerp-community@lists.launchpad.netUnsubscribe : https://launchpad.net/~openerp-community More help : https://help.launchpad.net/ListHelp
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp
Follow ups
References