Skip to content

[MIG] spreadsheet_*: Migration from 19.0 to saas-19.2#114

Closed
susaglam wants to merge 283 commits intoOCA:19.0from
susaglam:saas-19.2
Closed

[MIG] spreadsheet_*: Migration from 19.0 to saas-19.2#114
susaglam wants to merge 283 commits intoOCA:19.0from
susaglam:saas-19.2

Conversation

@susaglam
Copy link
Copy Markdown

Summary

Migrate all four OCA spreadsheet modules from 19.0 to saas-19.2.
This PR contains all 19.0 changes plus saas-19.2 specific fixes.

Modules migrated

  • spreadsheet_oca (19.0.1.0.0 → saas~19.2.1.0.0)
  • spreadsheet_dashboard_oca (19.0.1.0.0 → saas~19.2.1.0.0)
  • spreadsheet_dashboard_purchase_oca (19.0.1.0.0 → saas~19.2.1.0.0)
  • spreadsheet_dashboard_purchase_stock_oca (19.0.1.0.0 → saas~19.2.1.0.0)

Changes inherited from 19.0 migration

All changes from the 19.0 migration are included:

  • Remove "version": 1 from empty spreadsheet data
  • Remove loadSpreadsheetDependencies() (Chart.js auto-included in bundle)
  • Fix JS import path @spreadsheet/assets_backend/helpers
    @spreadsheet/helpers/helpers
  • Migrate _sql_constraintsmodels.Constraint()
  • Remove category_id and users fields from res.groups records
  • Implement Odoo 19 privilege system for user settings visibility
  • Rename groups_idgroup_ids on ir.ui.menu
  • Rename user.groups_iduser.group_ids in domain rules
  • Safe registry additions (try/catch) for all o-spreadsheet registries
  • Remove duplicate topbarMenuRegistry entries

Additional saas-19.2 specific changes

Python

  • Rename _empty_spreadsheet_data_base64()
    _empty_spreadsheet_data_bin() in spreadsheet_abstract.py to match
    upstream saas-19.2 spreadsheet.mixin API change. Method now returns
    raw JSON bytes instead of base64-encoded bytes — caller handles the
    base64 encoding.
  • Fix content_disposition import: from odoo.http import content_dispositionfrom odoo.http.stream import content_disposition (in saas-19.2, odoo.http became a package)

JavaScript / OWL Templates

  • Fix ListView button xpath: in saas-19.2 the "New" button moved from
    an inline control-panel-create-button slot to a separate
    web.ListView.Buttons template. Updated template inheritance to
    target web.ListView.Buttons instead of web.ListView.

Version format

  • All module versions updated to saas~19.2.1.0.0 format

Key differences between 19.0 and saas-19.2

Change 19.0 saas-19.2
_empty_spreadsheet_data_base64 Still exists Renamed to _empty_spreadsheet_data_bin
content_disposition import from odoo.http from odoo.http.stream
ListView template structure control-panel-create-button slot web.ListView.Buttons template
Version format 19.0.X.Y.Z saas~19.2.X.Y.Z

Testing performed

All items below were manually tested on Odoo saas-19.2:

  • Install spreadsheet_oca without import errors
  • Create a new spreadsheet (tests _empty_spreadsheet_data_bin)
  • Open and edit an existing spreadsheet
  • Import pivot from pivot view
  • Import list from list view (button positioned correctly next to "New")
  • Import graph from graph view
  • Global filters panel works
  • Download spreadsheet as XLSX (tests content_disposition)
  • User access control visible in Settings → Users
  • No JS registry "already present" errors in browser console

etobella and others added 30 commits September 24, 2025 14:08
Currently translated at 83.1% (69 of 83 strings)

Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/nl/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/
Currently translated at 100.0% (83 of 83 strings)

Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/
Currently translated at 100.0% (83 of 83 strings)

Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/it/
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
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: spreadsheet-16.0/spreadsheet-16.0-spreadsheet_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-16-0/spreadsheet-16-0-spreadsheet_oca/
OCA-git-bot and others added 22 commits March 26, 2026 16:21
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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 100.0% (30 of 30 strings)

Translation: spreadsheet-18.0/spreadsheet-18.0-spreadsheet_dashboard_oca
Translate-URL: https://translation.odoo-community.org/projects/spreadsheet-18-0/spreadsheet-18-0-spreadsheet_dashboard_oca/es/
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 80.1% (133 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 86.7% (144 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/
Brings all OCA spreadsheet modules from 18.0 as the base for 19.0 migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update version numbers from 18.0 to 19.0 in all four modules
- Fix JS import path: @spreadsheet/assets_backend/helpers →
  @spreadsheet/helpers/helpers (path moved in Odoo 19)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove loadSpreadsheetDependencies import and call (Chart.js is now
  auto-included in spreadsheet.o_spreadsheet bundle via manifest)
- Remove "version": 1 from empty spreadsheet data to match upstream
  Odoo 19.0 spreadsheet.mixin behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update version numbers to saas~19.2.1.0.0 format
- Rename _empty_spreadsheet_data_base64() to _empty_spreadsheet_data_bin()
  to match upstream saas-19.2 spreadsheet.mixin API change: method now
  returns raw JSON bytes instead of base64-encoded bytes, caller handles
  the base64 encoding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove category_id field from res.groups records (field removed in
  Odoo 19, replaced by privilege_id on res.groups.privilege)
- Update domain rules: user.groups_id → user.group_ids (field renamed
  in Odoo 19)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ir.ui.menu: groups_id → group_ids (field renamed in Odoo 19)
- _sql_constraints list → models.Constraint() (new format in Odoo 19)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 'users' field was removed from res.groups in Odoo 19. Admin users
get the group through implied_ids chain instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In Odoo 19, o-spreadsheet core already registers "file" and "settings"
in topbarMenuRegistry. Calling .add() with an existing key throws
"file is already present in this registry!". Remove the duplicate
registrations, keep only OCA-specific children (filters, save, download).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In Odoo 19, the "New" button's parent changed from a DOM element to
a <t t-set-slot="control-panel-create-button"> OWL slot. The old xpath
targeting the parent caused the button to render outside the control
panel. Updated xpath to target the button directly within the slot.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In Odoo 19, core spreadsheet registers chart subtypes and side panels
that OCA also registers. Registry.add() throws on duplicate keys.
Use try/catch with fallback to replace() for all registry additions
to safely handle both fresh installs and coexistence with core.

Affected registries: chartSubtypeRegistry, chartSidePanelComponentRegistry,
sidePanelRegistry, pivotSidePanelRegistry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In saas-19.2, odoo.http became a package and content_disposition moved
to odoo.http.stream module.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In saas-19.2, the ListView template structure changed: the "New" button
moved from an inline control-panel-create-button slot to a separate
web.ListView.Buttons template. Update xpath to inherit the correct
template.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Since category_id was removed from res.groups in Odoo 19, the
spreadsheet groups were not visible in Settings and not automatically
assigned to any user. Fix by adding implied_ids to base.group_user
so all internal users get spreadsheet access by default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the previous implied_ids workaround with the proper Odoo 19
privilege system:
- Create res.groups.privilege record linked to ir.module.category
- Link both User and Manager groups via privilege_id

This makes the groups visible in Settings → Users with selectable
options: No Access / User / Manager. Admins can control spreadsheet
access per user.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@OCA-git-bot OCA-git-bot added mod:spreadsheet_dashboard_oca Module spreadsheet_dashboard_oca mod:spreadsheet_dashboard_purchase_stock_oca Module spreadsheet_dashboard_purchase_stock_oca mod:spreadsheet_oca Module spreadsheet_oca mod:spreadsheet_dashboard_purchase_oca Module spreadsheet_dashboard_purchase_oca series:19.0 labels Apr 16, 2026
@susaglam susaglam marked this pull request as draft April 16, 2026 12:50
@legalsylvain legalsylvain mentioned this pull request Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:spreadsheet_dashboard_oca Module spreadsheet_dashboard_oca mod:spreadsheet_dashboard_purchase_oca Module spreadsheet_dashboard_purchase_oca mod:spreadsheet_dashboard_purchase_stock_oca Module spreadsheet_dashboard_purchase_stock_oca mod:spreadsheet_oca Module spreadsheet_oca series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.