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

Report Xls ?

By
heru
on 9/14/15, 2:58 AM 1,055 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
load_openerp_module(package.name)
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>

 

2

Axel Mendoza

--Axel Mendoza--
10263
| 7 7 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 an 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 ?

heru
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
0
Vishnu
On 7/15/16, 3:51 AM

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

https://www.odoo.com/apps/modules/8.0/account_move_line_report_xls/

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 

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

2 follower(s)

Stats

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