Commit Graph
13 Commits
Author SHA1 Message Date
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Thibault Delavallée 22a6170a01 [IMP] mail: lint and reorder alias code, add tests
CODE LINT / CLEANUP

Reorder fields definition per main usage: definition, owner, parent, gateway
configuration. Order computed fields accordingly.

Rename some methods (notably constrains), move an inner sanitize method as a
model method to allow its future usage.

Perfom a quick linting of code, simplify some lines.

TESTS

Add some tests related to alias management, notably copy, and multi-company
models using aliases. Those will help when moving to multi-company support
for aliases.

Add tests for current sanitation / cleaning of alias names and alias domain
parameters, to be more precise about accepted / unallowed characters, support
of unicode, ...

Task-3453343 (Mail: Cleanup Alias Usage)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130632
2023-08-09 17:04:24 +02:00
Elisabeth Dickinson 45b9e04db4 [IMP] *: status buttons fix
Part-of: odoo/odoo#116641
2023-05-12 22:59:23 +02:00
Pierre-Yves Dufays c069cf75c7 [IMP] hr,{test_}mail{_group}: warn user when alias model creation fails
Warn user and alias responsible when model creation fails on incoming
message due to alias mis-configuration.

Alias custom default values that references archived or deleted records can
prevent the record to be created when receiving an email.
Unfortunately, correcting values on the fly has too many downsides:
- as the value cannot come from nowhere, we would probably end up with
corrupted record like a task without a project
- as errors are silent, lots of suboptimal record could be created before it
is corrected
- as the code would have to deal with different kind of updates, it would be
heavily depend on the framework meaning additional maintenance cost
- the attempt made had also a performance cost by using savepoint which we
want to avoid

For all those reasons, we have decided to warm the user rather than trying to
solve the problem automatically.
The users are warned:
- through a bounce email sent to the sender and alias responsible
- in the alias interface through an alias status present in the list and the
form view

Technical notes:
- They are multiple kind of errors: error in the message (ex.: user not
authorized to send to a specific alias), error in the alias (ex.: dangling
reference in alias_defaults), other error (ex: technical error like a
service unavailable when receiving the message). Here, we want only to detect
alias error and skip other errors. So rather than doing a big try except around
_message_route_process, we have selected the spot where we should detect alias
error:
-- in _alias_get_error_message where we distinct a message error from an alias
error
-- in inside _message_route_process where record are created using
alias_defaults (custom values with reference to record that might have been
deleted since the alias creation)
- In test, we call mail.thread message_process with sudo as it is the case in
real use case (processed when fetching mail). It is needed as in some test
alias status are modified.

Task-2675209

closes odoo/odoo#101019

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-06 09:25:50 +01:00
Thibault Delavallée 529121247f [IMP] mail: improve mail alias views
Purpose is to improve understanding and modification of alias records in
backend by improving form view.

In this commit we add missing fields in tree view, notably about alias owner.
Add buttons allowing to open the updated thread or the alias owner directly
from tree view to ease daily management of aliases. Cleanup filters.

Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#105992
2022-11-18 13:59:53 +01:00
Thibault Delavallée 76616dc888 [IMP] mail: improve default bounce message
Current bounce message is not very user friendly. Purpose of this commit
is to improve it, by improving wording and overall phrasing used in it.

Form view is improved so that bounce message takes all available width in
form view.

Some tests are added, notably to detect pseudo-void content from editor.

Task ID-2532529
PR odoo/odoo#71793

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-07 06:29:01 +00:00
Thibault Delavallée e72dd61c94 [MOV] mail: move menu definitions in their own file
PURPOSE

Reorganize and lint mail.channel code. Purpose is to ease future modifications
linked to groups and channels in mail / Discuss.

SPECIFICATIONS

Cleanup a bit mail addon by moving menu definitions in their own file
according to guidelines.

LINKS

Prepares Task ID-2070632 (Discuss channel task)
Prepares Task ID-2419762 (SM channel task)
COM PR odoo/odoo#64862
2021-01-21 14:35:05 +00:00
Rémy Voet (ryv) c5e6511e8d [IMP] mail: ease bounce email content update based on alias security
PURPOSE

When incoming emails bounce due to alias security bounce email is quite
generic. Purpose of this task is to ease its customization and update.

SPECIFICATIONS

In order to improve the flexibility of alias, add a customizable html field
on the alias model. This html content will be send as bounce email core content
in case of bounced/unauthorized mail received for this alias,

Obviously it has no effect on 'everyone' security setting as no email will
bounce due to that issue.

If it is not set a default generic mail will be send depending on security
setting. It allows to keep void html fields when no specific bounce content
is required

In HR, an old template allowing some light customization for employee based
security option is removed as it is completely replaced by the new feature.

Also add references message-id of the mail received to the answer so that
threads are correctly set.

LINKS

Task ID 2126509
2020-03-12 13:54:32 +00:00
Thibault Delavallée 65dc880f73 [IMP] mail: add a new entry in technical menu for discuss
Purpose is to lessen size of technical "Email" menu and move some
discuss menu entries in their own menu. It will be the new first menu
entry in technical, before Emails that is more technical.

Some menu items are moved in this new menu, notably followers, messages
or mail blacklist.

Emails menu is also reordered, to have notably all channels related
entries together, ...

Task 2118599
PR #39460
2019-11-07 12:21:32 +00:00
Yenthe666 2809fe4258 [IMP] mail: add icon to smartbutton
closes odoo/odoo#29818
2018-12-29 18:54:48 +00:00
Thibault Delavallée efd55ab8a5 [REF] various: rename openerp node to odoo in xml files 2016-08-10 15:48:10 +02:00
Nicolas Lempereur e765875700 [FIX] form_views: fix button box for new design
Now there should be only one button box per page, and the name should be
"button_box".

Conflicts:
	addons/crm/crm_tip_data.xml
	addons/event/event_tip_data.xml
	addons/fleet/fleet_view.xml
	addons/hr/hr_view.xml
	addons/hr_recruitment/hr_recruitment_view.xml
	addons/project/project_tip_data.xml
	addons/purchase/purchase_tip_data.xml
	addons/sale_crm/sale_crm_view.xml
	addons/website_quote/views/website_quotation_backend.xml
	openerp/addons/base/res/res_partner_view.xml

Conflicts:
	addons/account_reports/views/partner_view.xml

Conflicts:
	addons/claim_from_delivery/claim_delivery_view.xml
	addons/stock/stock_view.xml
2015-06-15 16:30:37 +02:00
Thibault Delavallée 4a975f1b7d [MOV] mail: moved files according to the new module organization 2015-04-27 12:52:45 +02:00