1f594ea744463a92b942c20733e9c9012ffbe6f9
When the user creates a new article in Knowledge using a template, the system shows a dialog indicating that there is a conflict between the client and the server. This commit will ensure that the conflict dialog won't show up when the document does not have any versioning yet. Steps to reproduce the issue: 1. Go on Knowledge 2. Open the editor 3. Click on the "Browse Template" button 4. Choose a template 5. Click on the "Load Template" button Justification --- When the editor is started, the system generates a new snapshot with ids generated randomly (see: constructor of `OdooEditor`, `historyReset`, `_historyGetSnapshotStep`). When checking if the document is "stale" (i.e: out of sync), the system verifies the existence of a history step with the id specified in the `data-last-history-steps` attribute of the first node of the document (see: `_isLastDocumentStale`). If such a history step does not exist, the client document is considered "stale" and will be discarded. The `data-last-history-steps` attribute is set by the last writer when saving the document. When creating an article from a template, the server generates a new record and copies the template's body in the article's body. The system does not set any `data-last-history-steps` in the document. As a result, the document will be considered "stale" when opening the article and a conflict dialog will warn the user that the current document will be discarded. This commit will update the `_isLastDocumentStale` function to ensure that a document that has not been versioned yet won't be considered as "stale". The `data-last-history-steps` attribute will then be set when the user opens the article and save it. task-3587990 closes odoo/odoo#143194 X-original-commit: 69e7694580ae20bb21de1316de5aa770e7ed8eed Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com> Signed-off-by: Julien Banken (jbn) <jbn@odoo.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%