Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am working on an Australian payroll module for Odoo and due to the complicated way our tax system works I need to be able to call a method in the employee object and pass it some parameters (such as date to and the taxable income for the payment period) which would then look up the relevant tax table and return the tax to be deducted from the employee's pay.
I have a method in hr.employee calculate_paygw(self, cr, uid, ids, date, taxin, context=None) and attempt to call it within a salary rule. The problem is that it is never called and I get an error - wrong python code defined for salary rule.
Is it possible to call a method on an object within a salary rule? If so, how do I do it?
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/6/14, 12:05 AM|
|Seen: 2191 times|
|Last updated: 5/6/17, 6:07 AM|