Daily updates from Odoo
Thursday, June 20, 2024
1 change
Code cleanup and technical improvements
Knowledge-specific editing commands are now separated from the standard editor, keeping the general editing experience simpler across Odoo. Knowledge articles still keep their dedicated commands, while other areas avoid seeing options that only apply to Knowledge.
Original PR description
This PR will refactor the codebase of Knowledge to avoid including in the global wysiwyg instance all blocks that are specific to Knowledge (i.e: the /clipboard, /file, /toc commands) and/or that depend on an article (i.e: the /kanban, /list, /card, /index commands). By doing that, we will avoid cluttering the global wysiwyg instance with functions, options, powerbox entries that are specific to Knowledge. This PR will use the following fields: - `knowledge_html_field`: This field will contain all commands that are specific to Knowledge and that do not depend on an article. People can easily use that field in their modules to enable the Knowledge commands. - `knowledge_article_html_field`: This field will contain all commands that are specific to Knowledge and that depend on an article. Those commands assume that the current record is a record of type `knowledge.article`: Those commands should hence not be used on another model and outside of Knowledge. task-3072864