[FIX] viin_ai_ops: duplicating an orphaned policy no longer widens it to every model
A post-fix review found a fail-open the PREVIOUS fix created. When ondelete
cascade became set null plus a stored mirror, duplicating a policy became
possible for the first time - and copy_data passes model_id: False, so the
create guard `if "model_id" in vals` fired and wiped the mirror. Duplicating an
orphaned auto_execute rule produced one governing EVERY model, contradicting the
help text that promised the mirror prevents exactly that.
The guard is now `if vals.get("model_id")` on create: the picker wins whenever it
names something, and an empty picker never clears an accompanying mirror. write()
stays asymmetric on purpose - emptying the picker there IS the administrator
widening the rule - and both docstrings say so.
Two alternatives were checked against core rather than assumed. copy=False on the
mirror is backwards: copy_data emits every copyable field, so copy=True is
precisely what carries an orphan's scope across the duplicate. Preserving model_id
is impossible for an orphan - the ir.model row is gone.
The matcher's answer is now separate from its reason. Returning None conflated
"no policy matched" with "matching stopped because the model is unknown", and the
workflow bridge reads None as "no orchestration configured" - so a proposal a
HUMAN HAD APPROVED stalled at approved forever. It now returns a status, and the
bridge holds the approval rather than consuming it: filling in impacted_model and
re-running resolves normally, and the stall logs what to do. Falling through to
the unscoped catch-all was rejected - it would assert a governing policy the
proposal never evidenced, and its chain can carry FEWER review steps than the
model-scoped rule that could not be ruled out.
The docstring claiming pending is never more permissive is corrected; it is
monotone in OVERSIGHT, not in outcome, and replacing an unscoped block with a
human decision is the one direction it is more permissive.
match_summary now reflects the rule being built, in both directions - including
the one nobody reported: emptying the picker on a saved rule is the administrator
widening it, and the widget must say so before the save, not after.
And the skipTest is gone. Both readings of the fleet tally were wrong: == 13 is
falsely red on a partial fleet, while skipping protects nothing in the commonest
install mode. It asserts a per-connector count for every installed connector,
with a guard that those still sum to the signed-off 13. Nothing skipped, nothing
falsely red. Proven falsifiable by deleting a template for real - the data file
is noupdate, so the stale row had to go too.
| Subbuilds | Name | State | Detail |
|---|---|---|---|
| Build 398413 | Check the quality with Pylint: from test_lint to test_pylint | Killed | Log |
| Build 398414 | At install tests: from account to website_twitter | Killed | Log |
| Build 398415 | Post install tests: step install all modules | Killed | Log |
| Build 398416 | Post install tests: from account to l10n_vn_viin_hr_payroll_meal_account | Killed | |
| Build 398417 | Post install tests: from l10n_vn_viin_hr_payroll_overtime to resource | Killed | |
| Build 398418 | Post install tests: from sale to to_erponline_utility | Killed | |
| Build 398419 | Post install tests: from to_event_project to to_stock_block_quantity | Killed | |
| Build 398420 | Post install tests: from to_stock_equipment to viin_brain | Killed | |
| Build 398421 | Post install tests: from viin_brain_account to viin_features_activate_website | Killed | |
| Build 398422 | Post install tests: from viin_fleet to viin_mail_tracking | Killed | |
| Build 398423 | Post install tests: from viin_maintenance to viin_stock_backdate | Killed | |
| Build 398424 | Post install tests: from viin_stock_internal_transfer to website_twitter | Killed | |
| Build 398425 | Test install all modules without demo data: from account to website_twitter | Killed | Log |
| Create Date | Level | Message |
|---|---|---|
| 07/27/2026 21:10:25 | INFO |
Updated repository Viindoo-odoo
|
| 07/27/2026 21:10:25 | INFO |
Updated repository Viindoo-tvtmaaddons
|
| 07/27/2026 21:10:25 | INFO |
Updated repository Viindoo-erponline-enterprise
|
| 07/27/2026 21:10:25 | INFO |
Updated repository Viindoo-branding
|
| 07/27/2026 21:10:25 | INFO |
Cloned repository Viindoo-ai
|