Odoo Help


Report Xls ?

on 9/14/15, 2:58 AM 2,388 views

Hi, I have problems when i try make report with format xls.

file .py :

import xlwt 
from datetime import datetime
import time
from openerp.osv import orm 
from openerp.addons.report_xls.report_xls import report_xls
from openerp.addons.report_xls.utils import rowcol_to_cell, _render
from .wtc_kb_daily_report import wtc_daily_report_print
from openerp.tools.translate import translate
import logging
_logger = logging.getLogger(__name__)

and error message : 

Traceback (most recent call last):
File "/home/heru/odoo/openerp-8.0/openerp/service/server.py", line 901, in preload_registries
registry = RegistryManager.new(dbname, update_module=update_module)
File "/home/heru/odoo/openerp-8.0/openerp/modules/registry.py", line 324, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/heru/odoo/openerp-8.0/openerp/modules/loading.py", line 354, in load_modules
force, status, report, loaded_modules, update_module)
File "/home/heru/odoo/openerp-8.0/openerp/modules/loading.py", line 263, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/home/heru/odoo/openerp-8.0/openerp/modules/loading.py", line 149, in load_module_graph
File "/home/heru/odoo/openerp-8.0/openerp/modules/module.py", line 312, in load_openerp_module
__import__('openerp.addons.' + module_name)
File "/home/heru/odoo/openerp-8.0/openerp/modules/module.py", line 77, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/home/heru/odoo/addons/KOIN_BUMI/wtc_kb_daily_report/__init__.py", line 5, in <module>
import report
File "/home/heru/odoo/addons/KOIN_BUMI/wtc_kb_daily_report/report/__init__.py", line 1, in <module>
import wtc_kb_daily_report_report_xls
File "/home/heru/odoo/addons/KOIN_BUMI/wtc_kb_daily_report/report/wtc_kb_daily_report_report_xls.py", line 47, in <module>
class journal_detail_account_report_xls(report_xls):
NameError: name 'report_xls' is not defined

anybody, can tell me what is the solution for my case ?

thanks in advance.

<sorry my language is bad>



Axel Mendoza

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 9/14/15, 3:35 AM

I think that you need to put report_xls in your addons_path.

Maybe Report XLS (OCA) module is what you need for.

But it needs to be installed in your database to be used.

Hi Axel, I finish install module report_xls. but i don't know, how i use this module ?

on 9/14/15, 3:49 AM

You can check __openerp__.py for more info, it points to https://www.odoo.com/apps/modules/8.0/account_journal_report_xls to be used as example

Axel Mendoza
on 9/14/15, 3:56 AM
On 7/15/16, 3:51 AM

I think you are using odoo V8 then you can use this module as a reference -->


The fields that you want to print in excel need to pass using parser  and also need to specify the cell width.

its also usable with odoo V9 

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 9/14/15, 2:58 AM
Seen: 2388 times
Last updated: 7/15/16, 3:51 AM