Note that this also add data-oe-model and data-oe-id in XML.
This allow us to avoid to load these links as external URL when
a user receive it in inbox instead of external mail client.
See file addons/mail/static/src/js/thread_widget.js -> _onClickRedirect
Task ID: 1895451
closesodoo/odoo#39958
Related: odoo/enterprise#6414
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Mail contains demo data related to private discussions. However this kind of
use of mail has been removed since several versions. This demo data only
creates noise in mail.message without adding any real demo for any users.
As messages should be linked to existing business documents, existing
demo data in demo channel and additional messages coming in other applications
should be sufficient. Let us remove those demo you can see only in technical
menus.
Task ID 2121319
PR #39907
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Custom CSS should be in style attribute
Closesodoo/odoo#37638closesodoo/odoo#37707
X-original-commit: c1254cca7aae54982d270227d58aad8bdf0a7804
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit adds a new mailbox in the Discuss app called 'History'.
Messages that have been marked as read are moved to 'History'.
Notifications are required to link history messages to users. So
notifications are now deleted after they are more tha 6 months old.
This means History mailbox keeps less than 6 months old messages.
Note that this feature only works when user notifications are handled
in Odoo. This can be set in the user preferences, under the
"Notification Management" section.
Task-ID 402597
Purpose of the commit is when writing feedback on an activity it
doesn't have a line break in it so feedback was printed in a single line.
After this commit feedback will support line break.
Split the line by '\n' in feedback xml template to avoid t-raw.
Avoid `preventDefault` in kanban record when hitting <ENTER> on a textarea.
Task #1965831closesodoo/odoo#33212
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
This commit removes the field `datas_fname` from `ir.attachment` as
it was unnecessary and most of the time the duplicate of `name` or
`url`.
Task #1909865closesodoo/odoo#32976
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
In mail custom layout template display 'best regards' and signature in email
only when user exists and is not odoobot.
Border-bottom style is also now white-listed in sanitizer in order to ease
customization of emails.
Related to task ID 1873634
Linked to PR #28781
This field is a non-sense. By using the same logic, it should be added
to any low level model.
Replace the check by a simple verification of presence of an XMLID.
A more generic opt-in solution should be integrated into ORM.
Partially revert commits 0db0e66e96 and
bbd64c22ab.
See #29257odoo/enterprise#3550closesodoo/odoo#31778
Signed-off-by: Christophe Simonis <chs@odoo.com>
* = base, auth_signup, mail, portal, sale, website, website_sale
Before this commit, sending an object by email would always link to web.base.url
even if the object was created from a specific website.
Now if the object has a website, we use the URL of that website if it is set.
The fallback will always be on the web.base.url.
opw-1921030
PR: #30000
Purpose of the task is to improve the usability of activity types and
activity scheduling.
Another purpose is alto to protect some master data activity types by flagging
them and preventing their deletion.
Containing
* make the activity type as master data so deletion will be prevented;
* improve the usability of the activity type;
* prevent the deletion of activity type which are used for automated activity;
* change the usability of activity scheduling modal;
This commit is linked to task ID 1907970 and PR #29257.
- Install Invoicing
- Multi company Set up with no common contact book
- Create & validate an invoice with user A in company 1
- Change to company 2 with user A
- Connect with user B in company 1
- Send & Print the invoice
An error is raised on the template rendering because user B cannot read
info from user A.
opw-1928676
closesodoo/odoo#30649
opw-1916935
Before this commit, when a next activity was closed, the message said
that the action was performed by the assigned person.
Now, the message say that the action was performed by the person who
closed the activity.
closesodoo/odoo#29678
Do not use the model `_description` field which cannot be translated. Use
the `display_name` of the corresponding model instead.
Moreover, `<t t-esc="'%s' % model_description or 'document'"/>` gives
`'None'`, while `'document'` is expected.
This adds a query to some tests, which is expected since `display_name`
requires information stored in the DB, while `_description` is defined
at the Python level.
opw-1908420
This commit introduces the "upload file" activity type
category. For an activity of that time, uploading a file
will mark the activity as done (and maybe create the forced
next activities).
This activity type is seen as a shortcut to upload a file
with a reminder.
Task-1915004
closesodoo/odoo#29861
Feedback should be the first part of the message without title
to make it more concise.
If the activity has a note, the note should be displayed
but after the feedback.
We can also remove the field feedback that was not so useful
since it was only written just before unlink. Feedback is now
passed as another parameter to the template.
Task: 1918392
closesodoo/odoo#29605
As activities are created using the current user there is no need anymore to
have another field to store the activity creator. We can therefore remove
create_user_id and replace its use by the magic create_uid field.
This commit is linked to task ID 1856417 and PR #27619.
In a multiple company account, when a parter is doesn't have a
company, the mails he revieved have "Send by using odoo" as footer.
This PR correct that by setting the footer to "Send using odoo" when
there is no company.
opw-1894825
Some people do not understand the old forgotten langage coming from R'yleh
sub-city of Helk'Yizrk. Let us use standard naming then.
closesodoo/odoo#28196
Purpose
=======
display_name is equal to doing name_get()[0][1]
Replacing name_get()[0][1] by display_name could be good for 2 things:
- Uniformization of the code
- Probable optimization if name_get is used inside a for loop on a recordset (as the values will be prefetched and put in the cache).
TaskID: 1849250
closesodoo/odoo#26341
The mail template mail_template_channel_send_guidelines should only be used
from send_guidelines action. Anyway, with mail_template on activity
and all demo done to show this mechanic on contacts,
trying to render this one will generate a traceback. This fix
transforms the mail_template to qweb view so that it won't be available in
mail template.
Flow
====
Have one model field responsible of telling when the sales order has to be signed or paid to avoid inconsistencies.
The general rule is: sign & pay are only used upfront to confirm a sales order. If a sales person starts to modify (confirm) it manually, we don't need those features. Especially at that point pay should be done with invoices.
Modal
=====
For the sign, we want to force refresh the page to update its state, and thus we need to show the confirmation message on the reloaded page.
For sign and pay, we changed a bit the structure of the text in the modal to allow to translate it more easily. Also fixed the payment selection by moving it into the body instead of the footer.
For the reject modal, we want the feedback field to be required, so we can see in the chatter by who and why it has been rejected.
Misc
====
Moved remaining bits of code related to preview/pay/accept/decline from sale_management into sale, where it should have been in the first place.
Sales Order:
- Improved status/contextual alerts.
- Hide discount from small to fix responsive.
PR: #26801
task-1876864
remove sales help
Add a data common for all models have the 'decoration'
type set to 'warning' to schedule alert activities.
This can be usefull when activities are generated on
related model changes.
Task #39340
It was possible to define a delay in days on activity type
to reschedule next activity. It is now possible to specify a unit
(days, weeks, months) and a starting point for the delay
(as before, from the moment when the new activity is scheduled,
but also after the deadline of the previous activity).
We realy need to have all javascript action triggering a done
and schedule next to call the python corresponding method on
activities. A part of the work have been there but some
cleaning could still be done in activity.js.
Task: #1870662
PR: #26272
Purpose
=======
- Quickly share the url to someone else (a client, a colleague,...)
- Ensure that the recipient can access at least
the portal view of the shared record.
- Typically used when a client cannot retrieve the mail to access his order.
The share link can be used in this case.
Specifications
==============
For any object inheriting form portal.mixin:
- Add a button SHARE (not visible in edit mode)
- When clicking on this button, a popup opens with :
- A warning message for tasks and projects only (see below)
- the link (like in gmail) that can be copied
- Recipients
- mail composer (with preselected template) ==> see below
- button [Send Link] [Copy Link] Discard
- After sharing document, put internal note like
"Document shared to xyz,...." with template message
- Anyone with the link, even anonymous user (not logged in) can have access
to the document with the access token provided in the url.
Impacted models:
- account.invoice (Community)
- project.project (Community)
- project.task (Community)
- purchase.order (Community)
- sale.order (Community)
- helpdesk.ticket (Enterprise)
Warning messages and access rules:
Allowed :
- SO canceled or draft will be accessible with the link
with access_token
- If the customer account is B2B (signup not enabled), the recipient
will anyway see the document as the user specifically wants the
recipient to see the document.
Restrictions :
- For Project and Task, if the privacy is not public, then, there is a
contradiction between the access_token mechanism
and the privacy of the document.
- A warning message will be displayed in the share wizard to inform the
user if the document cannot be visible by the recipients and to
ask him to set the privacy to 'Visible by following customer'.
The send button will, in that case, be hidden.
- To avoid to block the share for a new project, default privacy value
is now set to 'Visible by followong customer'
Technical implementation
========================
- Move the access_token mechanism (field + methods + mail controller)
to the portal.mixin to be able to use it in a generic way for each object
inheriting the portal.mixin
- Generalise a part of the _*model*_get_page_view_values method
into a single one in portal
- Generalize the _*model*_check_access into the portal controller of the
portal module
- Remove the init_column + default value for the access_token
> old records have an access_token,
> new one won't but it will be generated on demand via the get_access_token
Done for performance reasons
- Add share button into action menu separately. + kanban view context menu
(except for task and project where button not in action menu but 'simple'
button for task and project because other modules already provide action
to send documents by email, which is not the case for project and task.)
- Add a sign_token used to authentify the recipient in the portal view chatter,
if any. The message will be posted as if the user was logged in.
- Set the _get_share_url as private for security reason
- Add a redirect parameter to _get_share_url to get
If false : The direct portal view url
If True : The redirect url (mail/view/?)
- Cleaning up unnecessary code
- Bug fix :
- Before, if user was not logged and record had partner_id,
if partner id was null, post message was done as admin.
Now, the post message is done as public user.
- If the user had an uid but had no access_token, he could be able
to gain the access token of the record.
check_access_rights was missing in the get_access_action.
Task ID : 30985
Closes#25629
Below takes only one 'l', not two. Fix typo in
* tooltip of create button;
* mail demo data;
* comment in stock
This commit is related to task/bug ID 1870964 and closes PR #26099.
When someone assigns an activity to another user it is a good idea to
notify this user a new activity has been assigned to him. This is done
using the message_notify method that sends a notification either in the
Inbox either by email depending on the user preferences.
This commits is linked to task ID 1854820. Closes PR #25265.