gsinghpal 5cc1117f75 feat(plating-migration): dry-run + Owner-approval workflow
Phase H of permissions overhaul (LAST subagent phase).

New models:
- fp.migration.preview (state: pending/approved/cancelled/rolled_back)
- fp.migration.preview.line (one per active internal user)

On -u, post_init_hook creates a preview in 'pending' state, walks all
active non-share users through the 12-rule mapping predicate chain
(first match wins, highest precedence first), and schedules a
mail.activity on every Owner.

Mapping table (per spec Section 5):
  uid 1/2 / Administrator   -> owner
  CGP DO (existing)          -> owner + res.company DO field set
  CGP Officer                -> quality_manager
  Manager / Shop Mgr (old)   -> manager
  Accounting                 -> manager
  Estimator-without-Manager  -> sales_rep (flagged: loses confirm)
  Supervisor / Receiving     -> shop_manager
  Operator                   -> technician
  catchall                   -> 'no'

Owner clicks 'Approve & Run' on the preview form -> sudo write removes
old plating groups, adds new role's group, posts Markup chatter audit.
Optionally sets res.company.x_fc_cgp_designated_official_id for the DO.

30-day rollback window via JSON snapshot of groups_id per line. Daily
cron (Fusion Plating: Purge Expired Role Migrations) clears snapshots
+ unlinks old [DEPRECATED] groups after 30 days.

ACL: fp.migration.preview + .line both Owner-only (CRUD).
Menu: Plating > Configuration > Role Migrations (Owner-only).

Tests cover: only-Owner-can-approve, approve advances state, cancel
blocks after approval, rollback restores groups_id, Estimator warning
flagged, uid 2 maps to owner, rollback blocked after 30 days.

Per CLAUDE.md: ir.cron uses only Odoo-19-valid fields (no numbercall,
no doall). Post-init hook is idempotent — won't double-create previews
or re-fire if all users already migrated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 02:21:43 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-16 13:18:52 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-21 03:37:25 -04:00
2026-04-24 21:04:38 -04:00
2026-05-23 07:53:41 -04:00
2026-04-24 21:04:38 -04:00
2026-04-29 03:35:33 -04:00
2026-04-24 21:04:38 -04:00
2026-05-22 18:01:31 -04:00
2026-05-10 10:25:12 -04:00
2026-05-04 02:17:47 -04:00
2026-04-24 21:04:38 -04:00
2026-04-28 19:39:37 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-21 03:37:25 -04:00
2026-04-24 21:04:38 -04:00
2026-04-29 03:35:33 -04:00
2026-04-30 18:08:36 -04:00
2026-05-11 03:20:31 -04:00
2026-04-24 21:04:38 -04:00
2026-05-21 03:37:25 -04:00
2026-04-24 21:04:38 -04:00
2026-05-21 03:37:25 -04:00
2026-04-24 21:04:38 -04:00
2026-05-12 09:08:34 -04:00
2026-04-24 21:04:38 -04:00
2026-05-13 08:17:35 -04:00
2026-05-23 07:53:41 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-04-24 21:04:38 -04:00
2026-05-16 13:07:50 -04:00
2026-04-24 21:04:38 -04:00
2026-05-20 21:01:58 -04:00
2026-02-22 01:22:18 -05:00
2026-05-10 10:25:12 -04:00
2026-04-12 09:11:35 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-05-21 03:37:25 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-12 09:11:35 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
2026-04-03 15:45:18 -04:00
Description
Odoo 19 custom modules
216 MiB
Languages
Python 56.6%
HTML 25.3%
JavaScript 14.8%
SCSS 2%
CSS 0.8%
Other 0.4%