Files
goodie/frontend/stock/static/src/widgets/json_widget.xml
Marc 8741282322 Eliminate Python dependency: embed frontend assets in odoo-go
- Copy all OWL frontend assets (JS/CSS/XML/fonts/images) into frontend/
  directory (2925 files, 43MB) — no more runtime reads from Python Odoo
- Replace OdooAddonsPath config with FrontendDir pointing to local frontend/
- Rewire bundle.go, static.go, templates.go, webclient.go to read from
  frontend/ instead of external Python Odoo addons directory
- Auto-detect frontend/ and build/ dirs relative to binary in main.go
- Delete obsolete Python helper scripts (tools/*.py)

The Go server is now fully self-contained: single binary + frontend/ folder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 23:09:12 +02:00

44 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
<div t-name="stock.leadDays">
<h2>Forecasted Date</h2>
<hr/>
<table t-if="jsonValue.lead_days_description" class="table table-borderless table-sm">
<tbody>
<tr class="table-secondary">
<td>Today</td>
<td class="text-end" t-out="jsonValue.today"/>
</tr>
<tr t-foreach="jsonValue.lead_days_description" t-key="descr_index" t-as="descr"
t-attf-class="{{ descr[2] ? 'table-secondary' : '' }}">
<td t-out="descr[0]"/>
<td class="text-end" t-out="descr[1]"/>
</tr>
<tr class="table-info">
<td>Forecasted Date</td>
<td class="text-end text-nowrap">
= <t t-out="jsonValue.lead_horizon_date"/>
</td>
</tr>
</tbody>
</table>
</div>
<div t-name="stock.replenishmentGraph" class="col-11">
<div class="o_replenishment_graph">
<canvas t-ref="canvas"/>
</div>
<div class="d-flex pt-3">
<h6 class="row text-muted">
<span>Daily Demand: <span t-out="dailyDemand"/> <span t-out="productUomName"/>/day</span>
<span class="pt-2">Average Stock: <span t-out="averageStock"/> <span t-out="productUomName"/></span>
</h6>
<h6 class="row text-muted">
<span t-if="!qtiesAreTheSame">Ordering Frequency: <span t-out="orderingPeriod"/> day(s)</span>
<span t-if="qtiesAreTheSame">Ordering Frequency: On demand</span>
<span class="pt-2">Lead Time: <span t-out="leadTime"/> day(s)</span>
</h6>
</div>
</div>
</templates>