[MIG] spreadsheet_*: Migration from 19.0 to saas-19.2#114
Closed
[MIG] spreadsheet_*: Migration from 19.0 to saas-19.2#114
Conversation
…mprove change of kind
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/
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>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
"version": 1from empty spreadsheet dataloadSpreadsheetDependencies()(Chart.js auto-included in bundle)@spreadsheet/assets_backend/helpers→@spreadsheet/helpers/helpers_sql_constraints→models.Constraint()category_idandusersfields fromres.groupsrecordsgroups_id→group_idsonir.ui.menuuser.groups_id→user.group_idsin domain rulestopbarMenuRegistryentriesAdditional saas-19.2 specific changes
Python
_empty_spreadsheet_data_base64()→_empty_spreadsheet_data_bin()inspreadsheet_abstract.pyto matchupstream saas-19.2
spreadsheet.mixinAPI change. Method now returnsraw JSON bytes instead of base64-encoded bytes — caller handles the
base64 encoding.
content_dispositionimport:from odoo.http import content_disposition→from odoo.http.stream import content_disposition(in saas-19.2,odoo.httpbecame a package)JavaScript / OWL Templates
an inline
control-panel-create-buttonslot to a separateweb.ListView.Buttonstemplate. Updated template inheritance totarget
web.ListView.Buttonsinstead ofweb.ListView.Version format
saas~19.2.1.0.0formatKey differences between 19.0 and saas-19.2
_empty_spreadsheet_data_base64_empty_spreadsheet_data_bincontent_dispositionimportfrom odoo.httpfrom odoo.http.streamcontrol-panel-create-buttonslotweb.ListView.Buttonstemplate19.0.X.Y.Zsaas~19.2.X.Y.ZTesting performed
All items below were manually tested on Odoo saas-19.2:
spreadsheet_ocawithout import errors_empty_spreadsheet_data_bin)content_disposition)