Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Basic Qweb report

By
Amine
on 4/7/16, 9:12 AM 336 views

Hello

I have a small problem in my qweb report, i get error :

Internal Server Error.


in my file "rapport_bc.xml :

<?xml version="1.0" encoding="utf-8"?>

<openerp>

<data>

<report

id="rapport_bc"

string="Bon de commande"

model="sale.order"

report_type="qweb-pdf"

file="sale.model_bc"

name="sale.model_bc"

/>

</data>

</openerp>

  

and in my file "model_bc.xml'

<openerp>

<data>

<template id="model_bc_doc">

<t t-call="report.html_container">

<t t-foreach="docs" t-as="o">

<t t-call="report.external_layout">

<div class="page">

<h2>Report title</h2>

<p>This object's name is <span t-field="o.name"/></p>

</div>

</t>

</t>

</t>

</template>

<template id="model_bc">

<t t-call="report.html_container">

<t t-foreach="doc_ids" t-as="doc_id">

<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', sale.model_bc_doc')"/>

</t>

</t>

</template>

</data>

</openerp>


i reference my report in "__openerp__.py"

"init_xml": [],

'update_xml': [

'new_sale_view.xml',

'rapport_bc.xml',

'model_bc.xml',

],

Have you checked the Odoo logfile?

Mario Gielissen | Openworx
on 4/7/16, 10:26 AM
0
Nilesh Sheliya
On 4/8/16, 1:51 AM

Are you developing/added report in sale module. If yes, than ok. but if you are developing report through your custom module, then you have to replace,

sale.model_bc with your_module_name.model_bc
sale.model_bc_doc
with 
your_module_name.model_bc_doc

And then try to upgrade module, report working well.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/7/16, 9:12 AM
Seen: 336 times
Last updated: 4/8/16, 1:51 AM