Some of the non canononical timezones are not present in Ubuntu Noble,
it would be a better practice to only use canonical timezones in data
and tests.
Note that this is not a real fix for all cases since the database that
ran on Ubuntu Jammy and are moved to an ubuntu Noble server will have
the issue with timezones already in database.
One of the possible fix would be to manage that during upgrades, but
this isn't a verry flexible solution since upgrade are meant to manage
chyange of version, not change of server. If an old 17.0 versions needs
to be moved to a Noble server, this won't work.
Another solution would be to install package like tzdata-legacy that may
keep the old timezones but it is not the only think since TAI-10 are
also in this package. This solution is not ideal because non canonical
timezone will still be shown in the dropdown. We would need to filter
them.
A last solution would be to add the support for those old timezones by
monkeypatching the lib. This way, only new timezones would be shown but
non canonical one won't crash when used. This is not ideal either
because we may need to keep this for a while. But in combination with
the upgrade solution, it may work proprely.
Part-of: odoo/odoo#160842
When we use the `|` (or) version of this rule the ORM generates two
sub-queries when checking the company. This causes sub-optimal and in
some cases really bad planning for the queries and thus PG takes hours
to complete them.
Example (formatted):
```sql
SELECT "mrp_routing_workcenter".id
FROM "mrp_routing_workcenter"
LEFT JOIN "mrp_bom" AS "mrp_routing_workcenter__bom_id"
ON "mrp_routing_workcenter"."bom_id" = "mrp_routing_workcenter__bom_id"."id"
WHERE "mrp_routing_workcenter"."workcenter_id" in (1)
AND ( ("mrp_routing_workcenter"."bom_id" in (
SELECT "mrp_bom".id
FROM "mrp_bom"
WHERE ("mrp_bom"."company_id" in (1))
)
)
OR ("mrp_routing_workcenter"."bom_id" in (
SELECT "mrp_bom".id
FROM "mrp_bom"
WHERE "mrp_bom"."company_id" IS NULL
)
)
)
ORDER BY "mrp_routing_workcenter__bom_id"."sequence",
"mrp_routing_workcenter__bom_id"."id",
"mrp_routing_workcenter"."sequence",
"mrp_routing_workcenter"."id"
```
If we use the single term version the generated query has only one
sub-query:
```sql
SELECT "mrp_routing_workcenter".id
FROM "mrp_routing_workcenter"
LEFT JOIN "mrp_bom" AS "mrp_routing_workcenter__bom_id"
ON "mrp_routing_workcenter"."bom_id" = "mrp_routing_workcenter__bom_id"."id"
WHERE "mrp_routing_workcenter"."workcenter_id" in (1)
AND ( ("mrp_routing_workcenter"."bom_id" in (
SELECT "mrp_bom".id
FROM "mrp_bom"
WHERE (("mrp_bom"."company_id" in (1))
OR ("mrp_bom"."company_id" IS NULL))
)
)
)
ORDER BY "mrp_routing_workcenter__bom_id"."sequence",
"mrp_routing_workcenter__bom_id"."id",
"mrp_routing_workcenter"."sequence",
"mrp_routing_workcenter"."id"
```
In this version PG is able to produce a better query plan resulting in
better execution times.
Also, the `company_id` field is required on some models, so the "= False" comparison is useless.
closesodoo/odoo#159123
X-original-commit: 1b5c41f36801fb886ec591f29dba42787d698526
Related: odoo/enterprise#59378
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Co-authored-by: Christophe Simonis <chs@odoo.com>
Currently, if we create a new event mail "after each registration" to be send
directly, the next time we confirm a registration it tries to send the
communication to all registrations that are not yet contacted. Indeed
the first new registration triggers the scheduler which runs on all
pending registrations. This may potentially break the transaction or
at least make it extra slow.
Now, we send the mail only to the new registrations (created after the
event mail). Old registrations will be contacted via the CRON instead.
Task-3084943: Event: Improve communication scheduler scalability
Part-of: odoo/odoo#155777
Co-authored-by: Stéphane Debauche <std@odoo.com>
This commit introduces a new configuration parameter 'event.event_mail_async'
forcing registrations-based communication to be asynchronous. Instead of
directly sending communication it triggers the cron to be run as soon as
possible.
When having large volume of registrations, and especially concurrent
registrations it saves a DB to avoid generating tickets and preparing emails
synchronously to the registration creation.
Task-3764894: Event: Allow using cron triggers for communication
Part of Task-3084943: Event: Improve communication scheduler scalability
Part-of: odoo/odoo#155777
Before this commit the Email Sent Count (located in the Communication
tab of the event view) wasn't including emails sent to the attendees who
weren't confirmed.
[This commit changes]
Event mail scheduler will include seats_uncofirmed into calculation of
the mail_count_done which is the count of emails sent. This is
reflecting the actual number of emails sent.
[Reproduce]
- Install event_mail,event_sms
- Create event E starting in time T (Events/Events)
- Add an "Unconfirmed" attendee (Modify state via database write)
- Add an E-Mail in the Communication tab of the event E
- Set Interval time > T,
- Template: "Email Reminder"
- Trigger "Before the event"
- Run scheduled Action sending email (Scheduled Actions / Event: Mail Scheduler)
- BUG: email sent, but not included in the sent count in the communication tab of the event E
opw-3693626
closesodoo/odoo#157229
Signed-off-by: Andrzej Pietrusiak (pian) <pian@odoo.com>
Make them easier to improve and modify
* use a dedicated setup (allowing to add specific unit tests on test data);
* move initial asserts into its own unit test (to keep other tests shorter);
* use available mocks for freezetime and sql.now;
Then add tests for registration emails, to check what happens for communication
scheduled right at registration time.
Task-3084943: Event: Improve communication scheduler scalability
Part-of: odoo/odoo#155717
Co-authored-by: Stéphane Debauche <std@odoo.com>
They fail at least in local as we don't patch env.cr.now. Forcing 'create_date'
is possible, but we now have a tool 'mock_datetime_and_now' mocking both
the cursor 'now' and use freeze_time for other datetime mock. It makes tests
more reproducible and less ORM-dependent when trying to manipulate creation
date.
Task-3084943: Event: Improve communication scheduler scalability
Part-of: odoo/odoo#155717
Co-authored-by: Stéphane Debauche <std@odoo.com>
Steps to Reproduce
===================
1. Create an event (e.g. starting at 9:00 AM)
2. People arrive early and attempt to scan a badge at 7:30 AM
--> An error occurs: "Not part of an ongoing event"
Technical Reason
=================
-> Before this commit we were considering both date and time due to this
is_ongoing was set as false.
-> So to support early entrance we remove the old condition and added a
new condition.
After this Commit
=================
It will let you scan badges and verify attendee as long as event is not
finished.
Task-3596660
closesodoo/odoo#151703
X-original-commit: https://github.com/odoo-dev/enterprise/commit/3a2e4f123f1b3ff2eb1c444d14891eddd7e7ebac
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
For a first iteration, Russian translations were done using DeepL using
1 large .pot file of all the standard modules to translate (e.g. no
localizations, no test modules, etc). Unfortunately for some reason
doing a msgmerge with the existing ru.po files didn't seem to work, so
old "Translators" metadata at top of files were lost (maybe they will be
re-added during next Transifex sync?)
Part-of: odoo/odoo#152285
The utm parameters i.e. utm_source, utm_campaign, utm_medium, are only set
when a sale order is attached to an event registration. If no sale order is
generated the event registration won't have any source despite it being
accessed via a campaign.
Reproduction steps:
1. Create an event and copy its website link.
2. Go to link tracker and create a tracked link with utm values filled.
3. Use this tracked link in incognito preferably to register for the event.
4. Check the attendees of the event and check the marketing utm values.
The registration has no campaign. When it should have one.
This is because event.registration mistakenly does not inherit from
the utm mixin. The fix is to call the default_get of the mixin
as it is independant from any field defined in the mixin.
OPW-3222179
task-3458877
closesodoo/odoo#151047
X-original-commit: 06803bc12115ccb2afb7ea7b8dd101e3a75bfb67
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
Following the event badge redesign in odoo/odoo@1da6cbc4c, we should
display on the attendee's badge (report) the attendee's company name
(`company_name`) instead of the event's company (`company_id`)
closesodoo/odoo#147272
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Current behaviour:
QR code is squished, it's 77x21 px
Expected behaviour:
QR code should be 100x100 px
Steps to reproduce:
1. Go Email Templates
2. Find 'Event: Registration Confirmation'
3. Click on preview
4. QR code is squished
opw-3625701
closesodoo/odoo#145963
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
Before the commit, there was a small issue where a foldable badge would be
slightly smaller in height than A4 paper.
This commit fixes this by giving foldable badges more height.
Task-3389338
closesodoo/odoo#143079
X-original-commit: 0bca59b43bb195f8fc5feef315c7694eba6df326
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit adapts some steps to correctly select the elements as
before because some selectors no longer work due to changes done
in Framework JS code (web module).
closesodoo/odoo#142746
X-original-commit: 02bf97b44c76bd22a813e184bc5c42ab9716280f
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, the user got a traceback saying:
```txt
TypeError: Cannot read properties of undefined (reading 'apply')
at EventAdditionalTourSteps._get_website_event_steps
```
the reason of that issue is because a [recent generic change reviews](#125716)
`patch` function and so `this._super` no longer exists and has to be
replace by `super` as we extend a method of a class extended.
This commit adapts the additional steps adding via `patch` function
to be able to add those steps and start the tour as expected.
closesodoo/odoo#142653
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
-> This commit add/change the name of the page corresponding to the string
attribute because To be able to detect a field, Knowledge needs to be able to
read its page name.
For more reference: Task-3501211
Task-3524474
closesodoo/odoo#137428
Related: odoo/enterprise#48315
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>