-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0] [MIG] portal_event_tickets #9
[17.0] [MIG] portal_event_tickets #9
Conversation
Co-authored-by: Ivan Yelizariev <[email protected]> Co-authored-by: Alexandr Kolushov <[email protected]> Co-authored-by: Eugene Molotov <[email protected]> Co-authored-by: Victor Bykov <[email protected]> Co-authored-by: Ilmir Karamov <[email protected]>
7bcd72d
to
902baee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Частично проверил
<p | ||
attrs="{'invisible': [('is_transferring', '=', False)]}" | ||
style="color: red" | ||
>Ticket transferring was started, but haven't finished!</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Атрибут убрали, и его замены нету.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Атрибут убрали, и его замены нету.
Field 'is_transferring' used in modifier 'invisible' (is_transferring == False) is restricted to the group(s) base.group_no_one.
Ticket transferring was started, but haven't finished!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В таком случае надпимсь "Ticket transferring was started, but haven't finished!" будет постоянно видна.
Само поле is_transferring продублирируй и поставь невидимым рядом с этой надписью.
// $("input[name='1-phone']").val("111 111"); | ||
// $("select[name='1-country_id']").val("1"); | ||
$("input[type='email']").val("[email protected]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если c country_id понятно, ибо поле такого теперь нету. А вот почему phone убрали и поставили [email protected] - не понятно. Это ведь другой тест получится. Нужны пояснения.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
К слову тут надо не комментировать, а удалять строки.
// * country_id (mandatory) | ||
// skip: | ||
// * job position (optional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут просто удаляем упоминание про country_id и job position.
portal_event_tickets/tests/common.py
Outdated
# sale_order.onchange_partner_id() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут просто удаляем, не комментируем.
<template | ||
id="portal_my_home_event" | ||
name="Portal My Home : event entries" | ||
inherit_id="portal.portal_my_home" | ||
priority="25" | ||
> | ||
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside"> | ||
<t t-call="portal.portal_docs_entry"> | ||
<t t-set="title">Tickets</t> | ||
<t t-set="url" t-value="'/my/tickets'" /> | ||
<t t-set="placeholder_count" t-value="'tickets_count'" /> | ||
</t> | ||
</xpath> | ||
</template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Исправить надо также, как когда-то исправлял Affilitates. https://github.com/it-projects-llc/tg-addons/pull/8/files/f53b3d0607dfcacf2a5a33199f1c7f47555f4f03#diff-ac9f3b765e4c8066fdb4848396a07024ae84b647bdff24d03be8e7157594172d
registration["event_id"] = ticket.event_id.id | ||
registration.pop("email", None) | ||
partner_vals = request.env["event.registration"]._prepare_partner(registration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем убираем почту?
default_first_attendee = {} | ||
if ticket.attendee_partner_id: | ||
default_first_attendee = { | ||
"name": ticket.attendee_partner_id.name, | ||
"phone": ticket.attendee_partner_id.phone, | ||
"country_id": ticket.attendee_partner_id.country_id.id, | ||
} | ||
values.update( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- country_id точно нужен?
- Почему нету email?
request.env.ref(registration_badge_template) | ||
.with_user(SUPERUSER_ID) | ||
._render_qweb_pdf([ticket.id])[0] | ||
._render_qweb_pdf(registration_badge_template, [ticket.id])[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тогда уж request.env['ir.actions.report'], а не request.env.ref(registration_badge_template)
e5b6592
to
883bf20
Compare
<t t-call="portal.portal_docs_entry"> | ||
<t t-set="title">Tickets</t> | ||
<t t-set="url" t-value="'/my/tickets'" /> | ||
<t t-set="text">View your tickets</t> | ||
<t | ||
t-set="icon" | ||
t-value="'/portal/static/src/img/portal-connection.svg'" | ||
/> | ||
<t t-set="placeholder_count" t-value="'tickets_count'" /> | ||
</t> | ||
</xpath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Заверни пожалуйста этот portal_docs_entry в раздел для клиентов. Как тут
https://github.com/odoo/odoo/blob/17.0/addons/account/views/account_portal_templates.xml#L20-L28
<li class="list-group-item flex-grow-1"> | ||
<a | ||
t-if="ticket.event_id.ticket_transferring" | ||
role="button" | ||
class="btn btn-primary btn-block mb8" | ||
data-bs-toggle="modal" | ||
data-bs-target="#transferTicketModal" | ||
href="#" | ||
> | ||
<i class="fa fa-exchange" /> | ||
Transfer to another person | ||
</a> | ||
<a | ||
t-if="ticket.event_id.ticket_transferring" | ||
role="button" | ||
data-bs-toggle="modal" | ||
data-bs-target="#changeTicketModal" | ||
href="#" | ||
class="btn btn-primary btn-block mb8" | ||
> | ||
<i class="fa fa-wrench" /> | ||
Upgrade / Change ticket | ||
</a> | ||
<a | ||
t-attf-href="/my/tickets/pdf/#{ticket.id}" | ||
class="btn btn-secondary btn-block mb8" | ||
> | ||
<i class="fa fa-print" /> | ||
</a> | ||
</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Эти кнопки надо в одну колонку разместить, как в 14.-
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
883bf20
to
09bfa8a
Compare
09bfa8a
to
504d3bc
Compare
[17.0] [MIG] portal_event_tickets