Name: [FIX] web_responsive: reach the apps menu the user actually opens

State: Killed finished in 133m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #671

Committer: David Tran

Committer Email: david.tran@tvtmarine.com

Commit: 242d9918ab087d5c479a463a2f5b4e5002eecc42

Description:

                                            [FIX] web_responsive: reach the apps menu the user actually opens

e2e5205 split the apps-menu screen into two sibling classes -
AppsMenuAction (still registered under the "menu" actions tag, the
class third-party modules patch by name) and AppsMenuOverlay (what
appsMenuService.toggleMenu() actually mounts for the user, via the
overlay service). Because the overlay was a SIBLING of AppsMenuAction
rather than a descendant, a module that does
patch(AppsMenuAction.prototype, {...}) and separately extends the
shared "web_responsive.AppsMenuAction" template by name - the real,
shipped shape in erponline-enterprise/viin_customizer_web_responsive -
never reached the class that renders for the user. Runbot build
224030 failed 71 of 83 tests with "TypeError: ctx.getAppCreatorItem is
not a function at AppsMenuOverlay.slot2": every tour that opens the
apps menu died.

Make AppsMenuOverlay extend AppsMenuAction instead of the shared
AppsMenuScreen base, so a prototype patch() applied to AppsMenuAction
- by this module or any third party, in either load order - is
inherited by the overlay too. Corrected what plain inheritance would
otherwise get wrong on the new subclass: static props (an overlay's
shape, not the action-service props it would otherwise inherit),
coversNothing (the overlay has no env.config to read breadcrumbs
from, so it falls back to the base class's own resolution), and left
static target/displayName inherited-but-inert with a comment so a
future reader does not "clean them up" and reopen this. Documented at
the class declarations that AppsMenuAction is both the "menu" action-
tag registrant and the patch target other modules reach for by name,
so the next module that legally patches this class does not silently
break again.

This repairs a regression we shipped, already merged into 18.0
(origin/18.0 @ 2cfee94 contains e2e5205). The suite was NOT executed
here: this fix was produced under a static-verification-only
constraint (no instance, no odoo-bin, no database, no test run). RED
was argued from source - traced against e2e5205's diff and the real
external patcher/template-inheritor - and the fix confirmed by static
reasoning over the JS prototype chain (AppsMenuOverlay.prototype's
[[Prototype]] is a live reference to AppsMenuAction.prototype, so a
patch() mutation to the latter is visible to overlay instances).
Syntax-checked with node --input-type=module --check; no reachable
project ESLint config to run further here - that gate runs later at
the run's own pre-PR tail.
                                            

Branch: 18.0

Age:

Up-time: