Skip to content

Commit

Permalink
[FIX] stock: traceability report link
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pimodoo committed Aug 21, 2018
1 parent 326e48a commit 0b2d6d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -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'),
Expand All @@ -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',
Expand Down
Expand Up @@ -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">
Expand Down
6 changes: 2 additions & 4 deletions addons/stock/views/report_stock_traceability.xml
Expand Up @@ -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="">
Expand All @@ -47,8 +47,6 @@
</t>
</td>
</t>
<td>
</td>
</tr>
</t>
</template>
Expand Down

0 comments on commit 0b2d6d7

Please sign in to comment.