Traceback on the ticket:
https://pastebin.com/mCAFJVWG
A browse should take an id or a list of ids as parameter.
```python
record = env['mail.compose.message'].browse(1)
attachments = env['ir.attachment'].sudo().browse(record.attachment_ids)
print(attachments)
attachments = env['ir.attachment'].sudo().browse(record.attachment_ids.ids)
print(attachments)
```
OPW-2728748
closesodoo/odoo#82664
X-original-commit: 74cfe2bc95827b52232995cd075757f54041d289
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit will change the setting of the emptyMessage and the
footer of the main command palette.
In order to make the command palette footer more customizable, we will
replace it with a Component. For example, using a footerComponent in the
main command palette allows us to adapt its text based on the namespaces
used.
Setting up an empty message:
Before:
```
registry.category("command_empty_list")
.add("@", _lt("No user found"));
```
After:
```
registry.category("command_setup")
.add("@", {
emptyMessage: _lt("No user found"),
});
```
With this commit, it is possible to add a namespace to the footer tips:
```
registry.category("command_setup")
.add("@", {
name: _lt("channels"),
});
```
closesodoo/odoo#82541
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The purpose of this commit is, to add keyboard shortcut
to multiple actions.
So in this commit, added keyboard shortcut to several actions
in project, sale_project, web_calendar and added smart action
in command palette on statusbar.
task-2655790
closesodoo/odoo#79805
Related: odoo/enterprise#22267
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
With the idea of maybe merging the concepts of causal relations and
identifying fields, change the identifying fields so that their inverses
are the only fields with `isCausal: true`.
closesodoo/odoo#82521
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
- Move extra class to field to avoid reliance on specific template.
- Rename prop to be generic.
- Remove extra margin-top in message view outside of thread view (bonus fix).
- Move code using message view component out of message list update to break
infinite loop.
task-2728107
closesodoo/odoo#82415
X-original-commit: c002adeedeffa23190c7853a9d9643da7825ea33
Related: odoo/enterprise#23331
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, attachments in attachment box (chatter) had no
left padding.
Mistakenly introduced by https://github.com/odoo/odoo/pull/80060
which changes classname passing from parent component to child
component with `t-attf-class`. AttachmentCard and AttachmentImage
components did not `t-attf-class` not on root node, which caused
the broken style that this commit fixes.
closesodoo/odoo#82515
X-original-commit: 429bcbcaad5164e9ecf6f518d4e5b0d1ada0bc4a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Previously, relational required fields had their auto-generated inverses
defined with `isCausal: true`, which seemed logical: if a record is
deleted, all the records that depend on it must be deleted too.
In practice, it turned out to be a bad idea since there are some cases
where you don't want the dependent records to be deleted. For example,
there is no point in deleting the current record when a required field
is replaced by another one.
Furthermore, this actually led to the introduction of new bugs, as the
one described in task-2730667.
Fixes bug described in task-2730667.
Reverts some of these changes: https://github.com/odoo/odoo/pull/81679closesodoo/odoo#82437
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This PR make the activity popover test use the mock model and a chatter as
component.
closesodoo/odoo#82143
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Attachments that are uploaded on a record that isn't saved yet are
created with res_id set to 0. In the case of attachments linked through
a m2m rather than the usual (res_model, res_id), it means they may not
be readable afer the creation of the record, except by their creator.
Re-attaching them to the mailing / template at the end of the create()
call fixes the ownership.
Fixes#81935closesodoo/odoo#82120
X-original-commit: 05fb705f2729ffdf07ab36accda20415a44e1aa6
Signed-off-by: Olivier Dony <odo@odoo.com>
Current behavior :
When sending an invoice by email there was 2 signature in the mail
Steps to reproduce :
Create an invoice
Send it by email
Check the mail, there are 2 signatures
opw-2703272
closesodoo/odoo#82347
X-original-commit: 00965df4be591b952b339038c324d7e92596e3d5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
* When a user is already muted when setting their state as deafened
the mute state should remain after the deafen state is removed.
* When a user clicks the microphone (mute/unmute) button while being in
the deaf state, the user should end up undeafen and unmute.
task-2720026
closesodoo/odoo#82197
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit fixes a case where the track could be left enabled when
transitioning from voice activation to push-to-talk (the track would
still properly be disabled on the next release of the push-to-talk key).
part of task-2720026
closesodoo/odoo#82273
X-original-commit: 96804f4eba76ce3c016ae34a9829f88ab8c7e0f3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this PR, the mail_channel/add_member function use multiple _sendone. We
can compile the notifications inside a single sendmany.
Task-2726415
closesodoo/odoo#82198
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit renames the isMuted variable into isSelfMuted to reflect the
user action of self muting, as opposed to the state of being mute,
which will be distinct in an upcoming commit.
part of task-2720026
closesodoo/odoo#82199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, the guest that just connect wouldn't receive the longpolling
message before the current one expire.
task-2664831
closesodoo/odoo#82170
X-original-commit: 0006123dba46d32d062a581e9a16f433f3ce05f3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit temporary id could match an existing attachment id and
replace that attachment by the new uploaded one.
Even if this is very unlikly, using a negative id avoid it completly.
closesodoo/odoo#82185
X-original-commit: c18705d1ced6a9b1d6bb8c33049a1248ae83cf18
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before the PR, when replying to an empty (only attachment) nothing was display
in the message reply preview. This PR introduce a placeholder to handle this
case.
Also taking to opportunity to add missing translations.
task-2664815
closesodoo/odoo#81996
X-original-commit: 60f68512fdc9ebfb2d9331790be5884a86cce67b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Step to reproduce:
- Settings -> Mail channel -> any chat-type channel
- Go to Members
- Add an user
- Refresh the page
Current Behaviour:
- Traceback
- Chat are designed for 2 users and you should not be able to add more
Behaviour after PR:
- Can only edit members of channel if it's not a chat
- User error if try to add more user
- Fix traceback if there is too much users
opw-2717341
closesodoo/odoo#82044
X-original-commit: 85f7b7c1304222966610833dc325bc47f1c13158
Related: odoo/enterprise#23156
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Invalid data provided at record creation were silently skipped by the
framework without triggering an error. This commit ensures that data are
no longer accidentally filtered and therefore that an error will be
raised if a key that does not match an actual field is provided.
This commit also removes the dead code that was detected thanks to these
changes.
closesodoo/odoo#81909
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Bug
===
Since 2d359b909b we moved the mailing
list feature of the <mail.channel> in a different model, <mail.group>.
During this split, some SMTP headers have been forgotten.
Task-2721009
closesodoo/odoo#81887
X-original-commit: daf9c0300fb042891c019e4f2a8c5395de388e1c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In preparation for using OWL v2 in discuss code.
(shouldUpdateBasedOnProps will be removed)
Solution consists of introducing MobileMessagingNavbarView model.
Task-2695743
closesodoo/odoo#80617
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this PR, user could edit notifications message.
task-2713602
closesodoo/odoo#81803
X-original-commit: 45e9f367d583ec8fafdf19c9e5451bdff0e16e62
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The `_insert_followers` wasn't batch in the `create` of `mail.thread`
for no reason, which call the create of a `mail.follower` one by one.
It is inefficient for the batch records creation (import or some
flows) of a model with `_inherit = [mail.thread, ...]`.
Then batch it, to miminize the cost of `_insert_followers`:
The creation of 100 `mail.follower` takes:
- 0.107 sec if you create one by one (before)
- 0.022 sec if you create in batch (now)
Also add two tests (on model with a chatter):
- One testing the behavior of follower and subtype in case of
multi-create
- One testing the number of queries done to create 5 records.
The old SQL request count was 23, now it is 19 (-1 by create
call).
task-2711448
closesodoo/odoo#80954
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
IdentifyingFields and fields marked `required` must have their inverse
with `isCausal: true`. This led to having to systematically declare
inverses on the related models in order to explicitly add `isCausal:
true` to them, even when these inverses are not used for anything else.
This commit automatically adds `isCausal: true` to the inverses
generated by the framework when they are related to required fields or
identifyingFields. Thus, it is no longer necessary to declare inverses
if they are not used for anything else.
This commit also removes all the inverses that are no longer needed
thanks to this change.
closesodoo/odoo#81679
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>