Skip to Content
Menu
This question has been flagged
2 Replies
1714 Views

Hello,


New to 14EE, so just configuring it to our needs.

Unfortunately whilst trying to edit the stock.report_location_barcode report in Studio to enable the location barcodes to display properly on a smaller label size, I've ended up messing something up and can no longer print labels or edit the view again in Studio.

What's the best way for me to restore the default view?


Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 2109, in report_download
    response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 2044, in report_routes
    pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 777, in _render_qweb_pdf
    bodies, html_ids, header, footer, specific_paperformat_args = self_sudo.with_context(context)._prepare_html(html)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 364, in _prepare_html
    body_parent = root.xpath('//main')[0]
IndexError: list index out of range
Avatar
Discard

Hello,

Could you try and update the app which relates to this report? I believe it is Sales.

If that doesn't work and you have no Sale data you can reinstall, but beware, this will remove all data from the database for this app.

Thanks,

Best Answer

Hi,

To restore the default report/template and to remove the studio customization done for the particular report, what you have to do is that,

1.  Activate the developer mode
2. Navigate to Settings -> Technical -> User Interface -> Views

3. Search for the "report_location_barcode" in the views


4. Click and open the record.


5. Here you can see it is calling another template named "report_generic_barcode"

6. Now search for "report_generic_barcode" in the views and open it.



7. On searching itself, you can see the corresponding studio customization is coming up. Open the first record. Then see the Inherited Views




8. In the inherited views page you can see studio customization for this report, just you can set that record/views as active False or directly delete that by clicking the delete button in the one2many lines.


Thanks

Avatar
Discard
Author Best Answer

Thanks for your help Niyas - all sorted!

Avatar
Discard