Compare commits

3 Commits

Author SHA1 Message Date
OdooSky v3
1bdf43226e fix(tk_construction_management): scope .o_action_manager overflow rule to .construction_dashboard
The CSS rule .o_action_manager { overflow: auto !important; } leaks
globally — Odoos outer action container is the same element across
EVERY page in the webclient. On viewports above the xxl breakpoint
(~1500px) this overflow setting collapses flex sizing of children,
shrinking form sheets to ~3mm. erp incident 2026-05-09: New Project
form on Construction app rendered as a 3mm-wide column. Visible only
on wide viewports because narrower ones hit different responsive
breakpoints.

Move the overflow declaration INSIDE the .construction_dashboard
scope so it applies only on the dashboard page (where it was meant to
apply in the first place).
2026-05-09 10:29:57 +02:00
OdooSky v3
07cf26467a fix(tk_construction_management): chatter migration + chart NaN guard + remove debug logs
- 12 oe_chatter <div> blocks migrated to <chatter/> (Odoo 18 modern pattern)
  Removes Missing widget: mail_followers/mail_activity/mail_thread warnings.
- renderGraph guards against empty/all-zero series. ApexCharts was producing
  M NaN NaN SVG paths when total=0 in donut/pie charts. Now shows No data.
- Removed two leftover console.log(..., dasdsa) debug calls in
  static/src/js/construction_dashboard.js.

User-visible: chatter renders cleanly, no SVG NaN console errors, no
debug noise.
2026-05-09 10:16:07 +02:00
OdooSky v3
bd01d44be5 fix(tk_construction_management): add name attribute to <app> element
Odoo 18 SettingsFormCompiler.compileApp reads el.getAttribute("name")
and passes it to toStringExpression(). Without the name attribute the
result is null -> null.replaceAll(...) -> TypeError -> Owl lifecycle
crash, Settings page renders white. Old data-key="..." attribute is
no longer recognized.

Add name="tk_construction_management" alongside data-key for
backward compat.
2026-05-09 02:00:53 +02:00
13 changed files with 24 additions and 67 deletions

View File

@@ -1,7 +1,5 @@
.o_action_manager {
overflow: auto !important;
}
.construction_dashboard {
overflow: auto !important;
background-color: #f8f9fa !important;
height: 100%;
.d-flex {

View File

@@ -45,8 +45,6 @@ export class ConstructionDashboard extends Component {
// args: [false, false],
// });
const result = await this.orm.call("tk.construction.dashboard", "get_construction_state", [false, false]);
console.log(result,'dasdsa');
this.state.stats = result;
this.state.sites = Object.entries(result.con_sites || {}).map(([id, name]) => ({ id, name }));
this.renderCharts(result);
@@ -82,7 +80,6 @@ export class ConstructionDashboard extends Component {
this.state.stats = data;
this.renderCharts(data);
console.log(this.state.stats,'dasdsa');
}
openAction(name, resModel, domain = []) {
@@ -221,6 +218,16 @@ export class ConstructionDashboard extends Component {
renderGraph(el, options) {
if (!el) return;
el.innerHTML = "";
// NaN-guard: ApexCharts emits 'M NaN NaN A NaN' SVG warnings when series is
// empty or all zeros (donut/pie divide by total=0). Show 'No data' instead.
const series = options.series || [];
const hasData = series.some((s) =>
typeof s === 'number' ? s > 0 : (s && s.data && s.data.length > 0)
);
if (!hasData) {
el.innerHTML = '<div class="text-muted text-center p-4">No data</div>';
return;
}
const chart = new ApexCharts(el, options);
chart.render();
}

View File

@@ -334,11 +334,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -306,11 +306,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -164,11 +164,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -186,11 +186,7 @@
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -234,11 +234,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -228,11 +228,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -55,11 +55,7 @@
<field name="reject_reason" invisible="status != 'reject'"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -65,11 +65,7 @@
<field name="reject_reason" invisible="qc_status != 'reject'"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>
@@ -179,11 +175,7 @@
<field name="reject_reason" invisible="qc_status != 'reject'"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>
@@ -293,11 +285,7 @@
<field name="reject_reason" invisible="qc_status != 'reject'"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -103,11 +103,7 @@
<field name="total_amount"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>

View File

@@ -9,7 +9,7 @@
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<app class="app_settings_block" data-string="Construction" string="Construction"
data-key="tk_construction_management">
data-key="tk_construction_management" name="tk_construction_management">
<h2>Sequences</h2>
<setting class="row mt16 o_settings_container">
<div class="col-lg-12 o_setting_box">

View File

@@ -699,11 +699,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
<chatter/>
</form>
</field>
</record>