knowledge
knowledge copied to clipboard
[BUG][16.0] document_page: Clicking inside page content creates new version (page history)
Module
document_page
Describe the bug
Since the record is auto-saved in Odoo v16 onward, clicking inside the HTML content field creates a new page history
To Reproduce
Affected versions: 16.0
Steps to reproduce the behavior:
- Open a document in knowledge
- Click inside the html field (don't click manual save button and navigate away)
- View page history (a new page history has been created. A data-last-history-steps attribute is added in the first p tag)
Expected behavior No new version should be created unless explicitly requested
Additional context I think the trigger comes from document_page.py#L144?
It has to do with odoo/#148018
Closed, as it seems it has to do with the HTML formatting in the field as ported from previous Odoo version. Cleaning markup fixes the issue.