Skip to content

Commit 8d0a473

Browse files
committed
Merge PR #24 into 15.0
Signed-off-by chienandalu
2 parents a41fcaa + c803e24 commit 8d0a473

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

stock_weighing/static/src/base_weight_record_kanban/base_weight_record_kanban.esm.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const WeightRecordingKanbanColumn = KanbanColumn.extend({
1212
events: _.extend({}, KanbanColumn.prototype.events || {}, {
1313
"click .toggle_kanban_fold": "_onToggleFold",
1414
"click .column_print_labels": "_onPrintLabels",
15+
"click .o_column_open": "_onOpenColumn",
1516
}),
1617
/**
1718
* Show print button only when there are operations to print
@@ -31,6 +32,24 @@ export const WeightRecordingKanbanColumn = KanbanColumn.extend({
3132
event.preventDefault();
3233
this.trigger_up("column_print_labels");
3334
},
35+
/**
36+
* Opens the related form view.
37+
*
38+
* @private
39+
* @param {OdooEvent} ev
40+
*/
41+
_onOpenColumn(event) {
42+
event.preventDefault();
43+
this.do_action({
44+
context: {create: false},
45+
type: "ir.actions.act_window",
46+
target: "current",
47+
views: [[false, "form"]],
48+
res_model: this.relation,
49+
res_id: this.id,
50+
view_mode: "form",
51+
});
52+
},
3453
});
3554

3655
export const WeightRecordingKanbanController = KanbanController.extend({

stock_weighing/static/src/base_weight_record_kanban/base_weight_record_kanban.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
display: none;
7070
}
7171
.o_kanban_header_title {
72+
.o_column_open {
73+
font-size: 1.3rem;
74+
font-weight: bold;
75+
}
7276
.o_column_title {
7377
cursor: initial;
7478
}

stock_weighing/static/src/base_weight_record_kanban/base_weight_record_kanban.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
</button>
2828
</t>
2929
<t t-jquery=".o_column_unfold" t-operation="replace" />
30+
<t t-jquery="span.o_column_title" t-operation="after">
31+
<t t-if="!widget.folded and widget.grouped_by_m2o and widget.id">
32+
<a
33+
role="image"
34+
class="ml-1 fa fa-external-link o_column_open"
35+
href="#"
36+
/>
37+
</t>
38+
</t>
3039
</t>
3140

3241
</templates>

0 commit comments

Comments
 (0)