[FIX] stock: traceability report link
The links without href attributes, have a different style, so we cannot differentiate them from non clickable text. So we set the href attribute and prevent the default behaviour of the link in js. TASK-ID: 1873101
This commit is contained in:
@@ -24,6 +24,7 @@ var ReportWidget = Widget.extend({
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
boundLink: function(e) {
|
||||
e.preventDefault();
|
||||
return this.do_action({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: $(e.target).data('res-model'),
|
||||
@@ -33,6 +34,7 @@ var ReportWidget = Widget.extend({
|
||||
});
|
||||
},
|
||||
actionOpenLot: function(e) {
|
||||
e.preventDefault();
|
||||
var $el = $(e.target).parents('tr');
|
||||
this.do_action({
|
||||
type: 'ir.actions.client',
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
</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"><t t-raw="c" /></a>
|
||||
<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-raw="c" /></a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-elif="l.lot_name == c and l.lot_name != false">
|
||||
<span>
|
||||
<a class="o_stock_report_lot_action"><t t-raw="c"/></a>
|
||||
<a class="o_stock_report_lot_action" href="#"><t t-raw="c"/></a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="l.reference != c and l.lot_name != c">
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
</t>
|
||||
<t t-if="a['reference'] == c">
|
||||
<span t-if="c" t-att-class="spanclass">
|
||||
<a t-att-data-active-id="a['res_id']" t-att-data-res-model="a['res_model']" class="o_stock_reports_web_action"><t t-raw="c" /></a>
|
||||
<a t-att-data-active-id="a['res_id']" t-att-data-res-model="a['res_model']" class="o_stock_reports_web_action" href="#"><t t-raw="c" /></a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-elif="a['lot_name'] == c">
|
||||
<span>
|
||||
<a class="o_stock_report_lot_action"><t t-raw="c"/></a>
|
||||
<a class="o_stock_report_lot_action" href="#"><t t-raw="c"/></a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
@@ -47,8 +47,6 @@
|
||||
</t>
|
||||
</td>
|
||||
</t>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user