Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4573 มุมมอง

Hi,

With the following code:

(xml):


<template id="empty_report">
<t t-foreach="docs" t-as="o">
<t t-call="stock.report_delivery_document" t-lang="o.partner_id.lang"/>
</t>
</template>

<report
string="BL vierge"
id="action_empty_report"
model="stock.picking"
report_type="qweb-pdf"
name="empty_report"
file="empty_report"
print_report_name="'Delivery Slip - %s - %s' % (object.partner_id.name or '', object.name)"
menu="True"/>


and (model):



class EmptyReport(models.AbstractModel):
_name = 'report.adquat_satolas_empty_report.empty_report'

@api.model
def _get_report_values(self, docids, data=None):
docargs = {
'doc_ids': docids,
'doc_model': 'stock.picking',
'docs': self.env['stock.picking'].browse(docids),
}
return docargs


I can't see my report anywhere and more particullary in the list of reports or in the print menu...


Please help me! What I didn't understand?


Thanks,

Regards.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

i made a custom module with a xml file and i put the code

<report
string="BL vierge"
id="action_empty_report"
model="stock.picking"
report_type="qweb-pdf"
name="empty_report"
file="empty_report"
/>

just removed name and menu
i got the report menu
BL vierge
under print in inventory -> transfers
opened one stock operation

อวตาร
ละทิ้ง

it is enough to make the report to come

please check if the xml is loading( include in manifest)

ผู้เขียน

Thank you for reply but yes it is :

'data': [

'security/ir.model.access.csv',

'views/empty_report_view.xml',

],

ผู้เขียน

Yes thank you!!

Related Posts ตอบกลับ มุมมอง กิจกรรม
How to Add images in the pdf reports แก้ไขแล้ว
3
ส.ค. 25
25553
0
ธ.ค. 18
6121
1
พ.ค. 19
4036
PDF reports แก้ไขแล้ว
5
ก.ค. 25
2417
Wrong PDF Format แก้ไขแล้ว
2
มี.ค. 24
2968