*mail,point_of_sale,web_editor,website
In the tests, required services are deployed for each test
independently. There is no need to have, in additon, all services
deployed globally. Worse, it could conflict and lead to unexpected
results.
This commit ensures services are no longer deployed globally in
tests. It turns the module 'web.env' into a declarative module with
no side-effect, by moving the service deployment to main.js, which
isn't added to the tests page.
Task 2287397
closesodoo/odoo#53817
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Some demo messages have a grey background because they have the subtype_id set to
NULL.
The subtype should be `mail.mt_comment`, like other messages inside the general channel.
task-2278438
closesodoo/odoo#54261
X-original-commit: 9be1079cc62699d119b9c2acc6282bd72f71f9af
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Update mail alias layout, makes email address
clickable (mailto) and fix a couple of typos.
Task ID 2287394
closesodoo/odoo#53960
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- Follow button is now correctly aligned in document app chatter overlay
- Topbar does not move up anymore on select Send Message or Log note
task-2287136
closesodoo/odoo#54247
X-original-commit: 6f05705158a7a197945e6720f5ac231ce6932686
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
- Remove no more used ThreadViewer prop : messageListInitialScrollTop
- Remove no more used ChatWindow prop : threadInitialScrollTop
- Rename ThreadViewer field threadCacheInitialPosition to
threadCacheInitialScrollPosition
- Use the scroll position to set message list scroll on mounted
- Fix old test which was not simulating correctly home menu show
- Add tests to check that scroll position is correctly saved even if
ChatWindow is folded
- Fix traceback when showing/hiding home menu with a folded chat window
task-2285691
closesodoo/odoo#54198
X-original-commit: 31123a94c156424b3962fe4aebc3cc60a7a89223
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when clicking on reply in inbox would send a message
whatever the subtype of message the reply is linked to.
This commit makes sure that if the message which we want to reply to
is a note (resp. comment), then the reply will be a note (resp. comment)
task-2282363
closesodoo/odoo#54158
X-original-commit: 27956951eebc7c068a7d57e8bd21c29522f3ff9e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The logs should all be in the same language, s.t. one does not need to
understand multiple languages when browsing/reading the server logs.
closesodoo/odoo#53984
Related: odoo/enterprise#11615
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
_("Foo %s", bar)
to progressively migrate the code to the new syntax.
A few calls were not technically incorrect but still detected by the
linter.
_("Foo" +
"Bar")
has been converted to
_("Foo"
"Bar")
as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).
closesodoo/odoo#53683
Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
1. Generic timesheets improvements
- Portal /my/timesheets
- Add a group bys task, date, employee
- Add search in project, name, employee, task
* The task column should not be visible if none of the timesheets have the Task field set
- If a group by task, date, employee or project is applied, the corresponding column should not be visible
2. Timesheets from sub-tasks on parent tasks
- Portal /my/tasks
- Display the 'Total Hours' spent on a task at the end of the list of timesheets
- Below the list of timesheets for the task, display another table detailing the respective timesheets (and total hours) of each sub-task linked to this task (= 1 table/list per sub-task)
* Title should be: 'Timesheets for sub-task: xyz'
* only visible if there are sub-tasks linked to this task
* only visible if total hours > 0
3. Timesheets on Invoices
- Portal /my/invoices
- Add Project + task fields
* Task field only visible if set on one of the timesheet entries
* Project field only visible if there are at least 2 different projects in these timesheet entries
4. Correct visibility for the portal users
- Portal users is allowed to see timesheets if the users are added in allowed portal users list in the project
- When a portal user is added as the message follower of the project, the user is added to allowed portal users as well
- When a portal user is removed from allowed portal users, the user is also removed from message followers
closesodoo/odoo#47248
Taskid: 2201908
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- emoji button was shifting right on click
- log/send button color was not correct
task-2274349
closesodoo/odoo#53724
X-original-commit: 41a7bb6e9b0c674ca3db5638d17e85f1b3b33f79
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
FIX: use the correct API of mail.channel.py to unfollow a channel
i.e.: `execute_command_leave`
FIX: unpinning a channel has immediate effect on the interface
chatWindows are closed, and the inbox is displayed
FIX: unpinning a channel destroys corresponding chatWindows across tabs
It also unpins the channel in other tabs
FIX: python sends is_pinned as part of the channel_info
both at init messaging and in the main bus notification
That way, we can keep track of the synchronization of the pin status
between JS and python
task-2275000
task-2267941
closesodoo/odoo#53703
X-original-commit: d4fcc64acb2fc0c6fd9df505380f665abd8b39c4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Use case 1:
Arriving in a record
=> The form view is scrolled to the first chatter message
Use case 2:
switch record with the pager
=> The other record is also scrolled to the first message
After this commit, arriving on a record or switching record displays
the top of the form view
task-2238141
PR #53136closesodoo/odoo#53644
X-original-commit: 42605baa5b8ddb94318f5a9d91a489c200469377
Related: odoo/enterprise#11429
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Also moved isLog from composer component prop to composer model field.
task-2280159 & task-2250887
closesodoo/odoo#53645
X-original-commit: ba41b1de5edc2b3153a5b20a4f11778a3f724ade
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit sets attribute sample="1" in a bunch of list and
kanban views, to enable the new sample data feature when views are
empty.
Task 2232801
X-original-commit: 5471309b35619f307242c2704c7681ba63d2be42
Some changes in AbstractModel have been done to ease the
implementation of the sample data feature. This commit reverberates
those changes in other addons.
Part of task 2232801
X-original-commit: dd8069a3c80570e7fa03a80dbb100ab0a182692a
Taking a self and a separate action seems unnecessary given self *is
an action*.
Only do this change for the "new" naming scheme, so the old one keeps
working as-is.
There is no reason to call these directly, in fact it's not really
possible to do so as they expect an `action` object as first
parameter.
* warn against the presence of rpc-public runners
* move runner selection outside of ``run``
* improve doc a bit maybe
The superuser is already used to check whether modules are installed
with demo data and create the notification.
It was not used for accessing the admin partner though, so in the case
where a user is logging in with the password "admin" and with no
access to `partner_admin` it's going to blow up the login process
despite no reason to.
Admittedly this is somewhat difficult to achieve in "standard" odoo,
it was only discovered because 2FA (odoo/odoo#33928) can reach this
point without having a "proper" session set up as that set up is
delayed until after the MFA step has succeeded while
`_admin_password_warn` is part of the redirection flow from the
initial login (user/password input).
closesodoo/odoo#53244
X-original-commit: d18d226084a8b47f2858d8a271886115b29d7b2f
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))
Old syntax is still compatible but starts the migration to the new
syntax that catches error.
- restore "solid" icon
- restore muted style when no notification
- opportunity is taken to fix off-pixel of activity menu
task-2278416
closesodoo/odoo#53094
X-original-commit: 1164b37c5fb33d124ede52356c613b7cd31ac8e1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
PURPOSE
Currently, there is an on-change to set an activity summary to the default
summary of an activity type. This can be useful if types are properly
configured. The problem is, the activity summary will be updated even if there
isn't any default summary on the type. Meaning that it simply removing a
relevant custom summary the user might have already entered.
SPECIFICATIONS
When triggering the on-change on activity_type_id, only update the activity
summary to the default summary if there is a default summary defined on the
activity type.
LINKS
Task-2254825
PR #51373
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Configure a catchall address in Odoo, send an email to that very
address, it should bounce back to the user asking him not to send any
email to the catchall but the email is never sent.
Internally, Odoo reply to the user using the `To` header of the original
email as `From` of the bounced email. It should never use the catchall
address as it is not a valid email to send email from.
closesodoo/odoo#53036
Task: 2277661
X-original-commit: 86c8f0960f709692aa787ae62d446b4427a7c312
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.
From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:
- models, which are logical entities that depict the client-side state of
messaging as a whole.
- components, which are in charge of displaying information from models.
This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.
Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249
Task-1914207
This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.
closesodoo/odoo#39023
Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
PURPOSE
Avoid flickering and incorrect display of warning box in SMS when updating
the number to contact.
SPECIFICATIONS
Currently when an user uses composer to send an SMS, number is validated
at onchange. It leads to two issues
* jump of content as a warning box appears;
* visual warning displayed after user may have clicked on "Send"
button, leading to warning not being useful;
We choose to validate number in real time in order to give directly
a feedback to the user. It also lessens flickering on composer screen.
This is done by allowing to trigger the 'change' event on key down. This
requires a specific onchange_on_keydown option to be used on char field.
LINKS
Task ID 2229050
PR #51159closesodoo/odoo#52962
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adapts tests following recent changes on the helpers.
The main change is that addMockEnvironment (and all functions using
it) are now async, as they need to wait for services to be started.
*bus,mail
This commit extracts the common basis of the env to use both in
the frontend and the backend. The public env now contains most of
the features that were previously (only) in the webclient env.
Moreover, the PublicRoot no longer uses the ServiceProviderMixin,
such that services are only deployed once, in the (public) env.
Owl components can now be defined in the website, and rely on a
properly built env. Legacy widgets still works as they access
services through the PublicRoot (via trigger_up) which redirects
those requests to the env.
Before this commit, when downloading a pdf from the pdfjs viewer, the
name of the pdf was always 'document.pdf'.
Now, the correct name of the pdf is used when downloading the file.
opw-2269841
closesodoo/odoo#52878
X-original-commit: b9cd32a7f19b8f73385dea534ad3cc5b126bc6dd
Related: odoo/enterprise#11109
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Issue
- Install Contacts
- Technical / Email / Subtypes / Discussions
- Uncheck Default
- Go on any contact
- Add an user as follower
- Edit the follower, check any box
- Save
- Re-edit for checking
Not saved
Cause
In mail_followers.py _add_followers method
We do:
```py
new_sids = set(channel_subtypes[channel_id]) - set(sids)
old_sids = set(sids) - set(channel_subtypes[channel_id])
```
If no box are checked, sids value will be [None] instead
of [] (_get_subscription_data) so, new_sids and old_sids
will have a value but old_sids should not, it override
the change we made
We have [None] value because in _get_subscription_data
we use array_agg which returns a list or None if there
are no input rows
Solution
Compute old_sids if sids is not [None]
OPW-2271472
closesodoo/odoo#52869
X-original-commit: b1cdef0272a797fe2c1e5e0634ff400d17480d85
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>