-
- Downloads
[REF] mail, various: improve mail creation calls, notably author and email from default computation
Purpose of this commit is to correctly compute author_id and email_from in mail_message and mail_mail as they depends from each other. Moreover it is a good idea in various flows to specify email and author when giving creation values to avoid default computation that is not always guaranteed to be accurate notably when involving super user. Mail message creation could lead to desynchronized values between author and email_from. This is improved with this commit by correctly inheriting from default_get and computing both of them at the same time instead of having two default values. Indeed they depend on each other. Same thing is done for mail composer. Mail Thread offers a tool method to find email_from / author_id based on having one of those values or current user and it is called whenever necessary. Some calls to mail template send_mail are also cleaned. Task ID 1853147 PR #32243
Showing
- addons/auth_signup/controllers/main.py 1 addition, 4 deletionsaddons/auth_signup/controllers/main.py
- addons/auth_signup/data/auth_signup_data.xml 1 addition, 1 deletionaddons/auth_signup/data/auth_signup_data.xml
- addons/auth_signup/models/res_users.py 2 additions, 1 deletionaddons/auth_signup/models/res_users.py
- addons/hr_expense/models/hr_expense.py 2 additions, 0 deletionsaddons/hr_expense/models/hr_expense.py
- addons/im_livechat/models/mail_channel.py 2 additions, 1 deletionaddons/im_livechat/models/mail_channel.py
- addons/mail/models/mail_channel.py 4 additions, 1 deletionaddons/mail/models/mail_channel.py
- addons/mail/models/mail_message.py 19 additions, 22 deletionsaddons/mail/models/mail_message.py
- addons/mail/models/mail_thread.py 3 additions, 0 deletionsaddons/mail/models/mail_thread.py
- addons/mail/wizard/invite.py 4 additions, 1 deletionaddons/mail/wizard/invite.py
- addons/mail/wizard/mail_compose_message.py 8 additions, 8 deletionsaddons/mail/wizard/mail_compose_message.py
- addons/mass_mailing/models/mailing.py 2 additions, 2 deletionsaddons/mass_mailing/models/mailing.py
- addons/mass_mailing/wizard/mailing_mailing_test.py 2 additions, 2 deletionsaddons/mass_mailing/wizard/mailing_mailing_test.py
- addons/payment_paypal/models/payment.py 2 additions, 1 deletionaddons/payment_paypal/models/payment.py
- addons/website_slides/models/slide_slide.py 11 additions, 3 deletionsaddons/website_slides/models/slide_slide.py
Loading
Please register or sign in to comment