Skip to content

[20.0][MIG] spreadsheet_oca - #137

Open
MiquelRForgeFlow wants to merge 103 commits into
OCA:20.0from
ForgeFlow:20.0-mig-spreadsheet_oca
Open

MiquelRForgeFlow wants to merge 103 commits into
OCA:20.0from
ForgeFlow:20.0-mig-spreadsheet_oca

Conversation

@MiquelRForgeFlow

Copy link
Copy Markdown

.

@chrisandrewmann

chrisandrewmann commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Great work @MiquelRForgeFlow
I've done some testing, mostly working great. So far only issue i've found is that the "Download XLSX" fails and throws an error.

Traceback (most recent call last):
File "/home/chrismann/odoo/v20/odoo/odoo/http/router.py", line 279, in call
response = serve_db(request)
^^^^^^^^^^^^^^^^^
File "/home/chrismann/odoo/v20/odoo/odoo/http/router.py", line 448, in serve_db
raise _update_served_exception(request, exc)
File "/home/chrismann/odoo/v20/odoo/odoo/http/router.py", line 446, in serve_db
return retrying(serve_func, env=request.env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrismann/odoo/v20/odoo/odoo/http/retrying.py", line 56, in retrying
result = func()
^^^^^^
File "/home/chrismann/odoo/v20/odoo/odoo/http/router.py", line 593, in serve_ir_http
response = request.dispatcher.dispatch(rule.endpoint, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrismann/odoo/v20/odoo/odoo/http/dispatcher.py", line 264, in dispatch
response = self.request.registry['ir.http']._dispatch(endpoint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrismann/odoo/v20/odoo/odoo/addons/base/models/ir_http.py", line 473, in _dispatch
result = endpoint(**request.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrismann/odoo/v20/odoo/odoo/http/routing_map.py", line 218, in route_wrapper
result = endpoint(self, *args, **params_ok)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrismann/odoo/v20/custom_addons/thirdparty/spreadsheet_oca/controllers/main.py", line 14, in download_spreadsheet_xlsx
files = json.loads(files)
^^^^^^^^^^^^^^^^^
File "/home/chrismann/.pyenv/versions/3.12.3/lib/python3.12/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrismann/.pyenv/versions/3.12.3/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrismann/.pyenv/versions/3.12.3/lib/python3.12/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@pedrobaeza

Copy link
Copy Markdown
Member

Please take #139 into account

@MiquelRForgeFlow
MiquelRForgeFlow force-pushed the 20.0-mig-spreadsheet_oca branch from 9df35fd to 0388286 Compare October 21, 2026 08:38
@MiquelRForgeFlow

Copy link
Copy Markdown
Author

@chrisandrewmann I think it's solved now :)

@chrisandrewmann chrisandrewmann left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Looks good to me

@pedrobaeza

Copy link
Copy Markdown
Member

Reviewing this, I thought it was due to Internet connection that it was working slow, but I have compared with enterprise, and that's not the reason. There's something that makes the spreadsheet edition very slow. You can just try to select and cell, and then another. There will be a lag of 1-2 seconds in between, which is not normal.

Another thing: you can't add list to spreadsheets. Enterprise has added this way:

image

I'm also curious about what "Link menu in spreadsheet" does.

etobella and others added 21 commits October 23, 2026 11:40
With this change we are adding an extra layer of security. Without it, any user was able to sniff how all happened using something like:

    const any_spreadsheet_id = 1234;
    const channel = "spreadsheet_oca;spreadsheet.spreadsheet;" + any_spreadsheet_id;
    bus_service.addChannel(channel);
    bus_service.addEventListener("spreadsheet_oca", (message) => /* every revision arrives here */

With the change, we verify the access to the model with a similar logic to `web_editor` fields
commands

Steps:
1. Open spreadsheet
2. Press command Ctrl + Z
3. F5 (refresh browse)

An error occurred:
Operation undefined not found

Because missing key `undoneRevisionId` / `redoneRevisionId` in revisions
data

Solutions:
Save all spreadsheet message in commands field
CarlosRoca13 and others added 23 commits October 23, 2026 11:41
…f each one

Before these changes, all existing chart types were displayed in the selector.

With these changes, the table type is taken into account, whether it is inserted from Odoo or from the spreadsheet itself, to determine which chart types are usable and which are not.
Currently translated at 100.0% (160 of 160 strings)

Translation: spreadsheet-18.0/spreadsheet-18.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_oca/it/
This commit fixes the problem reported in this issue: OCA#96

Before these changes, the domain was taking the processed domain value, so it was using the value for the logged-in user. For example, if the uid variable was used, it was replaced with the user's ID and thus passed that way to the spreadsheet domains.

After these changes, the domain sent to the spreadsheet is the unprocessed domain, so the variables are preserved and remain fully usable.
Steps to reproduce the error:
1. Set debug=assets
2. Add a chart to spreadsheet
3. In "Link to Odoo menu" section select a record

An error will be thrown
Currently translated at 100.0% (161 of 161 strings)

Translation: spreadsheet-18.0/spreadsheet-18.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_oca/it/
When a pivot has a sort defined and the data of the pivot is opened an error is thrown because the data is not processed correctly.

By doing this changes, we adapt the code to the new way of process the pivot data and the error does not being thrown anymore.
With this changes we are adding:
1. Include children records when it is possible
2. Add default values for the filter
3. If the model is for users allow set the current user by default
4. Allow to restrict values with a domain
Currently translated at 100.0% (166 of 166 strings)

Translation: spreadsheet-18.0/spreadsheet-18.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_oca/it/
Currently translated at 59.0% (98 of 166 strings)

Translation: spreadsheet-18.0/spreadsheet-18.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_oca/es/
Currently translated at 100.0% (166 of 166 strings)

Translation: spreadsheet-18.0/spreadsheet-18.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_oca/es/
Currently translated at 100.0% (166 of 166 strings)

Translation: spreadsheet-18.0/spreadsheet-18.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_oca/es/
Currently translated at 100.0% (166 of 166 strings)

Translation: spreadsheet-18.0/spreadsheet-18.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_oca/fr/
…lPanel

SpreadsheetControlPanel extends ControlPanel but overrides
its static components property, losing Dropdown and
DropdownItem that the parent template uses.

This causes "Cannot find the definition of component
Dropdown" when opening a spreadsheet from certain
navigation paths (e.g. from a form view).

Fix: spread parent components before adding custom ones.
_compute_filename read self.name inside the loop, so computing the field
on more than one record at once (list views, exports, batch reads)
raised "ValueError: Expected singleton".
@MiquelRForgeFlow
MiquelRForgeFlow force-pushed the 20.0-mig-spreadsheet_oca branch from 0388286 to 9abce77 Compare October 23, 2026 09:41
@MiquelRForgeFlow

MiquelRForgeFlow commented Oct 23, 2026 •

Copy link
Copy Markdown
Author

@pedrobaeza

  • I couldn't reproduce the lag. Please give me more details.
  • "you can't add list to spreadsheets" issue is solved. The issue was that sale_management was substituting the "New" for a drop-down and the button got hidden. Now "Add to spreadsheet" is in the action menu (⚙).
  • "Link menu in spreadsheet" adds the cell with a link to the view. The community spreadsheet already knows how to show and open those links (odoo_menu_link_cell.js). We have "Link to Odoo menu" in the graphic panel, so we could add it too in the action menu.

Comment thread spreadsheet_oca/models/spreadsheet_abstract.py
Collaborative messages, such as the cursor position, are sent on every
selection change. Send them as silent RPCs so they do not trigger the
loading indicator.
Send the collaborative messages with a spreadsheet_oca notification type
instead of the generic "notification" one, so the spreadsheet only
listens to its own messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.