-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] portal_event_tickets: Migration to 17.0
- Loading branch information
1 parent
a3b871b
commit 902baee
Showing
10 changed files
with
85 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** @odoo-module **/ | ||
|
||
import publicWidget from "@web/legacy/js/public/public_widget"; | ||
|
||
publicWidget.registry.TransferTicketWidget = publicWidget.Widget.extend({ | ||
selector: "#transfer_ticket", | ||
|
||
async willStart() { | ||
await this._super(...arguments); | ||
|
||
const event_name = this.$el.data("event-name"); | ||
const $modal = $("#modal_attendees_registration"); | ||
|
||
/* Show form inline */ | ||
$modal.find("form").attr("action", "/my/tickets/transfer/receive"); | ||
$modal.removeClass("modal fade"); | ||
|
||
/* Remove Cancel button; update title */ | ||
var $submit = $modal.find("[type=submit]"); | ||
$submit.parent().empty().append($submit); | ||
$submit.text("Confirm"); | ||
|
||
/* Remove Close button */ | ||
$modal.find(".close").remove(); | ||
|
||
/* Make email non-editable */ | ||
$modal.find("[name=1-email]").attr("disabled", "1"); | ||
|
||
/* Update title */ | ||
$modal | ||
.find("h4.modal-title") | ||
.html("Receive the ticket for <b>" + event_name + "</b>"); | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,27 @@ | ||
odoo.define("portal_event_tickets.ticket_transfer_tour", function (require) { | ||
"use strict"; | ||
/** @odoo-module **/ | ||
|
||
var tour = require("web_tour.tour"); | ||
import {registry} from "@web/core/registry"; | ||
|
||
var options = { | ||
test: true, | ||
url: "/my/tickets/transfer/receive", | ||
}; | ||
|
||
var tour_name = "ticket_transfer_receive"; | ||
tour.register(tour_name, options, [ | ||
registry.category("web_tour.tours").add("ticket_transfer_receive", { | ||
test: true, | ||
url: "/my/tickets/transfer/receive", | ||
steps: () => [ | ||
{ | ||
content: "Fill attendees details", | ||
extra_trigger: "input[name='1-function']", | ||
trigger: "input[name='1-name']", | ||
trigger: "input[type='email']", | ||
run: function () { | ||
// Fill: | ||
// * phone (optional) | ||
// * country_id (mandatory) | ||
// skip: | ||
// * job position (optional) | ||
$("input[name='1-phone']").val("111 111"); | ||
$("select[name='1-country_id']").val("1"); | ||
// $("input[name='1-phone']").val("111 111"); | ||
// $("select[name='1-country_id']").val("1"); | ||
$("input[type='email']").val("[email protected]"); | ||
}, | ||
}, | ||
{ | ||
content: "Validate attendees details", | ||
extra_trigger: "input[name='1-phone']", | ||
trigger: 'button:contains("Confirm")', | ||
}, | ||
{ | ||
|
@@ -36,5 +31,5 @@ odoo.define("portal_event_tickets.ticket_transfer_tour", function (require) { | |
// It's needed to don't make a click on the link | ||
}, | ||
}, | ||
]); | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters