This reverts commit fbd30f4266d86b53aa4b13b72a93bccee0d7eb69. Indeed kwargs
are used to build a link, meaning message value are given to some links when
using message_notify.
A better fix will be provided soon. Reverting to avoid issues in stable.
closesodoo/odoo#61632
X-original-commit: e861f7294a7bd6bde056b987f15e48df4b0ab877
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
That should fix all detection issues once and for all.
task-2366680
closesodoo/odoo#61528
X-original-commit: cf6961fba38ed619bf7bfb908c3aadde0f694648
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Escaping the match name is escaping an already escaped string from
`postMessage`. How ever we need to escape the string from
`this.mentionedPartners` and `this.mentionedChannels` since they are matched
with an escaped string.
This fix the bug when mentionning a channel with `&` in it's name.
task-2366680
PR https://github.com/odoo/odoo/pull/60593
X-original-commit: fecd2b28309b0fa4e5ecb8c7d26f6a335036e740
Behavior prior to this commit:
When editing a lead, if we log a note, it will refresh the record and
cause the changes to be lost. In version 13, it would only refresh the
record if `@` mentions were added.
Behavior after this commit:
The record will only refresh if it is not dirty.
Note:
It is not clear why the record would in fact ever need to refresh
as there is no visible change on the lead form when a note is logged,
whether or not followers are added (the message thread, which shows the
number of followers, refreshes regardless). In this commit I chose the
approach which would cause the least change. There is still a need for
a longer term solution to orchestrate the refreshes, which will take
place once the rest of the web application is converted to use Owl.
opw-2369162
closesodoo/odoo#61503
X-original-commit: 6d7058679869ba03e164993687c21b0bae12822d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
Issue
- Install "Approvals"
- Submit new approval with you as "Request Owner"
- Click on "View Approval Request" in your mailbox
The link redirects to a 505 error
Cause
The model is not the correct one and the res_id is undefined
Solution
Specify the model and the res_id to _notify_get_action_link
when creating the link with kwargs
opw-2358846
closesodoo/odoo#61478
X-original-commit: 075325226d6f7c2af638013f25613ddd391e506b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
Purpose
=======
Make the "activity_state" searchable on the "mail.activity" mixin.
This field is not stored as it depends on the current time.
Technical
=========
To make the search, we perform a SQL query.
The "activity_state" depends on the state of each activities on the
record. And this state also depends on the timezone of the user of
the activity. That's what made things tricky and we need to make the
conversion in SQL for performance purpose (we can not fetch all records
and compute them in python).
There's a special case, where there's less than 24 hours between the
deadline and the current time but one day of difference. In that case
the state should be "planned" and not "today". This case is handle by
the function "DATE_TRUNC" (e.g. 23h 01/01/2020 & 1h 02/02/2020).
Also for performance purpose, we compute the delay only once and we use
the function "SIGN" so we can use a switch/case instead of duplicating
3 times the expressions.
Task 2354754
closesodoo/odoo#60074
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:
- Create an opportunity without a customer but with a phone number
- Send a sms
- Refesh the page
Bug:
A traceback was raised because an entry is created in mail_message_res_partner_needaction_rel
with partner_id = False
Due to https://github.com/odoo/odoo/blob/14.0/addons/sms/models/mail_thread.py#L327
A mail.notification is created from a sms even if there is no partner set on the sms
opw:2372201
closesodoo/odoo#61425
X-original-commit: 651da2fe8694ed0003a9dd0801c71f2ef26cedb9
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Issue
- Install live chat and website
- In incognito mode, send a message via live chat (as public user)
- Log in the database
Erro: Record does not exist or has been deleted. (Record: res.partner(-1,), User: 2)
Cause
Guest with negative id are sent to the server
Solution
Don't send negative id
opw-2371677
closesodoo/odoo#61407
X-original-commit: 5dfd793470deed9ab459ccb2d747511213bc5bf9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Purpose of this commit is to allow to attach moved messages from a thread
to a new parent. This allows notably to keep references if message
hierarchy is not kept as it is.
LINKS
Task ID-2083049
COM PR odoo/odoo#49129
ENT PR odoo/enterprise#9715
UPG PR odoo/upgrade#1883
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Changed ValueError to UserError and return to raise so the user get a popup to
explain that this filter value is not supported instead of a traceback
task-2352688
closesodoo/odoo#61213
X-original-commit: f9ab590cd961026865808f4008bd45fc2afb6bed
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Due to mentions being positioned inside thread view and messaging list (when in
chat window) and those two elements having `overflow: auto`, it is necessary to
give mentions an appropriate max height to prevent overflow.
This makes it necessary to add a scrollbar to the mention list, which makes
scrolling into view of active item necessary when navigating with the keyboard.
Also removed activating item on mouse over to prevent activation of wrong items
when navigating with keyboard if the cursor is unfortunately over another item.
task-2275828
closesodoo/odoo#61084
X-original-commit: 85384dd0bb8de5e98e585cb8610d58b11e601520
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This causes more trouble than it's worth, especially with mobile keyboards.
It also prevents from selecting any text in chat window threads.
task-2372553
Part of task-2277543
closesodoo/odoo#61078
X-original-commit: 4ec26d985f33e1fa391c312b89fc611b8d688c96
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
also fix a problem with composer.hasFocus field not always correctly
updated (e.g. when switching from a channel to another in discuss)
task-2278915
closesodoo/odoo#61007
X-original-commit: ecb56a6893dd7b76402c2262fb93f8dea079fde0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the state of the composer was not properly saving
its state when focusing out, which caused erroneous composer states
in some corner cases, like when posting messages on mobile in some
browsers. This commit fixes this issue.
opw-2366374
closesodoo/odoo#60913
X-original-commit: 8e79fefdb9990a6480fdae2684e07799e5439b06
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Don't delay the insert of partners or channels until it actually takes too much
time.
Don't await `_initMentionPartnerSuggestions` as it is just nice to have.
task-2371485
closesodoo/odoo#60911
X-original-commit: e78805fc3ae9b5dbbf72667e5bd62e5c5346cc53
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
PURPOSE
we need to pass empty context so it can be overriden in session.js. we should be
able to not specify any context and let session handle it.
SPECIFICATION
- removed empty context from thread rpc
- as there is already managed empty context in session, so no need to manage
empty context in rpc
LINKS
Task 2243187
PR https://github.com/odoo/odoo/pull/54512closesodoo/odoo#54512
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Issue
- Install "CRM"
- Create new lead
- Set X to customer
- Send a log note
X receives log notes by mail
Reproducible on Project and CRM
Cause
The customer sends a list of partners who will receive an email
even when it is a log note
Solution
Send the list of partners only when it is an email and not a log note
opw-2369280
closesodoo/odoo#60855
X-original-commit: 4e660dfdf40a36eed7123bcea2452874238fddd8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
PURPOSE:
It often happens that someone will send you a message, but you don't actually
know who is the person within the company. In this context, it would be
practical to have direct access to that person's public user or employee form
in order to get more information.
SPECIFICATIONS:
on hover, display the name of the user is bold + underlined
if the user clicks on the name, redirect to:
- the employee form if the hr module is installed and if the user is
linked to an employee
- else redirect to the partner form
LINKS:
closes https://github.com/odoo/odoo/pull/58754
task 2252924
closesodoo/odoo#58754
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, completing an activity that was automatically
generating new activities was causing a crash as no action is returned
when they are completed.
This commit fixes this issue by handling the case where no action is
returned.
opw-2361674
closesodoo/odoo#60732
X-original-commit: ce6f6fb4e04746d28e1b959d50f50a855c7a3049
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit adds a test for the fix odoo/odoo/pull/58769 that
ensures that the chatter is properly cleared when creating a new record.
task-2348472
closesodoo/odoo#60731
X-original-commit: 5e46850072f142fb17b72d8738dc4f1c60e3a786
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR has 3 parts:
The members fix itself, which is necessary for performance reasons especially
at init messaging, as per described in the task.
Adding the partner name in the typing payload, because due to not knowing all
members anymore, it is necessary to properly display who is typing.
Restrict restoring scroll position only if the corresponding scroll height is
available, to make the scroll feature and particularly the corresponding tests
more robust.
task-2360020
closesodoo/odoo#60616
X-original-commit: 91ce61ba568d83190e7ed2c168fd56101474683b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, archived and deleted partners had not their
im_status being updated automatically. There were some issues
with this, notably:
- odoobot 'bot' status was not displayed in chatter
- im_status of partners becoming archived were not updated.
This commit fixes both issues.
task-2329591
closesodoo/odoo#60567
X-original-commit: 63b081c49da089c839479b807de8c0cea45221da
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit gives to o_Dialog the same z-index as modals, before
this commit, the dialog could be hidden or partially obstructed
by other elements.
part of task-2171884
closesodoo/odoo#60440
X-original-commit: b4de3c4e34500c9d4e3e2eef68c880643953f2ff
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.
Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-> /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).
closesodoo/odoo#60228
X-original-commit: 7ac08486d91d0ff0151abeeda057ffa6beda72e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This fix allows to send an invalid command as a normal message
to have it displayed in the messages list.
closesodoo/odoo#60191
Task-id: 2360504
X-original-commit: a748f66857d659db1a47d6c8ee6e4ac0c21d0361
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit:
When editing the activity, traceback while processing with buttons
"Done & Schedule Next", "Mark as Done" from the form view.
This is happening because when we process with these buttons it complete
the action of respective buttons and then the trigger will go on the close
window. Hence, we don't have activity data as "mark as done" remove
the activity.
After this commit:
Footer buttons will be processed as expected without any traceback.
Task-2357681
closesodoo/odoo#60174
X-original-commit: 623c5176a37ae5fd048d6bb10e742fac5caa6cf2
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit:
We have a new feature that if the course is private, and attendee make the
request to access the course it will create an activity for 'course responsible'.
Currently, after accepting the invitation request from the new user, it is still
not considered the user as an attendee and not displaying like 'You're enrolled'
to the respective users
After this commit:
The features of access invitation on courses will be workable.
Task-2328389
closesodoo/odoo#60135
X-original-commit: becf051f38fcf08d4a0aea758cb2758ad0f25bc3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Issue
- Install "Project" module
- Go to the chatter of any Task
- Log the following message (by selecting the partner) then send:
"test@test.com
@marc Demo "
Message is not sent.
Cause
When parsing the content, the match result is "@test.com\n@Marc Demo" due
to no space between the two mentions
Solution
Add space after line break (only when parsing selection).
In this case, it will match with 2 mentions instead:
"@test.com\n" and "@marc Demo "
For _generateMentionsLinks step, add a space after '</br>',
it will match 2 mentions but we remove the ones that end
with '</br>'. This last fix is to avoid having a non-mention
string containing '</br>' (for example), and therefore not
having them escaped in final message content.
opw-2322577
closesodoo/odoo#60128
X-original-commit: 8f12c025e05e5a3a7cf3c5fa8c2696ec99e2fa07
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit:
When accessing activities from the systray, any existing breadcrumb-item should
be clearer.
After this commit:
Clear breadcrumb-item when access activities from the systray.
Task-2342246
closesodoo/odoo#60018
X-original-commit: a9b32448c4a6227ef8e729436cb793ea9c24c289
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>