Search code examples
odooodoo-8qweb

ParseError: External ID conflict while creating custom qweb report


I created a folder called Student. When i open this module i am getting the above said error. this is my opennerp file,

{
   'name': "Student",
   'version': '1.0',
   'sequence': 7,
   'depends': ['base','report'],
   'author': "ZD",
   'category': 'Testing',
   'description': "Module used for testing purpose only",
   'data': [
    'student_custom_view.xml',
    'views/Student_report123.xml',
    'Student_report.xml',
   ],
   'installable': True,
   'auto_install': False,         
}

Then in .py file,

 class student(models.Model):
_name = 'student'
name = fields.Char(string='Number', compute='_compute_name')
total2 = fields.Char(string='Total in words', compute='_compute_total')

student_report.xml,

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
    <report 
        id="Student_report123"
        string="Report"
        model="student" 
        report_type="qweb-pdf"
        file="Student.Student_report123" 
        name="Student.Student_report123" 
        attachment_use="False"
   />
</data>
</openerp>

Inside views folder i created a file called Student_report123.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="Student_report123">
 <t t-call="report.external_layout">
     <div class="page">
        <div class="row"> 
            <span t-field="o.total2"></span>
        </div>
    </div>
  </t>
 </template>
</data>
</openerp>

Solution

  • Under you student_report.xml file and student_report123.xml file the id provided are xml ids and no two xml ids are allowed same. Xml IDs must be unique throughout the database.