Sunday, April 14, 2024
2 changes · master
Code cleanup and technical improvements
This update streamlines the internal code behind Discuss, messaging, activities, attachments, and live chat by moving responsibilities from separate services into the relevant data models. It should make future maintenance easier and reduce complexity, with little to no direct change expected for end users.
Original PR description
Discuss code is more complicated than it should. Part of it comes from split in arbitrary services, which are both confusing and very verbose. This commit removes the `mail.activity` service: related features have been moved to the appropriate model. For example: ```js await this.env.services["mail.activity"].edit(activity); // => await activity.edit(); ``` https://github.com/odoo/enterprise/pull/60419
This change reorganizes internal communication features so actions like editing messages, activities, attachments, and chat windows live directly on the relevant records instead of separate services. It should make the Discuss-related code easier to maintain and reduce complexity across connected apps without changing the intended user experience.
Original PR description
Discuss code is more complicated than it should. Part of it comes from split in arbitrary services, which are both confusing and very verbose. This commit removes the `mail.activity` service: related features have been moved to the appropriate model. For example: ```js await this.env.services["mail.activity"].edit(activity); // => await activity.edit(); ``` https://github.com/odoo/odoo/pull/161286