Purpose of the task is to update all l10n modules icon with new icon that i have
found in task attachment.
So in this commit, Updated all l10n modules icon with new icon.
closesodoo/odoo#65329
Taskid: 2442631
Related: odoo/enterprise#16054
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
changed the start/end date fields to datetime fields, in order to allow more
flexibility for the user and enable them to set a precise point in time at
which ticket sales should start/end, because otherwise ticket sales/end would
always be set at midnight which is not very flexible.
Task-2431440
closesodoo/odoo#65133
Related: odoo/upgrade#2126
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of the task is, 'general setting' is not easily understandable
by the user. The user often gets lost. This is especially damaging
through onboarding as some new users like to discover the software by
scrolling through the general settings.
So in this commit, the general setting is well organized and easily
understandable by the user.
Related PR: https://github.com/odoo/enterprise/pull/14707closesodoo/odoo#61645
Taskid: 2374990
Related: odoo/enterprise#14707
Related: odoo/upgrade#1958
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In calendar module there is one typo in action_mass_mailing
button's string.
So replace the 'EMAIl' to 'EMAIL'.
closesodoo/odoo#67535
Taskid: 2478549
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit:
- Edit mode, open image dialog
- Upload an image to the media dialog
- Reclick on Upload but don't select an image, close the browser image
selector
- This will trigger the input change event, as the input was emptied
This is needed since in later commit, `_addData()` will do some code outside
of the `files` loop, which is useless if there is no files selected.
In thise case, the issue would be that it would open an empty toastr.
task-2345082
Coming from #65828Closes#68326closesodoo/odoo#68340
X-original-commit: 94c45412714c1263788b2567ce3c9581453b2cd4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since the image util method `image_base64()` is converting BMP images to PNG
automatically[1], there would be a mismatch between the attachment content type
and the attachment mimetype.
- Content type: retrieve with `base64_to_image(data).format` -> return PNG as
the image data was converted from BMP to PNG
- Mimetype: set on `write()` and `create()` with `_check_contents()` which
call `mimetypes.guess_type(file_name)`.
BMP image `my_file_image.bmp` would have a mimetype set to BMP
The computed field `image_src` would return `False` since the image.mimetype
would be BMP, making the dialog picker not showing the image but loading
`http://localhost:8069/false` instead.
[1] https://github.com/odoo/odoo/blame/097f29d0f6a5b295c81fd074665dbd261eaf12fb/odoo/tools/image.py#L124
task-2345082
Coming from #65828Closes#68326
X-original-commit: ef5b108b781df73342bb99342a1116fad86d3b58
Previously, when selecting certain options, especially ones which had
slow updateUI methods, the selected value was sometimes reset to its
previous value. This was caused by a race condition in which, when a
snippet option updated its value, it would wait for options on the
parent snippet editors to update all of their options' UI, but it
incorrectly only waited for *one* of the snippet editors to finish
instead of waiting for all of them.
This commit fixes that by stopping the event propagation and triggering
a new event that will let the direct parent know when all parent editors
are done updating their options' UI before signalling that the UI update
is done.
task-2487578
closesodoo/odoo#68341
X-original-commit: 7623a0c771495cd41bf40af37c0d2b6e4beb7cdc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Arthur Detroux <ard@odoo.com>
Let's assume an x2many list with an onchange. When a sub-record is
modified, an onchange is performed, and it may update other records
in the relation (e.g. the debit/credit case in accounting). This
commit ensures that modifiers are correctly re-evaluated in that
situation, so that they are up-to-date with the new x2many values.
task-2373929
closesodoo/odoo#61911
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit introduces a many2many as a standalone, reusable
UserValueWidget. This widget is built on top of the ListUserValueWidget
which was until now only used in website form that had to be updated to
allow more generic use of the widget.
Part of https://github.com/odoo/odoo/pull/67832
task-2274732
Issue
-----
- Currently the cron can take too much time and timeout.
In case of timeout process data are rollback.
The sync per user also crash and stop the process for all user and make
the transaction rollback
In both case we cannot ensure that all user will end up synchronized
- The real time sync can end up in deadlock:
If you create a holiday, it trigger a write on the user and the
creation of an event that will be synchronize with google
The synchronization may ask for a new token if this request fail
a new cursor is create to empty on the user the refresh token.
2 cursor that are trying to write on the same record => Deadlock
- Bad refresh token management
When the refresh token is not anymore valid it's erased but
the calendar_token and validity are kept. Is odoo consider
the token valid it will try to sync an event with google|microsoft
despite the refresh token is not valid anymore. Of course this lead to
an error and the impossibility to create an event anymore without
manually wiping the calendar_token and calendar_token_validity
- Error 401 are handled in context manager
(google|microsoft)_calendar_token, but get_*_calendar_token never raise
http error only user error.
Solution
---------
- Improve cron resilience
- Commit between each user and rollback in case of issue for a user
- Solve the issue when stop < start
- Solve issue with rrule not being the first element in the list
of recurrence
- Improve perf when searching for organizer
- In order to limit the volume during the first synchronization, we only
synchronized event from x days in the past to x days in the future with
x = 365 by default
- Limit the number of event to synchronize to google each time to 200,
since this operation is time consuming (1 request is sent per event)
- Avoid deadlock
A new cursor is not needed, we only need to ensure that write on the
user is done with a clean cursor and will be commited despite the error
raise. So rollabck before the write and commit explicitly afterwards
- Erase properly all the token and the token validity if the refresh token is not valid anymore
- For google calendar, erase also the token in case of 401
error: Wrong client id, this mean the database parameter have been
change and all the user should reconfigure the synchronization
- Directly handle error 401 with error 400 in refresh_token method
closesodoo/odoo#66250
X-original-commit: 486f69abad6226e5ce016ad89a0eeb103d709a3f
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
*: web_editor
The purpose of this commit is to control the hue and the saturation of
the gray palette.
task-2362091
closesodoo/odoo#66428
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Adds a new UoM category (surface) and two UoM: m² and ft²
Could be useful for some kind of products like paper or fabric.
task-2443585
closesodoo/odoo#66174
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Purpose of this merge is to make templates easier to preview and edit as
weel as to improve their content.
This is achieved notably by lessening use of custom rendering context and
trying to fix as much error-prone jinja statements.
In this commit we also make ``calendar_template_meeting_reminder`` template
looking more like other templates. There were some rendering differences that
do not seem really wanted.
``calendar_template_meeting_reminder`` was also using an old ``force_event_id``
key not replaced by recurrent_id field on attendee.
This merge improves few strings of the invitation mail being sent while
booking an online appointment. Online appointment is computed based on
``appointment_type_id`` field being defined. Some tweaks in wording made it
necessary to know if recipient is the responsible, customer or an added
attendee on the event, leading to some tooling code added on event model.
The main changes includes
* for customer, remove the CTAs to accept / decline event as attendee are
automatically set as accepted;
* depending on recipient, improve wording of the mail accordingly and mention
appointment type in the mail;
Some code reodering and cleaning is also performed in this merge to ease
reading and understanding of calendar event and attendee models.
LINKS
Task ID-2199620
COM PR #64925
ENT PR odoo/enterprise#15914
UPG PR odoo/upgrade#
Related: odoo/upgrade#2282
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of this commit is to make templates easier to preview and edit as
weel as to improve their content.
This is achieved notably by lessening use of custom rendering context and
trying to fix as much error-prone jinja statements.
In this commit we also make ``calendar_template_meeting_reminder`` template
looking more like other templates. There were some rendering differences that
do not seem really wanted.
``calendar_template_meeting_reminder`` was also using an old ``force_event_id``
key not replaced by recurrent_id field on attendee.
This commit improves few strings of the invitation mail being sent while
booking an online appointment. Online appointment is computed based on
``appointment_type_id`` field being defined. Some tweaks in wording made it
necessary to know if recipient is the responsible, customer or an added
attendee on the event, leading to some tooling code added on event model.
The main changes includes
* for customer, remove the CTAs to accept / decline event as attendee are
automatically set as accepted;
* depending on recipient, improve wording of the mail accordingly and mention
appointment type in the mail;
Task ID-2199620
COM PR odoo/odoo#64925
ENT PR odoo/enterprise#15914
UPG PR odoo/upgrade#2282
Co-Authored-By: Krupal Oza <koz@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
Purpose is to ease understanding of code. Notably we apply guidelines that
should have been applied at refactoring time, notably
* set all compute fields together right below fields as it eases model
discovering;
* set CRUD methods as a whole after compute fields;
* group other methods by main use and put tools at the file's end;
This commit causes some diff but we feel this is necessary to ease future
modifications in those models, as they are quite big and important.
Task ID-2199620
COM PR odoo/odoo#64925
Purpose is to ease model understanding. This commit causes some diff but
those models gain readability after being ordered by main field section.
It would have been better to do it at refactoring time but time was short
to do it at that time.
Task ID-2199620
COM PR odoo/odoo#64925
Correct small typo that the module when exporting translations as CSV
file might have been the wrong module because we used variable from
previous loop.
This did not seem to cause any issue since in this given case in import
we got the module from the part before . in XML ID ({module}.{name})
that was right.
found when working on opw-2439029
closesodoo/odoo#68297
X-original-commit: 62e7b161d39e5f5f6751cf87826fa6f7b729f83d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
One might design a custom field widget to display/interact with a
one2many field. Before this commit, if this field widget triggered
a field_changed event to update a related record, it crashed,
because the code assumed that there was a view associated with the
field.
Closes#68276
opw~2468238
closesodoo/odoo#68309
X-original-commit: 3826a2645b94e0f62c719814c4dbe4cc6502e1f2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Fixing anchor selector to pick only section and div elements.
task-2449620
closesodoo/odoo#68298
X-original-commit: a384dc0905190e9e469ed5c6e65fc0e9abd93b8d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
PURPOSE
Improve event mail scheduled communications: add a state and a contacted
count. Improve performances and code readability.
SPECIFICATIONS: STATE
Instead of the checkbox "sent", an event mail can have 3 values
1. Sent, if all the mails has been sent;
2. Scheduled, if scheduled but no attendee have been contacted;
3. Running, if not all attendees have been contacted;
Note that communication targeting "after registration" are always considered
as being "running" as any new registration triggers a new communication.
A new widget is added that displays an icon depending on the state.
A new field holding contact count is added. When scheduler send emails it is
updated to keep a count of sent communications.
SPECIFICATIONS: MAIL COMPUTATION IMPROVEMENT
Purpose of this merge is to remove the "done" field computation. Indeed
it is based on either
* mail_sent field if scheduler is global to the event (before or after
event). This computation is light as this field changes only once
when emails are scheduled and sent;
* status of event registrations compared to all sent communication on
those registrations. This is costly as adding a new registration changes
In this merge we therefore
* rename ``done`` to ``mail_done`` to ease grep and understanding;
* remove ``mail_sent`` as it is integrated within ``done``;
* manually update ``mail_done`` when updating schedulers instead of doing
it through a compute method;
Some code cleaning is performed to make it clearer and easier to understand.
LINKS
Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of this commit is to remove the "done" field computation. Indeed
it is based on either
* mail_sent field if scheduler is global to the event (before or after
event). This computation is light as this field changes only once
when emails are scheduled and sent;
* status of event registrations compared to all sent communication on
those registrations. This is costly as adding a new registration changes
In this commit we therefore
* rename ``done`` to ``mail_done`` to ease grep and understanding;
* remove ``mail_sent`` as it is integrated within ``done``;
* manually update ``mail_done`` when updating schedulers instead of doing
it through a compute method;
Some code cleaning is performed to make it clearer and easier to understand.
LINKS
Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
Purpose
=======
Show an icon representing the state of the event mail and number of contacted
registrations instead of the simple checkbox "sent".
Specifications
==============
Instead of the checkbox "sent", an event mail can have 3 values
1. Sent, if all the mails has been sent;
2. Scheduled, if scheduled but no attendee have been contacted;
3. Running, if not all attendees have been contacted;
Note that communication targeting "after registration" are always considered
as being "running" as any new registration triggers a new communication.
A new widget is added that displays an icon depending on the state.
A new field holding contact count is added. When scheduler send emails it is
updated to keep a count of sent communications.
LINKS
Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
Scheduled date is not correctly triggered if event date_end changes. It should
update its scheduled communications.
Task ID-2414658
COM PR odoo/odoo#63093
Purpose of this commit is to help debugging processes involving cron triggers
by adding views and a menu in Odoo. It allows to see triggers having been
created. Menu has been added under Scheduled Actions (aka Crons), in Technical
menu.
Task ID-2414658
COM PR odoo/odoo#63093
This reverts commit 170729ee58b199041d7545e7789ac9474e86f998, per
discussion with @thomasdeleval on linked ticket.
opw-2422438
closesodoo/odoo#68293
X-original-commit: 5c2db20a14701f165adfecb391073c3d957081e9
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
Before this commit, when delivered qty. for a product tracked by serial
numbers and then create a returns for this product, as the move is
linked to its original returned move, when the detailed operations will
be displayed, it will hide `lot_name` field and display the `lot_id`.
The issue is it will still show the "Assign Serial Numbers" feature.
As this feature is for the creation of new SN only (not for assign
existing ones), it should be hidden in this case because it will lead to
attempt to create already existing.
How to reproduce:
- Create a product tracked by serial numbers;
- Add at least two qty. on hand for this product and create as many
serial numbers, following by numbers (ex.: sn01, sn02, sn03, ...);
- Make a delivery for at least two of this product and proceed it;
- When it's done, make a return for this delivery;
- Open the delivery's return and display the detailed operations, then
use the "Assign Serial Numbers" to try to reassign the delivery SN.
--> First, we will not see the SN on the move line (as `lot_id` is
visible but `lot_name` is invisible).
--> Second, you can't mark as done the return as it will try to create
the SN but they already exist.
To fix the issue, we can simply hide this feature when we hide the
`lot_name` field.
task-2474919
opw-2455971
closesodoo/odoo#68249
X-original-commit: fab1f31f70376d5477e67d153e2fa3c0f6477397
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
Currently we automatically check reordering rules when a product cannot be
completely reserved, which allows to have a replenishment document for the
product without needing to run scheduler. This is unwanted for some users.
In this commit, we allow to disable this by adding a parameter to
ir.config_parameter. To disable it, set a parameter with name
"stock.no_auto_scheduler".
opw 2458507
closesodoo/odoo#68283
X-original-commit: 7ec5bae11ad89514a33db35810f4763e7631125f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
When testing cron triggers, it is common to get the newly created
triggers in order to validate they exist and are scheduled are the right
moment.
This new helper is a context manager that capture all triggers or
triggers created for a specific cron. The created triggers are
accessible via the context's object `records` attribute.
The various tests have been updated so they use that new helper.
closesodoo/odoo#68163
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Co-authored-by: Raphaël Collet <rco@odoo.com>
Some changes on the MRP workcenter model (`mrp.workcenter`):
- Adds a stat button in the form view to display operations used by
the workcenter;
- Enables the multi-edit on the list view;
- Adds multiple fields in the list view, often as optional;
task-2382256
closesodoo/odoo#62126
Related: odoo/enterprise#17250
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
On the MRP operation model (`mrp.routing.workcenter`):
- Changes the order (ordered by workcenter and BOM in priority);
- Adds computed field, `time_computed_on`, which is only used in list
view (display on how many numbers of work orders the duration is
computed);
- Adds multiple fields in list view (often optional display);
- Adds two groupby (by BOM and by workcenter).
task-2382256
PURPOSE
Before this commit, the survey host had no indication that his survey
has no questions. After this commit, he will be displayed with that
indication.
Before this commit, someone who took the survey had a message implying
him to modify the survey to add questions. After this commit the message
will say 'No question yet, come back later'.
LINKS
Task ID : 2456372
PR : odoo/odoo#68231
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, hr_skills module defined a few css rules
but weren't enclosed in a custom class to make them only
for hr skills so these rules leaked everywhere in odoo.
This commit encloses these css rules to not leak them and move
a rule which changes the color of list's remove button into web
module to keep the color.
closesodoo/odoo#67921
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When importing transtlation from CSV, we:
- cut at `:` character to get the model
- used a model for types other than model and model_terms
This caused error that do not happen in PO import because:
- the model is before the `,` character
- the imd_model column is constrained to 64 characters, and a name that
is not a model could be over that size.
With this changeset, the CSV import match better current PO import.
opw-2439029
closesodoo/odoo#68266
X-original-commit: cff91c6acbb7ef6a884d4dc4170574b83ff6e4cb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Add an event listener triggered on current value change of input range.
task-2362091
closesodoo/odoo#66812
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The former algorithm was recreating a full etree from scratch, while
parsing the content to translate. Instead, we parse the etree and
update only the content that to be translated.
Before:
| In [2]: %timeit views.invalidate_cache(); views.mapped('arch_db')
| 578 ms ± 7.83 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
After:
| In [2]: %timeit views.invalidate_cache(); views.mapped('arch_db')
| 208 ms ± 2.79 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
Reading a view is 2.63x faster: from 504 ms, to 191 ms (sum of all the
1345 views, when installing website_sale). Large views, like web pages
goes up to 3x-4x faster; small views are ~2x faster.
As views are cached, it only impact the loading to put in cache, but all
XML/HTML fields get the same performance gain.
closesodoo/odoo#68182
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Before this commit:
If there is no subject for message, it effectively displays "False" in case of
void subject.
After this commit:
If there is no subject for message, it will not display "False" in case of void
subject.
Tasks-2156170
closesodoo/odoo#68243
X-original-commit: 4b2f0ddcbe859ec8453e537aec9d5b0685876eca
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Without this 'XML declaration', if you have magic installed, the mime type
is image/svg instead of image/svg+xml and browser don't render it.
This commit is related to #68211 meanwhile a more generic solution (if needed).
closesodoo/odoo#68239
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>