-
- Downloads
[REF] {website_}mail: move and replace published field of mail.message to is_internal
PURPOSE Clean posting process and improve mail.message definition and comprehension. SPECIFICATIONS Website mail defines a website_published field allowing to publish / unpublish comments on the frontend of some modules. This field has several drawbacks : * it is used only for front-end people (portal, public) and has no real effect in chatter / classic discussions; * it is used only in some advanced front-end module and is not available in portal by default; * its naming is not really correct as it is not linked to fields coming from the website_published mixin and its behavior is not really the same; * its use is a bit duplicated with internal flag coming from subtype allowing to hide messages related to an internal subtype; * there are overrides of standard mail.message methods just to handle this flag; In this commit we change that field by an is_internal flag directly on mail.message model itself. It tells if share people (customers, share users) are allowed to read the message. This field can be given through posting API or set manually using widgets. It is also used in access rights custom methods and managed like the internal flag of subtypes. Mailgateway was already using an internal flag for internal note replies. It is renamed to is_internal and propagated as it is now a standard field. It also eases code understanding. Portal is updated to allow managing the flag directly. It means customer portal now natively allows to moderate customer comments without any need of website modules. Rating is updated accordingly. An is_internal field is added, replacing the related on website published. LINKS Task ID 2071556 PR #38692
Showing
- addons/im_livechat/controllers/main.py 1 addition, 0 deletionsaddons/im_livechat/controllers/main.py
- addons/mail/models/mail_message.py 9 additions, 3 deletionsaddons/mail/models/mail_message.py
- addons/mail/models/mail_thread.py 7 additions, 4 deletionsaddons/mail/models/mail_thread.py
- addons/portal/controllers/mail.py 8 additions, 1 deletionaddons/portal/controllers/mail.py
- addons/portal/models/mail_message.py 1 addition, 5 deletionsaddons/portal/models/mail_message.py
- addons/portal/static/src/js/portal_chatter.js 32 additions, 1 deletionaddons/portal/static/src/js/portal_chatter.js
- addons/portal/static/src/scss/portal.scss 12 additions, 0 deletionsaddons/portal/static/src/scss/portal.scss
- addons/portal/static/src/xml/portal_chatter.xml 13 additions, 0 deletionsaddons/portal/static/src/xml/portal_chatter.xml
- addons/rating/models/rating.py 1 addition, 0 deletionsaddons/rating/models/rating.py
- addons/rating/models/rating_mixin.py 2 additions, 1 deletionaddons/rating/models/rating_mixin.py
- addons/website_mail/__manifest__.py 1 addition, 3 deletionsaddons/website_mail/__manifest__.py
- addons/website_mail/models/__init__.py 0 additions, 1 deletionaddons/website_mail/models/__init__.py
- addons/website_mail/models/mail_message.py 0 additions, 58 deletionsaddons/website_mail/models/mail_message.py
- addons/website_mail/security/website_mail_security.xml 0 additions, 13 deletionsaddons/website_mail/security/website_mail_security.xml
- addons/website_mail/static/src/js/portal_chatter.js 0 additions, 13 deletionsaddons/website_mail/static/src/js/portal_chatter.js
- addons/website_mail/static/src/xml/portal_chatter.xml 0 additions, 23 deletionsaddons/website_mail/static/src/xml/portal_chatter.xml
- addons/website_mail/views/assets.xml 0 additions, 1 deletionaddons/website_mail/views/assets.xml
- addons/website_rating/models/rating.py 0 additions, 2 deletionsaddons/website_rating/models/rating.py
- addons/website_sale/models/product.py 1 addition, 1 deletionaddons/website_sale/models/product.py
- addons/website_slides/controllers/mail.py 2 additions, 2 deletionsaddons/website_slides/controllers/mail.py
Loading
Please register or sign in to comment