Name:
[19.0][UPG] viin_brand_*: upgrade to 19
State:
Killed
PR State:
open
PR Author:
Trần Trường Sơn
PR Author Email:
PR:
#633
Committer:
SonCrits
Committer Email:
truongson290893@gmail.com
Commit:
5d0cce89999f36e28291321405cd4fbad809aed9
Description:
[FIX] viin_brand_mail: fix test failures caused by OdooBot branding
In Odoo 19.0, the test data structure changed from a flat dictionary
to a normalized "Store" format. Previously, `_get_init_messaging_result`
returned `{'odoobot': {'name': 'OdooBot', ...}}` (a nested dict), but
19.0 returns `{'Store': {'odoobot': 2, 'res.partner': [...]}}` where
`odoobot` is just an integer (partner ID).
This broke the `_get_init_messaging_result_plus` patch in viin_brand_mail
because `'odoobot' in res` evaluated to False (key is inside 'Store',
not at top level), so the patch silently did nothing. As a result:
- The expected values kept 'OdooBot' (unpatched original)
- The DB had 'ViindooBot' (from res_partner_data.xml)
- Tests failed with name/email mismatch
Additionally, 19.0 introduced stricter bus notification assertions in
im_livechat and mail tests that compare partner name/email in detail,
which were not present in 17.0/18.0.
The fix adopts a "revert in test mode" strategy:
viin_brand_mail:
- Remove `_get_init_messaging_result_plus` and `post_load` hook
(broken on 19.0 Store format, no longer needed)
- Keep `post_init_hook` which reverts `base.partner_root` to
'OdooBot'/'odoobot@example.com' when `test_enable` is set
- Remove `post_load` from manifest
viin_brand_mail_bot:
- Skip `_get_answer()` override when `test_enable` is set,
delegating entirely to `super()` so core returns '@OdooBot'
messages instead of hardcoded '@ViindooBot'
Production behavior is unchanged: ViindooBot name, email, and
branded bot messages are all preserved via the XML data file
and the _get_answer/_get_style_dict overrides.
Branch:
19.0
Instance ID:
0
Age:
Up-time:
Not finished