Name: [ADD] P-OPS-4 Ops Cockpit + AI Operations Manager governance (opens M3)

State: Killed finished in 205m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #50

Committer: David Tran

Committer Email: davidtran.hp@gmail.com

Commit: 8fd3a823f261b52239f9826de6a577f56867a64f

Description:

                                            [FIX] viin_ai_base: add base.user_admin to demo company B (multi-company invariant)

The viin_ai_base DEMO creates a second res.company ('AI Ops Demo Co B') for the
cross-tenant isolation demo, but a static demo <record> does NOT add the acting
user to the new company the way a real res.company.create does - so it stranded
base.user_admin (Mitchell Admin) outside that company. On the shared Runbot
post-install DB this broke an UNRELATED Viindoo-Standard test with zero static
code coupling:

  viin_helpdesk auto-creates one 'General' team per company; 'AI Ops Demo Co B'
  sorts before 'YourCompany' (res.company _order='sequence,name', both seq=0) so
  its team is created first and gets the lowest id; viin_helpdesk_project's
  TestAccessTicket.test_user_who_following_task_or_project_read_ticket does
  team.search([], limit=1) AS base.user_admin and the GLOBAL
  helpdesk_team_company_rule (no groups -> applies to admin) denies read of a
  team in a company admin is not a member of -> AccessError at
  helpdesk_ticket.py:336 (team.stage_ids).

Fix: add base.user_admin to company_ai_ops_demo_b.company_ids, restoring the
invariant that the admin/superuser setup account is a member of every company
present in the install. The ops-manager demo user stays main-company-only, so
the cross-tenant isolation demo is unaffected.

Proven by confirm-by-toggle on a live DB (adding admin -> the helpdesk test runs
green; removing the demo company -> green) and by an A/B install (helpdesk_project
alone passes; helpdesk_project + viin_ai_base fails). Guarded by a new red-before-
green regression test TestDemoCompanyMembership (RED without the fix: '1 failed').
Verified: helpdesk test 0 failed/0 error of 1; full viin_ai_base suite 0 failed/0
error of 122 tests (166 total).
                                            

Branch: 17.0

Instance ID: 0

Age:

Up-time: