diff options
| author | Pierre Masereel <pim@odoo.com> | 2018-08-20 15:02:32 +0200 |
|---|---|---|
| committer | Pierre Masereel <pim@odoo.com> | 2018-08-21 22:25:26 +0200 |
| commit | 0b2d6d748718c9ae6c1a850ea6eb91fa75ee96d7 (patch) | |
| tree | 13e76e003e1c519144815a9836448910a0d01c70 | |
| parent | 326e48a112f86c16e14be816ce7165a27a23709d (diff) | |
[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
3 files changed, 6 insertions, 6 deletions
diff --git a/addons/stock/static/src/js/stock_traceability_report_widgets.js b/addons/stock/static/src/js/stock_traceability_report_widgets.js index ea08871828f..65e9d4d5b2f 100644 --- a/addons/stock/static/src/js/stock_traceability_report_widgets.js +++ b/addons/stock/static/src/js/stock_traceability_report_widgets.js @@ -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', diff --git a/addons/stock/static/src/xml/stock_traceability_report_line.xml b/addons/stock/static/src/xml/stock_traceability_report_line.xml index 4fafadc5a04..8db2d344084 100644 --- a/addons/stock/static/src/xml/stock_traceability_report_line.xml +++ b/addons/stock/static/src/xml/stock_traceability_report_line.xml @@ -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"> diff --git a/addons/stock/views/report_stock_traceability.xml b/addons/stock/views/report_stock_traceability.xml index ce18fe43e00..a434ef0dadc 100644 --- a/addons/stock/views/report_stock_traceability.xml +++ b/addons/stock/views/report_stock_traceability.xml @@ -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> |
