Before this PR, the delete button was completely invisible on image with white
background.
task-2709788
closesodoo/odoo#81000
X-original-commit: fd1e05cd131273504e7e6cd4f64f6ea63514b6b7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, unlink-all would sometimes fail to unlink more than one
record.
This seems to be the case in particular for x2many relations with isCausal true.
Indeed, the delete from isCausal is itself calling unlink-all on the inverse
relation (the same record that was being unlinked-all in the first place) which
would pre-emptively remove it from the same Set that was used during the initial
iteration.
The solution is to make a copy of the Set before iterating it to ensure all
records that were planned to be removed are actually removed.
Candidate fix for task-2410314 and definitely necessary for data integrity in
general.
closesodoo/odoo#80913
X-original-commit: 0077b93fea6f8c39ee535f19426c3f95a0e97e9f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In preparation for using OWL v2 in discuss code.
(`shouldUpdateBasedOnProps` will be removed)
Task-2695743
closesodoo/odoo#80615
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Using <a> with 'download' attribute to download the attachment.
Prevent calling .navigate() interrupting the current call.
task-2692597
closesodoo/odoo#80903
X-original-commit: 97fa88c2e8407972c83c93d4d2198633a5560ecc
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In preparation for using OWL v2 in discuss code.
(shouldUpdateBasedOnProps will be removed)
Task-2695743
closesodoo/odoo#80616
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, sometimes component do not properly
render changes in the models. Although the modeling is correct,
there is a problem in the component not re-rendering itself.
The shouldUpdateBasedOnProps component hook did not consider
update attempts that could be canceled. This commit adds this
consideration, so that it ensures component is eventually
rendered correctly
Task-2410314
Task-2705078
closesodoo/odoo#80877
X-original-commit: 12c77f52c5a16c95e57de31587d67eda4d582bde
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the title of RTC dialogs -- like "Change Layout" menu
during a video-conference -- was not properly translated. The titles were
always shown in English as a result.
This commit now properly mark them as translatable string, so they should
now be properly translated in other languages than English.
Task-2703292
closesodoo/odoo#80689
X-original-commit: fbcdb644f24ecd10049a3730099c4a426a1f607f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit:
Attachment viewer not working for other types than the image for guest.
After this commit:
Attachment viewer will work for guest.
Task-2664816
closesodoo/odoo#80686
X-original-commit: 7bb5776d2108a20d248f98f2741be92e1bc9de50
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Since https://github.com/odoo/odoo/pull/73689 all internal users are no longer
known at init. Unlike what was stated in the corresponding PR, the code of
mentions wasn't actually good enough to allow it without any drawback.
This PR fixes the issue by prioritizing internal users on the result of the RPC.
As a bonus the internal user state is immediately returned when fetching
followers, which allows mentions to be accurate even before the RPC is done.
task-2695224
closesodoo/odoo#80645
X-original-commit: 86de2f231be87b289deb85c3b20b93d890cce918
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit:
Replying to the answer of /who command in a channel leads to the reply not being
associated with the correct message, it should simply not be possible.
After this commit:
Reply icon will be invisible for temporary or transient message.
Task-2700389
closesodoo/odoo#80623
X-original-commit: 1df56ba9e105bd2766e252be22a320046b815cf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Rename models 'test.*' to 'Test*' in order to be consistent with the new
naming convention for javascript models.
Part of task-2701674.
closesodoo/odoo#80562
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Omission of some tests that still use `component.el`.
In preparation of using OWL v2 in discuss code.
Task-2694242
Task-2701230
closesodoo/odoo#80507
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit:
Currently, in Discuss, the chat activates the drop zone when try to drag and
drop any user's avatar (or any text). The same thing happens if we do it in
the chat window or chatter.
After this commit:
The chat will not be activated drop zone if the drag is not actually
a file/a document.
Task-2590510
closesodoo/odoo#80464
X-original-commit: 0e2f46bc2cfd36dc3508a56601239c15e2301571
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit:
When trying to select emoji on log note before record creation,
it shows traceback.
After this commit:
Hiding the emoji button when the record is under creation.
Task-2664700
closesodoo/odoo#80352
X-original-commit: 10c06f9753540d0a58b1a93fc54947a58b092468
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Instead of "saving" the state into the DOM (which is lost at next render) save
the state of each button in JS.
task-2308951
closesodoo/odoo#80358
X-original-commit: 58d4d65e98d8f5196b4d6ca91cd5df96dfac1360
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* Avoid computing logic in get_values, use a clean compute instead
* Leave the management of config parameters to the generic behavior in
base, no need to override set_values to do it "manually".
Furthermore, in the mail case, the set_values override enforced the creation
of a falsy parameter, which goes against the generic parameter logic to avoid
having falsy values for nothing in database.
Part-of: odoo/odoo#62249
PURPOSE
Before this commit, when a partner was created through the
suggested recipient tool the langage wasn't considered...
The email was thus sent in the wrong langage most of the time
After this commit, the suggested recipient tool had the
langage correctly if present in the record.
LINKS
Task-2580065
PR : odoo/odoo#76812
Purpose
In discuss, improve chat UI so that it will be easier to read when a voice/video
call is started.
Specification
- Reduce paddings above and below message box.
- Put a white background for the massage box instead of light gray.
Task-2591180
closesodoo/odoo#74312
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Current behavior :
When we try to add a member through channel's settings by clicking on "Add a line", a blank line is correctly added but can't be edited.
Steps to reproduce :
- Install Discuss
- Go to channel settings
- Try to add a member by clicking on "Add a line"
Reason :
Since commit 89eef4cdd419cc23cfb8d3e0af7a7115119549c2 , 'partner_id' field as been set to readonly because it doesn't make sense to edit the partner_id of a channel. However, this prevents the possibility of adding a member.
( diff : https://github.com/odoo/odoo/pull/75496/files#diff-d02eca5ffaa6b9765330a905661cd6cb917b92d851b473d459ee011bb2c5be3cR17 ).
OPW-2677329
closesodoo/odoo#80326
X-original-commit: 9536f8ec556670f67939fdee825630e06d5b4808
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Currently mail override of avatar user widget strips user name in
kanban view. Real reason is quite obscure, see odoo/odoo@59641325c7
In this commit we add an option to display both the avatar and the name.
Sometimes you want to display an avatar and a name to have a nice display
especially when focus is more on the displayed user / partner than on
chat capabilities.
Task-2388785
Part-of: odoo/odoo#77227
* = calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot, sms,
snailmail, website_livechat
This commit will change the declaration of the models with the aim of
getting closer to a plain JSON-object. It allows us to eliminate a wide
portion of boilerplate code, making the declaration shorter, more
declarative, and less redundant, but mainly, it prepares the ground for
further changes.
Task-2695223
closesodoo/odoo#79259
Related: odoo/enterprise#22042
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR introduce activity_box_model to handle the activity_box component logic.
part of task-2579306
closesodoo/odoo#79993
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
PURPOSE
Concatenate feedback message and tracking when marking a lead as lost. This
currently generates 2 consecutive message about the same change, having a
single one is better from an UI point of view.
SPECIFICATIONS
Allow to link a body to a value change tracking. Tracking is currently done
by accumulating changes in a structure (see ``env.cr.precommit.data`` usage
with ``mail.tracking.<name>`` key). In the end those values are used to
generate a message with tracking value and a subtype.
In this commit we allow to manually set a body used as a message for the
tracking message, adding a new ``mail.tracking.message.<name>`` key. It is
used when posting or logging the tracking message, simply propagated as body
to ``message_post`` or ``message_log``.
In crm we use this when losting a lead through the dedicated wizard. A bit
of custom html allows to have a nice display.
Task-2671709
Part-of: odoo/odoo#78648
Purpose is to have tracking methods beginning with ``_track``, indicating
those are tool methods used for tracking. It helps organizing the mail thread
file and having short but precise method names.
We also remove the usage of ``mail_track_log_only`` context key that is not
used anymore in the code. It allows to shorten a bit the code and make it
easier to read.
Task-2671709
Part-of: odoo/odoo#78648
PURPOSE
Allow sales reps to add a closing note to their lead while it is being marked
as lost. This is currently already done by a lot of sales reps but manually
with the "Log a Note" button.
SPECIFICATIONS
In ``Lost Reason`` model: add a new html field allowing to log a note on the
lost leads. Below the m2o, add an Extra Comment field where users can add a
"closing note". When the wizard is submitted, log this message as a note on
selected records.
Add tests, allowing to test both the wizard and this new feature.
Task-2671709
Part-of: odoo/odoo#78648
To be able to copy an attachement, we need to be have write access on
the linked record.
In this wizard, write access on mail.template is then required which
is no longer the case since cc012a0864
Read access on the template is already checked when reading the values
of the tempate.
closesodoo/odoo#79900
X-original-commit: ce342f42f21cad3aa5606f6ab0b5739f29f0c456
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
Accessing `valid_docs.ids` for each activity to check was costly, and in
my example the whole loop took 125 seconds to execute.
By turning it into a set, the same loop takes 0.2 seconds to execute.
When re-constructing the list based on ids to keep the order, using a
set is also faster, and takes another 0.2 seconds instead of 13.6.
closesodoo/odoo#79969
X-original-commit: f994db760b679c8acdaf4245315f89c1d31a9e1c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Because activities_to_check was assigned in each loop, the result was
only containing the last chunk of 1000 records, instead of the whole
result.
This commit fixes the issue by concatenating into the list instead of
just assigning it.
X-original-commit: c06c96655b88cc4df59b8cdd5f05a2f600255c49
Part-of: odoo/odoo#79969
Before this commit, the server was returning the wrong format
for the partner data.
This commit fixes this issue.
closesodoo/odoo#79871
X-original-commit: bf2db96093e955eebb23777c153c6583352cc0e9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, in the rtc call viewer, it was only possible to
focus videos, this commit changes that by allowing to focus any rtc
session.
This is a first step in improving the focusing and layout system.
This commit also changes the call viewer and call participant card
templates to ensure that they remain consistent when focusing non-video
sessions, which also fixes a bug which caused avatars to not be round
when the displayed image had an aspect ratio other than 1.
closesodoo/odoo#79862
X-original-commit: d49407423164c44e86558cd2fc4f6c3ae47aed25
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Steps to reproduce the bug:
- Create a PO
- Remove the Purchase representative
- Send a reminder to confirm the order date
- Open the reminder email and click on No, Upate date
- Choose a date
Bug:
An access error was raised because a user_id is required to create a mail.activity
PS: When passing user_id=False to function activity_schedule, user_id=False was kept when
creating the mail.activity
opw:2638140
closesodoo/odoo#79841
X-original-commit: 14ed4b66c7eafeb7a883484d42437b450801fbb1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, it was possible to lock the transceivers of the
streams when the remote was updating this stream.
This commit fixes this issue.
closesodoo/odoo#79782
X-original-commit: 82c7d6dad5603242e72c45160ac7193e3fb1c350
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, attachment box event handlers where stored inside the attachment box component.
This PR move the handlers inside a dedicated model.
part of task-2579306
closesodoo/odoo#79464
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, granting the video permission when the call had
already ended would generate a traceback.
This commit fixes this issue.
closesodoo/odoo#79715
X-original-commit: 8759220048054e656d02696972d0a3229df508b1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, it wasn't possible to save the volume
of guests, the backend was already implemented but the
feature hasn't been implemented in the frontend, this commit
fixes this issue by completing the implementation.
taskId-2679227
closesodoo/odoo#79714
X-original-commit: 149456839f8379422affb53b7b64c6190b6e9f42
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Issue: When test sending a mail in Marketing Automation Mailings, there
is a traceback because we try to set the state of the mail to done,
even though there is no done in mail_mail.state
Steps to reproduce :
1) Install Marketing Automation
2) Create/select a campaign
3) Access the templates of that campaign
4) Create/select a template
5) Click Test
6) Send Sample Email
-> Traceback
opw-2568210
closesodoo/odoo#79650
X-original-commit: 954c413149befe847a526b54a1fca4c0dd2b16cd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Delete obsolete suggested_recipient_info with isCausal and ensure thread is
required on it.
This is intended to prevent crashing when creating a new partner from a
lead.
Task-2654859
closesodoo/odoo#79619
X-original-commit: fdbbed270d0c266a0e495136b461a4c40f8394bf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>