Skip to content
Snippets Groups Projects
Commit d07066bd authored by Simon Lejeune's avatar Simon Lejeune
Browse files

[FIX] stock: routes report: handle mtso


At the moment, when a rule has a supply method "Take from stock, if
unavailable, trigger another rule", it is displayed as a "take from
stock" rule

In order to differentiate the rule supply method, we should rather show,
thanks to a vertical bar, when a rule is in take from stock, and use
both a vertical bar and the three dots when it is in "take from stock,
if unavailable, trigger another rule"

task-2205748

closes odoo/odoo#47541

X-original-commit: e1c1093c
Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
parent 2ab4119c
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,10 @@
<t t-if="rule[0].procure_method == 'make_to_order'">
<t t-call="stock.report_stock_rule_suspension_points"/>
</t>
<t t-if="rule[0].procure_method == 'mts_else_mto'">
<t t-call="stock.report_stock_rule_suspension_points"/>
<t t-call="stock.report_stock_rule_vertical_bar"/>
</t>
<t t-if="rule[0].action in ('push', 'pull_push')">
<t t-call="stock.report_stock_rule_right_arrow"/>
</t>
......@@ -131,6 +135,14 @@
<t t-call="stock.report_stock_rule_line"/>
</div>
</div>
<div class="o_report_stock_rule_legend_line">
<div class="o_report_stock_rule_legend_label">Trigger Another Rule If No Stock</div>
<div class="o_report_stock_rule_rule o_report_stock_rule_legend_symbol">
<t t-call="stock.report_stock_rule_suspension_points"/>
<t t-call="stock.report_stock_rule_vertical_bar"/>
<t t-call="stock.report_stock_rule_line"/>
</div>
</div>
</div>
</div>
</div>
......@@ -144,6 +156,13 @@
</svg>
</div>
</template>
<template id="report_stock_rule_vertical_bar">
<div class="o_report_stock_rule_vertical_bar">
<svg width="100%" height="100%" viewBox="0 0 1 1">
<line y1="-12" x2="0" y2="12" x1="0" t-attf-style="stroke: #{color};"/>
</svg>
</div>
</template>
<template id="report_stock_rule_right_arrow">
<div class="o_report_stock_rule_arrow">
<svg width="100%" height="100%" viewBox="0 0 10 10">
......
......@@ -66,6 +66,18 @@
}
}
.o_report_stock_rule_vertical_bar {
flex: 0 0 auto;
height: 20px;
width: 2px;
>svg {
>line {
stroke: black;
stroke-width: 2;
}
}
}
.o_report_stock_rule_rule_name {
text-align: center;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment