Wednesday, March 22, 2023
5 changes · master
Code cleanup and technical improvements
This update reorganizes the internal code that powers selectable suggestion lists in Odoo Mail, such as composer mentions and discussion selectors. It should make future maintenance easier while preserving the existing user experience for email and chat interactions.
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Project app's internal files have been reorganized so each business object has its own model and view file. This does not introduce new user-facing features, but it makes the codebase easier to search, maintain, and update safely over time.
Original PR description
This PR aims to create a separate file per model, in folders "models" and "views", to ease grepping. In order to keep the history, it contains to commits. The first one just moves/copies the files (e.g.: $ cp project.py project_task.py $ mv project.py project_project.py ). The second one update the content of each file to only keep the contents it is supposed to be containing. task-3234479 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Forum module has been reorganized so its code, data, views, templates, and tests are easier for Odoo teams to find and maintain. This is mainly an internal cleanup that prepares the module for future improvements, with a few small performance and code-quality refinements included.
Original PR description
PURPOSE Reorganize website_forum module. This allows to better locate code, understand organization, and prepare future changes. SPECIFICATIONS Split python files / model. It is easier to have a…
PURPOSE
Reorganize website_forum module. This allows to better locate code, understand
organization, and prepare future changes.
SPECIFICATIONS
Split python files / model. It is easier to have a global view of a module
organization and content when looking at the models directory. Each model
now belongs to a single file.
Do the same with data, views.
Split templates by main usage. Files have been duplicated previously, they
are now cleaned to keep only content relevant to their usage. Split is done
according to
* base file: layouts for main actions not specifically managed in other
sub-files: display a forum, manage tags, post a new question or edit
a question;
* '_forum_all': 'all' page in multi-forum display, displaying the list of
available forum;
* '_layout': layouting templates. Modifications to global layout and forum
specific page header used through all main templates;
* '_moderation': moderation tools;
* '_post': display a forum post;
* '_tools': tooling and utility blocks, used as black boxes in various
main templates;
Rename other files according to guidelines.
Reorganize main content of python code
* group compute fields on top, order them following fields definition;
* add section separators, to separate compute methods / CRUD methods /
business methods / Mail methods / Tooling in file and have a way to
sort a bit the code out;
* rename compute methods to start with '_compute', to match guidelines
and be coherent with global odoo naming;
* perform some relining in fields definition, don't enforce any char
length but try to stay aligned with Odoo apps;
Finally, provide some fixes or code improvements (batch, performance,
poorly written or named code) that are quick-wins.
LINKS
Task-3240082 (Forum: Reorganize and lint module)The project-related manufacturing, purchasing, SMS, and expense add-ons have been reorganized so each business object has its own file. This does not change features for users, but it makes the codebase easier to navigate and maintain, helping future updates move faster with lower risk.
Original PR description
This PR aims to create a separate file per model, in folders "models" and "views", to ease grepping. In order to keep the history, it contains to commits. The first one just moves/copies the files (e.g.: $ cp project.py project_task.py $ mv project.py project_project.py ). The second one updates the content of each file to only keep the contents it is supposed to be containing. task-3244226 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The forum-related helpdesk modules were reorganized so code and templates are easier to find and maintain. This is an internal cleanup that prepares the forum area for future improvements without changing day-to-day user workflows.
Original PR description
PURPOSE Reorganize website_forum module. This allows to better locate code, understand organization, and prepare future changes. Task-3240082 (Forum: Lint module)