summaryrefslogtreecommitdiff
path: root/addons/stock/static/src/xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/stock/static/src/xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/stock/static/src/xml')
-rw-r--r--addons/stock/static/src/xml/forecast_widget.xml12
-rw-r--r--addons/stock/static/src/xml/inventory_lines.xml8
-rw-r--r--addons/stock/static/src/xml/inventory_report.xml8
-rw-r--r--addons/stock/static/src/xml/popover_widget.xml19
-rw-r--r--addons/stock/static/src/xml/report_stock_forecasted.xml27
-rw-r--r--addons/stock/static/src/xml/stock_orderpoint.xml50
-rw-r--r--addons/stock/static/src/xml/stock_traceability_report_backend.xml23
-rw-r--r--addons/stock/static/src/xml/stock_traceability_report_line.xml57
8 files changed, 204 insertions, 0 deletions
diff --git a/addons/stock/static/src/xml/forecast_widget.xml b/addons/stock/static/src/xml/forecast_widget.xml
new file mode 100644
index 00000000..463e14d6
--- /dev/null
+++ b/addons/stock/static/src/xml/forecast_widget.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<templates id="template" xml:space="preserve">
+ <t t-name="stock.forecastWidget">
+ <span t-if="['draft', 'partially_available', 'assigned', 'cancel', 'done'].includes(state)" t-esc="reserved_availability_str"/>
+ <span t-elif="!forecast_expected_date_str and will_be_fulfilled" class="text-success">Available</span>
+ <span t-elif="forecast_expected_date_str and will_be_fulfilled" t-att-class="forecast_is_late ? 'text-danger' : 'text-warning'">Exp <t t-esc="forecast_expected_date_str"/></span>
+ <span t-else="" class="text-danger">Not Available</span>
+ <button t-if="product_type == 'product'" t-att="id ? {} : {'disabled': ''}" class="o_forecast_report_button btn btn-link o_icon_button ml-2" title="Forecasted Report">
+ <i t-attf-class="fa fa-fw fa-area-chart {{ state != 'draft' and (!will_be_fulfilled or forecast_is_late) ? 'text-danger' : '' }}"/>
+ </button>
+ </t>
+</templates>
diff --git a/addons/stock/static/src/xml/inventory_lines.xml b/addons/stock/static/src/xml/inventory_lines.xml
new file mode 100644
index 00000000..37fa0f5b
--- /dev/null
+++ b/addons/stock/static/src/xml/inventory_lines.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<templates id="template" xml:space="preserve">
+ <t t-name="InventoryLines.Buttons">
+ <button type="button" class='btn btn-primary o_button_validate_inventory'>
+ Validate Inventory
+ </button>
+ </t>
+</templates>
diff --git a/addons/stock/static/src/xml/inventory_report.xml b/addons/stock/static/src/xml/inventory_report.xml
new file mode 100644
index 00000000..f33d7297
--- /dev/null
+++ b/addons/stock/static/src/xml/inventory_report.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<templates id="template" xml:space="preserve">
+
+<button t-name="InventoryReport.Buttons" class="btn btn-primary" type="button">
+ Inventory at Date
+</button>
+
+</templates>
diff --git a/addons/stock/static/src/xml/popover_widget.xml b/addons/stock/static/src/xml/popover_widget.xml
new file mode 100644
index 00000000..d5c50356
--- /dev/null
+++ b/addons/stock/static/src/xml/popover_widget.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="stock.popoverButton">
+ <a tabindex="0" t-attf-class="p-1 fa #{ icon || 'fa-info-circle'} #{ color || 'text-primary'}"/>
+ </t>
+
+ <div t-name="stock.popoverContent">
+ <t t-esc="msg"/>
+ </div>
+
+ <div t-name="stock.PopoverStockRescheduling">
+ <p>Preceding operations
+ <t t-foreach="late_elements" t-as="late_element">
+ <a t-esc="late_element.name" href="#" t-att-element-id="late_element.id" t-att-element-model="late_element.model"/>,
+ </t>
+ planned on <t t-esc="delay_alert_date"/>.</p>
+ </div>
+</templates>
diff --git a/addons/stock/static/src/xml/report_stock_forecasted.xml b/addons/stock/static/src/xml/report_stock_forecasted.xml
new file mode 100644
index 00000000..7b6240b3
--- /dev/null
+++ b/addons/stock/static/src/xml/report_stock_forecasted.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<templates id="template" xml:space="preserve">
+
+<button t-name="replenish_report_buttons"
+ class="btn btn-primary o_report_replenish_buy"
+ type="button" title="Replenish">
+ Replenish
+</button>
+
+<t t-name="warehouseFilter">
+ <div id="warehouse_filter" class="btn-group o_dropdown o_stock_report_warehouse_filter"
+ t-if="displayWarehouseFilter">
+ <button type="button" class="o_dropdown_toggler_btn btn btn-secondary dropdown-toggle"
+ data-toggle="dropdown">
+ <span class="fa fa-home"/> Warehouse: <t t-esc="active_warehouse['name']"/>
+ </button>
+ <div class="dropdown-menu o_dropdown_menu o_filter_menu" role="menu">
+ <t t-foreach="warehouses" t-as="wh">
+ <a role="menuitem" class="dropdown-item warehouse_filter"
+ data-filter="warehouses" t-att-data-warehouse-id="wh['id']"
+ t-esc="wh['name']"/>
+ </t>
+ </div>
+ </div>
+</t>
+
+</templates>
diff --git a/addons/stock/static/src/xml/stock_orderpoint.xml b/addons/stock/static/src/xml/stock_orderpoint.xml
new file mode 100644
index 00000000..a9155181
--- /dev/null
+++ b/addons/stock/static/src/xml/stock_orderpoint.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<templates id="template" xml:space="preserve">
+ <div t-name="stock.leadDaysPopOver">
+ <p>
+ The forecasted stock on the <t t-esc="lead_days_date"/>
+ is <t t-if="qty_to_order &lt;= 0"><t t-esc="qty_forecast"/> <t t-esc="product_uom_name"/></t><t t-else="">
+ below the minimum inventory of <t t-esc="product_min_qty"/> <t t-esc="product_uom_name"/>
+ : <t t-esc="qty_to_order"/> <t t-esc="product_uom_name"/> should be replenished to reach the maximum of
+ <t t-esc="product_max_qty"/> <t t-esc="product_uom_name"/>.</t>
+ </p>
+ <table t-if="lead_days_description" class="table table-borderless">
+ <tbody>
+ <tr>
+ <td>
+ Today
+ </td>
+ <td class="text-right">
+ <t t-esc="today"/>
+ </td>
+ </tr>
+ <t t-raw="lead_days_description"/>
+ <tr class="table-info">
+ <td>
+ Forecasted Date
+ </td>
+ <td class="text-right text-nowrap">
+ = <t t-esc="lead_days_date"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <button class="text-left btn btn-link action_open_forecast"
+ type="button">
+ <i class="fa fa-fw o_button_icon fa-arrow-right"></i>
+ View Forecast
+ </button>
+ </div>
+
+ <t t-name="StockOrderpoint.Buttons">
+ <span>
+ <button type="button" class="btn d-none btn-primary o_button_order">
+ Order
+ </button>
+ <button type="button" class="btn d-none btn-primary o_button_snooze">
+ Snooze
+ </button>
+ </span>
+ </t>
+
+</templates>
diff --git a/addons/stock/static/src/xml/stock_traceability_report_backend.xml b/addons/stock/static/src/xml/stock_traceability_report_backend.xml
new file mode 100644
index 00000000..e2aa016b
--- /dev/null
+++ b/addons/stock/static/src/xml/stock_traceability_report_backend.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<templates>
+
+ <t t-name="stockReports.buttons">
+ <button type="button" class='btn btn-primary o_stock-widget-pdf'>PRINT</button>
+ </t>
+
+ <div role="dialog" t-name='stockReports.errorModal' class="modal" id="editable_error" tabindex="-1" data-backdrop="static" style="z-index:9999;">
+ <div class="modal-dialog modal-sm">
+ <div class="modal-content">
+ <header class="modal-header">
+ <h3 class="modal-title">Error</h3>
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
+ </header>
+ <main class="modal-body">
+ <p id='insert_error' class='text-center'></p>
+ </main>
+ </div>
+ </div>
+ </div>
+
+</templates>
diff --git a/addons/stock/static/src/xml/stock_traceability_report_line.xml b/addons/stock/static/src/xml/stock_traceability_report_line.xml
new file mode 100644
index 00000000..11504054
--- /dev/null
+++ b/addons/stock/static/src/xml/stock_traceability_report_line.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<templates>
+
+ <t t-name="foldable">
+ <span t-att-class="'o_stock_reports_foldable ' + lineId + ' o_stock_reports_caret_icon'"><i class="fa fa-fw fa-caret-down" role="img" aria-label="Fold" title="Fold"></i></span>
+ </t>
+
+ <t t-name="unfoldable">
+ <span t-att-class="'o_stock_reports_unfoldable ' + lineId + ' o_stock_reports_caret_icon'"><i class="fa fa-fw fa-caret-right" role="img" aria-label="Unfold" title="Unfold"></i></span>
+ </t>
+
+ <t t-name="report_mrp_line">
+ <t t-set="trclass" t-value="'o_stock_reports_default_style'"/>
+ <t t-if="l.model == 'stock.move.line'"><t t-set="trclass" t-value="'o_stock_reports_level0'"/></t>
+ <t t-set="space_td" t-value="'margin-left: '+ l.level + 'px;'"/>
+ <t t-set="domainClass" t-value="'o_stock_reports_domain_line_0'"/>
+ <t t-if="l.unfoldable == false">
+ <t t-set="spanclass" t-value="'o_stock_reports_nofoldable'" />
+ <t t-set="domainClass" t-value="'o_stock_reports_domain_line_1'"/>
+ </t>
+
+ <tr t-att-data-unfold="l.unfoldable" t-att-data-parent_id="l.parent_id" t-att-data-id="l.id" t-att-data-model_id="l.model_id" t-att-data-model="l.model" t-att-class="trclass" t-att-data-lot_name="l.lot_name" t-att-data-lot_id="l.lot_id">
+ <t t-if="l.unfoldable == true"><t t-set="tdclass" t-value="'o_stock_reports_unfoldable'" /></t>
+ <t t-set="column" t-value="0" />
+ <t t-foreach="l.columns" t-as="c">
+ <t t-set="column" t-value="column + 1" />
+ <td style="white-space: nowrap;" t-att-data-id="l.id" t-att-data-model="l.model" t-att-data-model_id="l.model_id" t-att-class="tdclass" t-att-data-level="l.level" t-att-data-lot_name="l.lot_name">
+ <t t-if="column == 1">
+ <span t-att-style="space_td" t-att-class="domainClass"></span>
+ <t t-if="l.unfoldable">
+ <span class="o_stock_reports_unfoldable o_stock_reports_caret_icon"><i class="fa fa-fw fa-caret-right" role="img" aria-label="Unfold" title="Unfold"></i></span>
+ </t>
+ </t>
+ <t t-if="l.reference == c">
+ <span t-if="c" t-att-class="spanclass">
+ <a t-att-data-active-id="l.res_id" t-att-data-res-model="l.res_model" class="o_stock_reports_web_action" href="#"><t t-esc="c"/></a>
+ </span>
+ </t><t t-elif="l.lot_name == c and l.lot_name != false">
+ <span>
+ <a class="o_stock_report_lot_action" href="#"><t t-esc="c"/></a>
+ </span>
+ </t>
+ <t t-if="l.reference != c and l.lot_name != c">
+ <t t-if="typeof c == 'string' || typeof c == 'number'">
+ <t t-esc="c"/>
+ </t>
+ <t t-if="typeof c != 'string' &amp; typeof c != 'number'"><span t-att-style="c[1]">
+ <t t-esc="c[0]"/>
+ </span></t>
+ </t>
+ </td>
+ </t>
+ </tr>
+ </t>
+
+</templates>