Skip to Content

Lesson 4 — When it shows as a box

A rectangle, a box with small digits in it, or a question mark where the sign should be — this is the one support call this module generates, and it almost never means the setting is wrong. It means the glyph did not arrive. The setting lives in the database; the glyph travels in the module's asset bundle, and the two can get out of step for a few predictable reasons.

The mental model: the setting is instant, the assets are cached. Two caches sit between a saved toggle and a rendered sign: the browser's copy of the asset bundle, and the cache QWeb uses when it renders PDF reports. Neither is a fault. Both are refreshed on demand, and knowing which one you are looking at tells you which fix to apply.

On screen: hard-reload first. If the sign shows as a box or a missing-glyph mark — tofu, in typographers' shorthand — the page did not load the module's bundled font, or the browser is serving an old asset bundle. Hard-reload the page and clear the browser cache, then confirm the module's SCSS asset (odoone_uae_dirham/static/src/scss/dirham.scss) is included in the loaded bundle. That sequence resolves the ordinary case.

In PDFs: regenerate the report. QWeb PDF rendering can cache assets of its own, so a report produced just after you changed the setting can still carry the old symbol while every screen is already correct. Regenerate the report — or restart the report worker — after toggling the setting, and confirm the report's asset bundle includes the module's SCSS. A stale PDF is not evidence that the toggle failed.

On uninstall: what comes back, and what does not. Uninstalling restores the symbol and position values that AED held before the module was ever installed — those values, and only those. If someone edited the AED symbol or position by hand between install and uninstall, the module has no way to know about it, and those edits will not survive. Set the values you actually want by hand afterwards, and check them once rather than assuming.

Worked example. At Marina Ridge Trading LLC the sign appears correctly for everyone except one accountant, whose browser held a cached bundle; a hard reload fixes her screen in seconds. The same afternoon a customer statement prints with the old symbol, and regenerating the report clears that too. Months later the company uninstalls the module during a review, and AED returns to the values recorded at first install — including a position somebody had since changed by hand, which the accountant now sets again herself.

The failure mode. "It is right on my screen and a box on my colleague's." That is a per-browser cache, not a per-user setting: the toggle is one database-wide value, so a difference between two screens is a difference in the asset bundle each browser loaded. Hard-reload on the machine that is wrong. If both machines are wrong and a hard reload changes nothing, check that the module's SCSS asset is in the loaded bundle before you look anywhere else.

Commenting is not enabled on this course.