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 have an employee. A product is linked with this employee :
The product cost is 12.5 $ per worked hour :
How could I get this 12.5 $ in this python rule for salary?
(here, I write PRODUCT.COST, but it is not good)
This one work if calculate in pay slip : result = worked_days.WORK100.number_of_hours * 12.5
This one doesn't work if I calculate in payslip (error) : result = worked_days.WORK100.number_of_hours * employee.product_id.cost
Test the value:
# Available variables:
# payslip: object containing the payslips
# employee: hr.employee object
# contract: hr.contract object
# rules: object containing the rules code (previously computed)
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# worked_days: object containing the computed worked days
# inputs: object containing the computed inputs
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: 12/20/14, 10:44 AM|
|Seen: 1497 times|
|Last updated: 3/16/15, 8:10 AM|