Odoo Help


This community 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.


How to declare a variable, like - contract or payslip or employee, to get a object in Salary Rule's python code?

Md. Tanzilul Hasan Khan
on 10/13/15, 2:03 AM 418 views

I am extending the openerp payroll module for our needs, but we have to define many other models to achieve our purpose. In python code of salary rule we can fetch some objects like - contract, payslip, employee, rules, categories etc. with a field name. Currently the process is contract.wage grabs the basic salary from the contract in the python code of salary rule. I want to achieve the same functionality for some objects, like - my_object.my_field . How can achieve this?

Any suggestions will be greatly appreciated! Thanks in advance.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 10/13/15, 2:03 AM
Seen: 418 times
Last updated: 10/13/15, 2:03 AM