After a refactoring for v11, the id of a newly created thread is not returned
anymore.
Therefore server actions weren't being executed on newly created records.
opw 1886383
closesodoo/odoo#27238
The 'help' of window action is often fiddled with, adding thing before,
after or arround it.
For example in CRM leads, we add at the beginning "Click to add a new
opportunity" with an arrow towards the button, and after if there is a
mail alias: "All email incoming to * will automatically create new...".
But for crm.lead, hr.expense, sale.order this would not take into
account that the fiddled "help" can be edited, so if we edit 2 times
help in studio or backend action editing, we would get:
Click to add a new opportunity
Click to add a new opportunity
Click to add a new opportunity
[Original help content]
All email incoming to * will automatically create new...
All email incoming to * will automatically create new...
All email incoming to * will automatically create new...
And see several "arrows" towards the button (in enterprise the
additional ones are on same color background).
With this commit we do what is done in "mail.thread" by default which is
not fiddling with the `help` if has been fiddled before (if it contains
"oe_view_nocontent_create" class).
note: this is the 11.0 version of #26912
opw-1877663
closes#26911
Have a send email automated action on invoices upon validation (write)
Go onto the credit notes, create one, and validate
Before this commit, at the creation of the attachment (the invoice pdf), there was a traceback
because default_type was in the context containing 'out_refund'
And that attachments also have a field 'type'
So the default_get of the latter got a value that wasn't correct for its field
After this commit, we clean the context of the default_type context key since it
is irrelevant beyond that point
OPW 1868638
closes#26621
On an activity, click Mark as done, the popover pops over
Now write some text in it, but click somewhere else, like to copy/paste something
The popover looses focus, and your text disappears
After this commit, we store the value of the popover when hiding it,
then, when when showing back the popover, the value is reinjected
OPW 1873999
closes#26315
- When a tracked field is modified, a mail.message is created.
When create is called its tries to fill missing values with "default
values".
It first tries to find the default values in the context, which may
occurs.
For example, modifying a tracked field on a subtask will add a key
"default_parent_id" in the context, which is the parent_id of the project.task.
Create will try to use "default_parent_id" for the mail.message
parent_id field, which make the SQL Request invalid.
Steps to reproduce the bug:
- Let's consider the today date = D
- Set on your preference a timezone which has another today date = D+1
- Go to CRM > Configuration > Activiy types > Call
- Set 0 as # Days
- Go to CRM > Pipeline > Click on a lead
- Schedule an activity of type = Call
Bug:
The Due Date = D instead of D+1
opw:1877217
On a SO, write a note to a user
The mail the user receives contains a follow button
Click on it
Before this commit, the link did not add the user as follower of the SO
this was because the wrong uid was passed to the function
After this commit, user is added as follower
OPW 1869849
closes#26634
Following 50ab18176 an access token is added in the URL, but there may
not be an existing access token. If so this commit generate one.
opw-1877347
closes#26526
- In some cases (merge of partners, etc ...) there might be mail.channel
that have two mail.channel.partner with the same res.partner.
When you try to open a discuss window with a partner for which you
have no existing mail.channel.
The channel opened is the one where your partner is duplicated.
This is due to the fact that the SQL request to find the mail.channel
doesn't take in account that a mail.channel may have twice the same
partner.
To fix this issue, we try to exactly match the partners we search.
This commit fixes two issues:
- If a partner has multiple users and if any of these users is a
share user, then the access button on mail notifications is not displayed.
- If a project.task is either assigned or has its stage folded
the access button may not be displayed for certain users.
The users affected by this bug are the one who have their user's
partner is linked to multiple users with at least one flagged as a share user.
- If a database is migrated from an older version to saas-11.3 without
this patch, all the links /mail/view with a message_id as parameter will not work.
We must keep the backward compatibility for those links.
When more than one mail.channel.partner have been linked to a given user, he may
be unable to open some discussion channel because of a traceback.
The issue is that we access a channel_partner field while the recordset is not a
singleton.
We limit the search to 1 to ensure that this recordset is a singleton.