Skip to content
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

Merged

Conversation

azimkhankuat
Copy link
Contributor

[17.0] [MIG] portal_event_tickets

em230418 and others added 3 commits October 18, 2024 10:18
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]>
@azimkhankuat azimkhankuat force-pushed the 17.0-mig-portal_event_tickets branch 2 times, most recently from 7bcd72d to 902baee Compare October 23, 2024 11:29
Copy link
Member

@em230418 em230418 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Частично проверил

Comment on lines 15 to 19
<p
attrs="{'invisible': [('is_transferring', '=', False)]}"
style="color: red"
>Ticket transferring was started, but haven't finished!</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Атрибут убрали, и его замены нету.

Copy link
Contributor Author

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!

Copy link
Member

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 продублирируй и поставь невидимым рядом с этой надписью.

Comment on lines 18 to 20
// $("input[name='1-phone']").val("111 111");
// $("select[name='1-country_id']").val("1");
$("input[type='email']").val("[email protected]");
Copy link
Member

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] - не понятно. Это ведь другой тест получится. Нужны пояснения.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

К слову тут надо не комментировать, а удалять строки.

Comment on lines 15 to 17
// * country_id (mandatory)
// skip:
// * job position (optional)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут просто удаляем упоминание про country_id и job position.

# sale_order.onchange_partner_id()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут просто удаляем, не комментируем.

Comment on lines 36 to 57
<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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Раздел Ticket выглядит уныло.
Снимок экрана_2024-10-24_10-11-05

Исправить надо также, как когда-то исправлял Affilitates. https://github.com/it-projects-llc/tg-addons/pull/8/files/f53b3d0607dfcacf2a5a33199f1c7f47555f4f03#diff-ac9f3b765e4c8066fdb4848396a07024ae84b647bdff24d03be8e7157594172d

Comment on lines 306 to 307
registration["event_id"] = ticket.event_id.id
registration.pop("email", None)
partner_vals = request.env["event.registration"]._prepare_partner(registration)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем убираем почту?

Comment on lines 280 to 287
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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. country_id точно нужен?
  2. Почему нету email?

Comment on lines 152 to 154
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]
Copy link
Member

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)

@azimkhankuat azimkhankuat force-pushed the 17.0-mig-portal_event_tickets branch 2 times, most recently from e5b6592 to 883bf20 Compare October 29, 2024 11:55
Comment on lines 43 to 56
<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>
Copy link
Member

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

Comment on lines 114 to 153
<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" />
Print
</a>
</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эти кнопки надо в одну колонку разместить, как в 14.-

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Снимок экрана_2024-10-30_15-57-10

@azimkhankuat azimkhankuat force-pushed the 17.0-mig-portal_event_tickets branch from 883bf20 to 09bfa8a Compare October 30, 2024 11:24
@azimkhankuat azimkhankuat force-pushed the 17.0-mig-portal_event_tickets branch from 09bfa8a to 504d3bc Compare October 30, 2024 11:58
@em230418 em230418 merged commit 2b0ab44 into it-projects-llc:17.0 Oct 31, 2024
4 checks passed
@azimkhankuat azimkhankuat deleted the 17.0-mig-portal_event_tickets branch November 8, 2024 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants