Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions web_timeline/static/src/views/timeline/timeline_controller.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,19 +246,28 @@ export class TimelineController extends Component {
context[`default_${this.model.last_group_bys[0]}`] = item.group;
}
// Show popup
this.dialogService.add(
FormViewDialog,
{
resId: false,
context: makeContext([context], this.env.searchModel.context),
onRecordSaved: async (record) => {
const new_record = await this.model.create_completed(record.resId);
callback(new_record);
if (this.open_popup_action) {
this.dialogService.add(
FormViewDialog,
{
resId: false,
context: makeContext([context], this.env.searchModel.context),
onRecordSaved: async (record) => {
const new_record = await this.model.create_completed(
record.resId
);
callback(new_record);
},
resModel: this.model.model_name,
},
resModel: this.model.model_name,
},
{onClose: () => callback()}
);
{onClose: () => callback()}
);
} else {
this.env.services.action.switchView("form", {
resId: false,
mode: "edit",
});
}
}
}
TimelineController.template = "web_timeline.TimelineView";
Expand Down
Loading