odoo / odoo/docker

Create button and download buttons not working

Open
#407 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

AttributeError: 'NoneType' object has no attribute 'WorkbookError:
Odoo Server Error

Traceback (most recent call last):
File "/home/macha/odoo/addons/web/controllers/main.py", line 111, in wrap
return f(*args, **kwargs)
File "/home/macha/odoo/addons/web/controllers/main.py", line 2005, in index
return self.base(data, token)
File "/home/macha/odoo/addons/web/controllers/main.py", line 1957, in base
response_data = self.from_data(columns_headers, export_data)
File "/home/macha/odoo/addons/web/controllers/main.py", line 2023, in from_data
with ExportXlsxWriter(fields, len(rows)) as xlsx_writer:
File "/home/macha/odoo/addons/web/controllers/main.py", line 773, in init
self.workbook = xlsxwriter.Workbook(self.output, {'in_memory': True})
AttributeError: 'NoneType' object has no attribute 'Workbook'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with /home/macha/odoo/addons/web/controllers/main.py, especially index, base, from_data, and ExportXlsxWriter.init, then inspect how xlsxwriter is made available in the Docker environment. Reproduce the Create and download button failure and verify that the export path completes without the reported AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.