Name: [FIX] AI cluster Wave-1: pre-existing security remediation (4 CRITICAL + 13 HIGH)

State: Failed finished in 15m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #52

Committer: David Tran

Committer Email: davidtran.hp@gmail.com

Commit: ac15958326d6093957d0007ca492832cb20bd7d7

Description:

                                            [FIX] viin_ai_approval,viin_ai_base: end-of-wave review fixes (H7 effective scoping, error-log savepoint)

Independent end-of-wave review caught two HIGH issues in the wave-1 fixes:

- H7 RESIDUAL: the WI-3 advisory-cron company scope used ('company_id','in',
  self.env.companies.ids), but in the cron context env.companies = ALL companies
  (cron user has no allowed_company_ids) -> the scope was a no-op = cross-tenant
  processing leak, and its test was tautological (it pre-set allowed_company_ids).
  Fixed: pin the advisory cron user_id, and restructure _cron_run_ai_advisory to
  iterate companies explicitly with a literal ('company_id','=',company.id) filter
  under with_company(company) - isolation no longer depends on env.companies. The
  test now runs from the real all-company env and goes RED on the old code
  (scan saw companies [1,2,3,4]) -> GREEN.
- error-log savepoint: _record_error_usage now wraps the separate-cursor create in
  env.cr.savepoint(), matching the canonical api_request_mixin.log_request pattern.

132/132 viin_ai_base + 95/95 viin_ai_ops/approval tests pass on real odoo-bin.
                                            

Branch: 17.0

Instance ID: 0

Age:

Up-time:

Subbuilds Name State Detail
Build 385610 Check the quality with Pylint: from test_lint to test_pylint 14m Failed Log
Build 385611 At install tests: from account to website_twitter Killed Log
Build 385612 Post install tests: step install all modules 69m Succeed Log
Build 385613 Post install tests: from account to payment_asiapay Killed Log
Build 385614 Post install tests: from payment_authorize to test_website_slides_full Killed Log
Build 385615 Post install tests: from test_xlsx_export to to_website_docs_odoo_data Killed Log
Build 385616 Post install tests: from to_website_odoo_version to viin_estimate Killed Log
Build 385617 Post install tests: from viin_estimate_approval to viin_pricelist_validity_advance 24m Succeed Log
Build 385618 Post install tests: from viin_product_multi_barcodes to website_twitter 44m Succeed Log
Build 385619 Test install all modules without demo data: from account to website_twitter 54m Succeed Log
Create Date Level Message
06/14/2026 21:05:31 INFO
Updated repository Viindoo-odoo
06/14/2026 21:05:31 INFO
Updated repository Viindoo-tvtmaaddons
06/14/2026 21:05:31 INFO
Updated repository Viindoo-erponline-enterprise
06/14/2026 21:05:31 INFO
Updated repository Viindoo-branding
06/14/2026 21:05:31 INFO
Cloned repository Viindoo-ai
06/14/2026 21:21:00 ERROR
Subbuild # 385610: odoo.addons.test_pylint.tests.test_flake8: FAIL: TestFlake8.test_flake8 Traceback (most recent call last): File "/data/build/Viindoo-tvtmaaddons-17.0/test_pylint/tests/test_flake8.py", line 91, in test_flake8 self.fail("flake8 test failed:\n" + (b"\n" + out + b"\n" + err).decode('utf-8').strip()) AssertionError: flake8 test failed: /data/build/rb-ac15958-222179/viin_ai_approval/tests/test_advisory_acl.py:259:9: F841 local variable 'req' is assigned to but never used
06/14/2026 21:21:00 ERROR
Subbuild # 385610: odoo.modules.loading: Module test_pylint: 1 failures, 0 errors of 7 tests
06/14/2026 21:21:00 ERROR
Subbuild # 385610: odoo.modules.loading: At least one test failed when loading the modules.
06/14/2026 21:21:00 ERROR
Subbuild # 385610: odoo.tests.result: 1 failed, 0 error(s) of 24 tests when loading database 'rb-ac15958-222179-385610'