knowledge icon indicating copy to clipboard operation
knowledge copied to clipboard

[BUG][16.0] document_page: Clicking inside page content creates new version (page history)

Open diggy128 opened this issue 11 months ago • 1 comments

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:

  1. Open a document in knowledge
  2. Click inside the html field (don't click manual save button and navigate away)
  3. 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?

diggy128 avatar Jan 14 '25 07:01 diggy128

It has to do with odoo/#148018

diggy128 avatar Mar 31 '25 18:03 diggy128

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.

diggy128 avatar Apr 21 '25 21:04 diggy128