Sunday, 10 April 2016

Steps for customize pdf of existing module.



1- Get the Inherit_id of the module which you want to customized the pdf from below process

Go To
Settings -> Technical -> Reports -> Reports
search the report which you want to customize
click on the report and view the information
click on search associated qweb views
click on the base dependent report
get the external id of that report



put this code in the report.xml


<report
    id="action_report_other_bit_invoice"
    model="sale.order"
    string="Other Bit Invoice"
    report_type="qweb-pdf"
    file="flex_website_product.report_otherbitinvoice"
    name="flex_website_product.report_otherbitinvoice"
/>

id: you can choos any id
model: the name of model you are going to inherit
string: give any name it will show in the dropdown
report_type: "qweb-pdf", indicates the type of report
file: your module name + template id
name: your module name + template id


create a new file template.xml

paste below code.

============================================

<template id="report_quotation_inherit_demo" inherit_id="sale.report_saleorder_document">
</template>

=============================================


paste your inherit id which you got from step 1

make changes from xpath. and check the full code in architecture tab.

No comments:

Post a Comment