안녕하세요 저는 openerp을 처음 사용 했으므로 같은 객체의 모든 필드 합계를 계산하는 Total이라는 함수 필드를 만드는 데 도움이 필요합니다 ... 예. 여기Openerp 함수 필드
_name = 'hr.performanzze'
_columns = {
'p':fields.selection(((1,'Outstanding'), (2,'Well Above Expectations'), (3,'As Expected'), (4,'Below Expectations'), (5,'VeryPoor'), 0,'N/A')),'title.'),
'b':fields.selection(((1,'Outstanding'), (2,'Well Above Expectations'), (3,'As Expected'), (4,'Below Expectations'), (5,'Very Poor'), (0,'N/A')),'title'),
'total' : fields.function(get_total, method=True, string='Total Mark'),
}
def get_total(self, cr, uid, field_name, arg, context):
#want to calculate the sum of p and b
return the answer
스택 오버플로에 오신 것을 환영합니다. @lesalami. QGerome이 링크 된 문서를 확인한 다음, 도움이 필요하면 질문을 구체적으로 작성하십시오. –