2017-10-06 1 views
1

직원보기에서 인쇄 할 수 있도록 새 보고서를 추가하려면 Libreoffice로 파일 .sxw을 작성했습니다. 새 보고서 열기 -> 선택했습니다. 직원 -> 루프 추가 -> 서버 enter image description here으로 보낸 다음 .rml으로 내 보냅니다. 내 문제는 : 서버로 보고서를 보내지 않으면 인쇄물을 클릭하거나 다른 컴퓨터에 모듈을 설치할 때 찾을 수 없습니다 ... xml 파일에 다음이 포함되어 있습니다 : hr_payroll_from_timesheet/report/attestation_travail.xml기존 모듈 (openerp7)에서 새 보고서 작성

<openerp> 
<data> 

    <report id="report_attestation_travail" 
      string="attestation de travail" 
      model="hr.employee" 
      name="report.hr_payroll_from_timesheet.attestation_travail" 
      rml="hr_payroll_from_timesheet/report/attestation_travail.rml" 
      auto="False" 
      menu="False"/> 

</data> 

hr_payroll_from_timesheet/보고서/attestation.py :

import time 
from openerp.report import report_sxw 

class attestation(report_sxw.rml_parse): 
    def __init__(self, cr, uid, name, context=None): 
    super(attestation, self).__init__(cr, uid, name, context=context) 
    self.localcontext.update({ 
     'time': time, 
     }) 
report_sxw.report_sxw('report.hr_payroll_from_timesheet.attestation_travail', 'hr.employee', 'addons/hr_payroll_from_timesheet/report/attestation_travail.rml', parser=attestation, header='internal') 

hr_payroll_from_timesheet/보고서/초기화 평 :

'data': [ 
     'report/attestation_travail.xml', 
], 

여러분의 도움에 감사드립니다/openerp.py
import attestation 

hr_payroll_from_timesheet, 안부 @ParaMeterz이 링크에서 similaire 질문에 대한 대답으로

답변

1

: 내가 따라하는 것이 좋습니다 OpenERP - Report Creation

링크를 클릭하고 .xml 파일을 확인하십시오.이 파일을 사용해보십시오.

.sxw 파일을 저장할 때 report_name.sxw을 입력하지 않으면 libreoffice에 .sxw 형식을 선택해야합니다.

+0

여러분을 환영합니다. – user3676872