Skip to content

fix: copies done whole and neutralised as Odoo does - #60

Merged
grojof merged 1 commit into
mainfrom
fix/copies-neutralise
Oct 8, 2026
Merged

grojof merged 1 commit into
mainfrom
fix/copies-neutralise

Conversation

@grojof

@grojof grojof commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Second audit, group C: restores, duplications and their neutralisation. The catalogue was checked against the Odoo 14.0–19.0 and OCA l10n-spain sources.

  • One step per copy. Each copy runs seed → identity → Odoo's own neutralize.sql → catalogue → check → hand-over as a single step.
    • A failure drops only the database that step created, so no armed or blocking leftover remains.
    • A staging comment marks an interrupted copy, so the next run replaces it.
  • Access before the hand-over. The role gets CONNECT only at the hand-over. Before, an Odoo with db_name set could connect by name.
  • Restore.
    • Local: runs like a duplication, with no service stop.
    • Remote: atomic. It drops the database and restarts the service on failure.
    • Uses --no-comments, and the service starts after the files.
  • Odoo's own neutralisation (16–19) runs every installed module's neutralize.sql. It is read from the checkout as the instance user and run as the copy's owner.
  • Catalogue gaps closed:
    • SII and TicketBAI on 14–17, the EDI proxy on 14–16, Google Calendar on 15–17, and IAP on 18–19;
    • VERI*FACTU, Odoo's and OCA's;
    • OCA TicketBAI;
    • web push, cloud storage, certificates and SMS;
    • the Malaysian and Greek EDI;
    • cli mail servers, and archived servers that 12–15 still use;
    • citations corrected.

Verified:

  • verify_privilege (CI) checks the staged copy: success, failure partway, an existing target, and a leftover.
  • verify_neutralisation passes with real Odoo 14 and 18. It covers Odoo's own SQL, the EDI demo parameter armed as prod, and the web push key.
  • verify_data_safety, verify_secrets, unit tests, and openspec 1.4.1 all pass.

OpenSpec: 2026-10-08-copies-done-whole.

Assisted-by: Claude

- Each copy (refresh, replica, duplicate database, local restore) is one
  staged step: seed, identity, Odoo's own neutralize.sql, the catalogue,
  the check and the hand-over; a failure drops only the database the
  step created. A staging comment marks it until the hand-over, and a
  leftover of an interrupted run is replaced instead of refused.
- The role gets CONNECT only at the hand-over (an Odoo with db_name set
  connects by name); CREATE on public is taken from PUBLIC.
- A local restore goes as a duplication (no service stop); a remote one
  creates, restores and neutralises in one step that drops the database
  and restarts the service on failure; --no-comments; the service starts
  after the files.
- On 16.0-19.0 every installed module's data/neutralize.sql runs first,
  read from the checkout as the instance user, run as the owner.
- Catalogue, checked against Odoo 14.0-19.0 and OCA l10n-spain: delete
  rules, optional labels, Spanish EDI per version, VERI*FACTU and
  TicketBAI (Odoo and OCA), EDI proxy (14-16 parameter, MY/GR), web push,
  cloud storage, certificates, SMS, calendars per table, IAP long tokens,
  mail host pointed nowhere, a login sink, cli and EDI checks, citations.
@grojof
grojof merged commit c886658 into main Oct 8, 2026
1 check passed
@grojof
grojof deleted the fix/copies-neutralise branch October 8, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant