Skip to content

Commit

Permalink
Merge PR #24 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by chienandalu
  • Loading branch information
OCA-git-bot committed Dec 17, 2024
2 parents a41fcaa + c803e24 commit 8d0a473
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const WeightRecordingKanbanColumn = KanbanColumn.extend({
events: _.extend({}, KanbanColumn.prototype.events || {}, {
"click .toggle_kanban_fold": "_onToggleFold",
"click .column_print_labels": "_onPrintLabels",
"click .o_column_open": "_onOpenColumn",
}),
/**
* Show print button only when there are operations to print
Expand All @@ -31,6 +32,24 @@ export const WeightRecordingKanbanColumn = KanbanColumn.extend({
event.preventDefault();
this.trigger_up("column_print_labels");
},
/**
* Opens the related form view.
*
* @private
* @param {OdooEvent} ev
*/
_onOpenColumn(event) {
event.preventDefault();
this.do_action({
context: {create: false},
type: "ir.actions.act_window",
target: "current",
views: [[false, "form"]],
res_model: this.relation,
res_id: this.id,
view_mode: "form",
});
},
});

export const WeightRecordingKanbanController = KanbanController.extend({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
display: none;
}
.o_kanban_header_title {
.o_column_open {
font-size: 1.3rem;
font-weight: bold;
}
.o_column_title {
cursor: initial;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
</button>
</t>
<t t-jquery=".o_column_unfold" t-operation="replace" />
<t t-jquery="span.o_column_title" t-operation="after">
<t t-if="!widget.folded and widget.grouped_by_m2o and widget.id">
<a
role="image"
class="ml-1 fa fa-external-link o_column_open"
href="#"
/>
</t>
</t>
</t>

</templates>

0 comments on commit 8d0a473

Please sign in to comment.