← Back to team overview

openerp-canada team mailing list archive

Fwd: l10n_ca_hr_payroll

 

Apologies, should note that this has only been tested against 6.1. I'll be testing against 7.0 in the future, but will not be backporting to 6.0 - very different payroll and not mature.

Begin forwarded message:

> From: John Boyle <justbe.john@xxxxxxxxx>
> Subject: Re: [Openerp-canada] l10n_ca_hr_payroll
> Date: 27 October, 2012 2:52:41 PM EDT
> To: "openerp-canada@xxxxxxxxxxxxxxxxxxx" <openerp-canada@xxxxxxxxxxxxxxxxxxx>
> 
> Hi folks,
> 
> I added the branch a few days ago. It can be found here:
> 
> https://code.launchpad.net/~johnb-ca/openerp-canada/l10n_ca_on_hr_payroll
> 
> I've tested it against the CRA PDOC (https://apps.cra-arc.gc.ca/ebci/rhpd/wlcm-bnvn.do) and it matches to the penny consistently on the test cases I've used (5 employees for 40 payslips each). I'm in the process of creating another module which will automate the validation using PDOC (scraped with python-Mechanize) so that I can do large scale testing next week. I'll upload it to Launchpad once it's done as well. Unfortunately it won't work for Quebec except for federal calcs so can't be easily ported and I don't believe there's an 'official' online calculator, but correct me if someone knows of one.
> 
> Notes:
> 1. The salary structure (43+ rules for non-commisioned) is very large and likely to remain that way. I chose using a large number of rules vs. large formulas within the rules as the former is easier to debug and maintain. It also aligns closely with CRA's T4127 'Payroll Deductions Formulas for Computer Programs' so any changes in the doc will be reflected in the salary rules. 
> 2. Further to 1, my approach was to have a very small number of salary structures (maybe one, maximum of two - Non-Commissioned and Commissioned) covering all cases and add the variables to a single form for HR users to work from. I don't like the idea of HR mucking with the salary structure or rules - they are very complex and shouldn't need to be touched. I believe this is a little different from the standard OpenERP approach, but I prefer it.
> 3. Federal calcs are all done within 'Federal Calculation' category, provincial calcs are done within 'Provincial Calculation'. For all provinces and territories except Quebec only the Provincial Calculations need to be changed.
> 4. I've only added a salary structure for non-Commissioned employees and there's no bonus calcs included yet. 
> 5. Most of the specific deductions (Union Dues, Alimony, etc), along with the Claim Codes and Exemptions are on the Employee form on the Canadian Payroll tab. I chose this form rather than the Contract form as I may be looking into a module for group contracts, specifically for unionized employees.
> 6. Much of my testing has been done using wages from the employee timesheets for non-salary employees. That module is in progress in my junk on Launchpad.
> 7. There's some OpenERP 'quirks' which are a pain in the butt for Canadian tax calcs - e.g. no simple way to count the payroll occurence YTD, so I've added some stuff to accommodate. I'll look into proposing some changes upstream to simplify.
> 8. Also adds a 'Pays Per Year' field on the contract form, calculated from the Scheduled Pay. Needs to be improved - see below.
> 
> ToDo:
> 1. Bonuses and Salary Advances
> 2. Commissioned Salary Structure
> 3. Automated Validation using PDOC (separate module)
> 4. Include CRA update from July
> 5. Volume testing
> 6. Document Salary Rules (via the 'Notes' section)
> 7. Improve Pays Per Year and Scheduled Pays to align with CRA's (including the 53 weeks/27 biweekly pays per year cases) and allow for manual entry
> 8. Public Holidays - I'll be sending a separate email on this.
> 
> I'm looking into creating the QC module and should get to it in the next couple of weeks. The rest of the provinces are relatively simple - feel free to contact me if you need some help porting it.
> 
> Feedback and comments welcome! Once it's been thoroughly tested I'll propose a merge.
> 
> Cheers,
> John
> 
> On 2012-10-17, at 11:33 AM, John Boyle <justbe.john@xxxxxxxxx> wrote:
> 
>> Thanks Maxime, 
>> 
>> Sounds like a good approach. For multi-province companies it may need to be consolidated into a l10n_ca_hr_payroll module in the future, but I agree that keeping the rules separate for now is the best approach.
>> 
>> I'll up the branch as soon as I'm finished unit testing early next.
>> 
>> Cheers,
>> John
>> 
>> On 2012-10-17, at 10:57 AM, Maxime Chambreuil <maxime.chambreuil@xxxxxxxxxxxxxxxxxxxx> wrote:
>> 
>>> Hello John,
>>> 
>>> Thank you very much for this very good news.
>>> 
>>> We've created a blueprint on LP regarding the payroll rules in Quebec:
>>> https://blueprints.launchpad.net/openerp-canada/+spec/openerp-payroll-rules-for-quebec
>>> 
>>> Our idea was to create one module per province, like you propose l10n_ca_on_hr_payroll. For companies operating in a single province, I don't think they want to see all the rules of all the other provinces.
>>> 
>>> Feel free to create your branch on the project and propose a merge:
>>> https://launchpad.net/openerp-canada
>>> 
>>> Regards,
>>> -- 
>>> Maxime Chambreuil
>>> 1-514-276-5468 #126
>>> 
>>> ----- Mail original -----
>>> Hello fellow Canadians!
>>> 
>>> Hopefully this list is ok to use... haven't seen much on it though.
>>> 
>>> I'm working on payroll for a Canadian company located in Ontario. They're a construction company with union, non-salaried employees so I've had to add a couple of modules, but I didn't see anything for Canadian payroll so I went ahead and started a module. The rules are nearly completed but I've only done the provincial salary rules for Ontario - I may need to do Quebec in the near future though. I'll be completed and starting testing early next week.
>>> 
>>> Anyhow, my question: is anyone else working on the Canadian payroll rules? If so, would it be best to incorporate provincial rules into a single localization module or should they remain separate (e.g. l10n_ca_on_hr_payroll, etc)? I'm not entirely sure of the best approach myself - since the provincial calcs are fairly complex stuffing them all into a single rule will make it large, but if there's a requirement for companies with a presence in multiple provinces it may be required. And for the federal rules the calcs are all the same, with the exception of Quebec of course.
>>> 
>>> Anyhow, if anyone has given thought to this let me know. I'd be happy to help extend the module I've been working on to the other provinces as well, just looking for the best approach to doing so.
>>> 
>>> Cheers,
>>> John
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openerp-canada
>>> Post to     : openerp-canada@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~openerp-canada
>>> More help   : https://help.launchpad.net/ListHelp
>> 
> 


References