Wednesday, August 2, 2023
3 changes
Code cleanup and technical improvements
This update streamlines how Odoo finds contacts, email addresses, phone numbers, and countries when sending messages, notifications, or SMS. It reduces duplicated logic across apps, making communication features easier to maintain and more consistent for users.
Original PR description
RATIONALE Simplify field management for mail / phone / sms flows. Make it working out of the box, easier to use and tweak. SPECIFICATIONS Move some helpers used in mail, phone_validation and sms…
RATIONALE Simplify field management for mail / phone / sms flows. Make it working out of the box, easier to use and tweak. SPECIFICATIONS Move some helpers used in mail, phone_validation and sms modules directly at BaseModel level. Those are used to find emails, partners, phone numbers and countries on records when sending them emails, notifications and sms. Improve default behavior of those helpers to cover most existing use case. Remove overrides now covered by standard behavior. Simplify phone / sms methods implementation. It was a bit messy with methods of sms overriding methods from phone. All this code can be simplified now that we have several years of usage in addons to see what people did with those modules. Globally * _sms_get_partner_fields is replaced by _mail_get_partner_fields; * _sms_get_number_fields is replaced by _phone_get_number_fields; * _sms_get_default_partners is replaced by _mail_get_partners; Add a generic phone formatting tool on BaseModel allowing to simplify most calls done to the phone_validation API. Remove custom definitions on some models as it is now available directly. Task-3422449 (Mail, Phone: Move and improve field helpers) Prepares Task-36879 (Mail: Support MultiCompany Aliases)
This update adapts several Enterprise modules to a revised web framework mechanism used for extending behavior. It should not change day-to-day workflows, but it helps keep accounting, appointment, approvals, and related features compatible and maintainable.
Original PR description
This PR is the counterpart of https://github.com/odoo/odoo/pull/125716 task 3410198
This update removes old QWeb-based code from several Odoo Enterprise apps and moves affected screens and widgets toward newer frontend patterns. Users should see little to no immediate change, but the cleanup helps keep appointment booking, knowledge, helpdesk, payroll, social, VoIP, and website features easier to maintain going forward.