Name:
[ADD] Phase 7.4 Wave-A AI connectors: viin_ai_hr, viin_ai_purchase + viin_ai_stock extension
State:
Killed
finished in 360m
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#73
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
c59731f0211aa0c41e0f3089cb0aae3eaab68ea8
Description:
[FIX] viin_ai_stock: behavior test for abc total==0 (LOW-S3)
Replace tautological static text-check with a true behavior test.
Isolation: create company_b + internal location (company_b) + product
(standard_price=0.0) + quant (qty=10). Run action as user_b who belongs
to company_b only. ir.rule stock_quant_rule filters stock.quant by
company_id -> user_b sees ONLY company_b quants (demo quants invisible).
Result: read_group returns one group (groups not empty) but total = qty *
0.0 = 0.0, exercising the 'if not total:' branch directly.
RED evidence (old code, pct=0.0 if total else 0.0 -> abc='A'):
AssertionError: [{'rank': 1, ..., 'abc_class': 'A'}] is not false
GREEN evidence (fix, if not total: return []):
22 tests, 0 failed, 0 error(s)
Branch:
17.0
Instance ID:
0
Age:
Up-time: