openerp - Odoo report error: Qweb error maximum recursion depth exceeded -


i'm trying create report , seemed fine code except got error while printing report

here's part error message:

  file "/opt/odoo8/odoo/addons/report/models/report.py", line 135, in translate_doc     return self.translate_doc(cr, uid, doc_id, model, lang_field, template, values, context=context)   file "/opt/odoo8/odoo/openerp/api.py", line 268, in wrapper     return old_api(self, *args, **kwargs)   file "/opt/odoo8/odoo/addons/report/models/report.py", line 106, in translate_doc     doc = self.pool[model].browse(cr, uid, doc_id, context=ctx)   file "/opt/odoo8/odoo/openerp/api.py", line 268, in wrapper     return old_api(self, *args, **kwargs)   file "/opt/odoo8/odoo/openerp/models.py", line 5266, in browse     return self._browse(environment(cr, uid, context or {}), ids) qwebexception: """"""""""""""""""""""""""""""maximum recursion depth exceeded" while evaluating "translate_doc(doc_id, doc_model, 'user_id.partner_id.lang', 'school_erp.report_printstandard')"" while evaluating "translate_doc(doc_id, doc_model, 'user_id.partner_id.lang', 'school_erp.report_printstandard')"" while evaluating "translate_doc(doc_id, doc_model, 'user_id.partner_id.lang', 'school_erp.report_printstandard')"" while evaluating 

and here's code :

in report.xml:

<template id="report_printstandard">                 <t t-call="report.html_container">                 <t t-foreach="doc_ids" t-as="doc_id">                     <t t-raw="translate_doc(doc_id, doc_model, 'user_id.partner_id.lang', 'school_erp.report_printstandard')"/>                 </t>             </t>         </template> 

and here's module:

class school_standard(osv.osv):     _name = 'school.standard'     _rec_name = "code"       _columns = {         'name':fields.char('standard name', size=256, required=true),         'code':fields.char('standard code', size=8, required=true),         'user_id':fields.many2one('res.users', 'user'),              'student_line':fields.one2many('school.student', 'standard_id', 'students'),     }        def get_uid(self, cr, uid, context=none):         return uid     _defaults = {         'user_id': get_uid,     } school_standard() 

what wrong in code?

you using same id <template id="report_printstandard"> 'school_erp.report_printstandard'.
shoud create new template different id:

<template id="report_printstandard_document">     <t t-call="report.external_layout">         <div class="page">             <!-- code-->         </div>     </t> </template>  <template id="report_printstandard">         <t t-call="report.html_container">         <t t-foreach="doc_ids" t-as="doc_id">             <t t-raw="translate_doc(doc_id, doc_model, 'user_id.partner_id.lang', 'school_erp.report_printstandard_document')"/>         </t>     </t> </template> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -