I am trying to customise python code in professional tax so that it will be able to calculate tax based on employees salary and gender. I am new to odoo and facing issues in linking various fields of various models.
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- 프로젝트
- MRP
신고된 질문입니다
Hi just try this on python code section under salary rule definition
if contract.employee_id.gender = "Male":
    result = your logic
else contract.employee_id.gender = "Female"
    result = your logic
I tried using delegation inheritance and also inheriting models directly. When i am using two models in a list using like _inherit = ['hr.payroll' , 'hr.contract'] , the error is that the class does not exist. and _inherit ='hr.payroll' _inherits = {'hr.contract' : 'wage'} , the error is ALTER TABLE "hr_salary_rule" ALTER COLUMN "wage" SET NOT NULL'
| 관련 게시물 | 답글 | 화면 | 활동 | |
|---|---|---|---|---|
|  | 4 5월 24  | 7864 | ||
|  | 1 7월 23  | 2703 | ||
|  | 3 6월 23  | 3747 | ||
|  | 3 4월 22  | 6095 | ||
|  | 2 5월 21  | 4337 | 
 
                        
Hi shringar,
Please mention the errors you are facing.
I tried using delegation inheritance and also inheriting models directly. When i am using two models in a list using like _inherit = ['hr.payroll' , 'hr.contract'] , the error is that the class does not exist. and _inherit ='hr.payroll' _inherits = {'hr.contract' : 'wage'} , the error is ALTER TABLE "hr_salary_rule" ALTER COLUMN "wage" SET NOT NULL'
Please explain your business case, provide your code and the traceback.