콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4653 화면

 i want to add commission to an employee (ie: doctors) by efficiency.

such as : 

employee name : Alex     ; job title : Doctors

date_from : 06/01/2015  ; date_to : 06/302015

servies : consultation (from account.invoice) :

consultation number : 100   ; unit price : 100 $

total amount : 10000 $

doctors commission : 1%   100 $  added to allowance

i develop a method but i can't add it to salary rules as python code or use inputs.


def getEarn(self,,doctor_id,date_from,date_to):

total = 0.000

if doctor_id: 

meeting_obj = self.pool.get('meeting')

clause = []

clause_inti = ['&',('date', '<=', date_to),('date','>=', date_from)]

clause_final = [('doctor_id', '=', employee.id),'|','|'] + clause_init

meeting_ids = meeting_obj.search(cr, uid, clause_final, context=context)

total = sum(line.invoice_id.amount_total for line in meeting_ids)

return total


아바타
취소
베스트 답변

Can i add a commission without  developing a module ?

And how with odoo 8 native

Thanks in advance

아바타
취소
관련 게시물 답글 화면 활동
1
5월 21
3524
4
10월 19
9293
1
1월 18
8615
0
1월 17
3998
0
12월 16
2644