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

State: Failed finished in 95m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #50

Committer: David Tran

Committer Email: davidtran.hp@gmail.com

Commit: 4e9c1d241c1b6d2b654c326fd926c20d671a212a

Description:

                                            [FIX] viin_ai_approval,viin_ai_ops: suppress force-sent approver mail in routing tests

Runbot marks a build FAILED when the captured test log contains any ERROR
record (odoo lower_logging -> result.had_error_log), even with 0 assertion
failures. Three new test classes drive the real approval-routing path
(action_route -> _submit_to_approval -> request.action_confirm), which
message_post()s an approver notification that is force-sent synchronously.
The tests create fresh res.company / users with no email and run without a
mail.catchall.domain ICP, so the send has no sender address and mail_mail
logs 'failed sending mail ... mail.catchall.domain' at ERROR (20 records),
tripping the Runbot gate although every assertion passes.

These tests assert routing / state / counts / multi-company isolation, NOT
email delivery, so set mail_notify_force_send=False on the class env in
setUpClass: the notification mail stays queued (never synchronously sent in
the test transaction) so no spurious error is logged. Inherited by every
sub-env (all build from self.env.context), so it reaches the message_post
inside action_route().

Affected: TestCockpitPendingApprovalsProvider, TestMultiCompanyApprovalRouting
(viin_ai_approval), TestOpsCockpitAggregation (viin_ai_ops).

Verified locally (fresh DB, no catchall): 20 -> 0 'failed sending mail'
ERROR records, 0 ERROR-level logs, full viin_ai_approval+viin_ai_ops suite
0 failed / 0 error of 85 tests.
                                            

Branch: 17.0

Instance ID: 0

Age:

Up-time: