Name: [FIX] viin_brand_mail: restore the test bot identity on update, not only on install

State: Failed finished in 221m

PR State: closed

PR Author: David Tran

PR Author Email:

PR: #672

Committer: David Tran

Committer Email: tuan.tran@viindoo.com

Commit: 022b3bb8c5dc47089fb7a3e6a5a2e814d89fadfe

Description:

                                            [FIX] viin_brand_mail: restore the test bot identity on update, not only on install

data/res_partner_data.xml renames base.partner_root to ViindooBot and is not
noupdate, so the rebranding is re-applied on EVERY module update. The guard that
puts core's OdooBot identity back for test runs lived in post_init_hook, which
odoo/modules/loading.py:244 calls only when the module's state is 'to install'
(:178). The two were asymmetric - branding on every load, restore on the first one
only - so any -u left the partner branded and every core test hardcoding
odoobot@example.com failed. google_calendar alone contributed 12 of them, since the
superuser is the implicit event organiser in its Odoo-to-Google payload comparisons.

The restore now lives on res.partner and is driven from the same data file that
applies the branding, so both are on one trigger; a function tag runs on update as
well as install (odoo/tools/convert.py:279-281 skips it only under noupdate).
post_init_hook is kept as a one-line delegation so the logic has a single home.
                                            

Branch: 17.0

Age:

Up-time: