従業員ビューから印刷できるように新しいレポートを追加するには、.sxw
というファイルをLibreofficeで作成しました。新しいレポートを開く - >選択しました従業員 - >ループを追加 - >サーバーに送信し、.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 /レポート/ のinitの.py:
import attestation
hr_payroll_from_timesheet/openerp.py
'data': [
'report/attestation_travail.xml',
],
@ParaMeterzは、このリンクでsimilaireの質問に答えたようよろしく
あなたは大歓迎です – user3676872