Skip to content

[19.0][MIG] document_page_approval: Migration to 19.0#627

Open
max3903 wants to merge 70 commits into
OCA:19.0from
ursais:19.0-mig-document_page_approval
Open

[19.0][MIG] document_page_approval: Migration to 19.0#627
max3903 wants to merge 70 commits into
OCA:19.0from
ursais:19.0-mig-document_page_approval

Conversation

@max3903

@max3903 max3903 commented Jun 19, 2026

Copy link
Copy Markdown
Member

Migration of document_page_approval to Odoo 19.0 following OCA maintainer-tools guidelines.

Changes applied

  • Bumped version to 19.0.1.0.0
  • Applied 19.0 framework changes (group_ids, env._ translations, removed category_id on groups)
  • Fixed missing raise UserError in action_approve state validation
  • Updated tests to create data instead of relying on demo data
  • Credited Gray Matter Logic; renamed legacy Open Source Integrators references
  • Improved readme fragments in readme/ and regenerated README
  • Updated document_page_approval.pot and all supported .po languages (separate [UPD] commit)
  • Ran pre-commit formatters

Checklist

  • Tests pass
  • pre-commit passes
  • README updated if needed

Made with Cursor

cloutierjo and others added 30 commits June 19, 2026 12:21
(../7.0pageapproval/ rev 1)

fix status bar in page approval
(../7.0pageapproval/ rev 2)

change approval workflow in page history and started to add showing approved page in normal page
(../7.0pageapproval/ rev 3)

show last approved content and aproved by
(../7.0pageapproval/ rev 4)

Fix bug on page creation
(../7.0pageapproval/ rev 5)

add status in history tree view
(../7.0pageapproval/ rev 6)

add a need approval field and hide the workflow when no approval needed
(../7.0pageapproval/ rev 7)

add access validation to approval
(../7.0pageapproval/ rev 8)

give rigth to Page aprover group on the page_history model and hide the button for unallowed group thought the security isn't enforced a the orm level
(../7.0pageapproval/ rev 9)

made invisible the prover group when not needed
(../7.0pageapproval/ rev 10)

add email to aprovers group's members
(../7.0pageapproval/ rev 11)
[ADD] Translation file + french
[FIX] employee_id field does not exist
[FIX] user_email field deprecated
[IMP] Split long lines
[ADD] Images
fix act_draft and minor ui fix

remove unused variables

change order of xml data files
It should work but further errors could help understand what's going

Commented other necessary part

Add back workflow

Add dependency to knowledge
[IMP] - Improved views to match document_page improvements.
[IMP] - Added notification to followers when a new version is approved.
[ADD] - Updated document_page_approval pot and added es translations.
[IMP] - document_page_approval: Updated spanish translation.
* Lint error corrected
* test improved
* lint error corrected in test file
* readme corrected
* test improved
* test of document page history workflow added
* CI error corrected
* dreipst comment
* Migration to new api improved in model's file and data tag remove in xml file
* code totally migrate to odoo 9.0 api
* test bug fixed
* test error fixed
* Lint error improved
* Rename classes and files to match model names, and removed workflow engine.
* Some fields should be readonly if not in draft.
* Allow Knowledge / Manager to edit previous history names and summary
* Improve ux by adding user_has_drafts to document pages.
* Changes because of implementation of active field on document_page
* Add ir.rules for document.page.history
* Allow to quickly cancel&draft from 'to approve' state
* FIX BUG: am_i_approver was being run as sudo(), hence always giving the user Approving rights.
* FIX hooks
  Because of default='draft' on the state field, state IS NULL wasn't selecting anything.
  Left the condition in case this is changed in the future.
 Add the the group eployee to the rule "Change Request Global" to allow to the user with the rule "Change Request Approver" to create pages
[UPD] Update document_page_approval.pot
TT36950

[UPD] Update document_page_approval.pot

[UPD] README.rst
[UPD] Update document_page_approval.pot

[UPD] README.rst

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/
Currently translated at 100.0% (61 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/

Translated using Weblate (Italian)

Currently translated at 100.0% (61 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/
Currently translated at 83.6% (51 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/hr/

Translated using Weblate (Croatian)

Currently translated at 96.7% (59 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/hr/
Currently translated at 100.0% (61 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/
Currently translated at 100.0% (61 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/
[UPD] Update document_page_approval.pot

document_page_approval 16.0.1.1.0

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/
Currently translated at 96.7% (59 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/

Translated using Weblate (Italian)

Currently translated at 96.7% (59 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/

[UPD] Update document_page_approval.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/
Currently translated at 96.7% (59 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/
Currently translated at 95.0% (58 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/es/
Currently translated at 96.7% (59 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/
Currently translated at 100.0% (61 of 61 strings)

Translation: knowledge-16.0/knowledge-16.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-document_page_approval/it/
victoralmau and others added 22 commits June 19, 2026 12:23
Currently translated at 98.3% (61 of 62 strings)

Translation: knowledge-17.0/knowledge-17.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-17-0/knowledge-17-0-document_page_approval/es/
Steps to reproduce the error:
- Modify the content of a page (with a different user).
- Go to the Change request menu and Cancel the change.
- Click on the "Back to draft" button.
- An error will be displayed

TT55569
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: knowledge-18.0/knowledge-18.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_approval/
Currently translated at 100.0% (59 of 59 strings)

Translation: knowledge-18.0/knowledge-18.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_approval/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: knowledge-18.0/knowledge-18.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_approval/
Currently translated at 100.0% (62 of 62 strings)

Translation: knowledge-18.0/knowledge-18.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_approval/sv/
…ry and send mail

Example use case:
- Modify the Odoo Features category, check Require approval, and set Approver group > Administration / Access Rights
- Modify the Marc Demo user and define Document Knowledge > Editor permissions
- Go to the Odoo Features category and, taking into account the ID, delete the mail_message record table with the same ID from the database
- With the Marc Demo user, go to the Knowledge > Odoo Features menu and enter the Odoo 15.0 Functional Demo page (it is important to follow these specific steps)
- Modify the page and save

Before this change, an error could occur because the action https://github.com/OCA/knowledge/blob/0881d75a35e7fc2f814110df4878177e805e589b/document_page/views/document_page_category. xml#L83C17-L83C42 defined a default_parent_id=x (page category ID) if there was no mail_message linked to that category ID; now the value of default_parent_id is removed to avoid this specific error.

TT61290
Currently translated at 98.3% (61 of 62 strings)

Translation: knowledge-18.0/knowledge-18.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_approval/es/
Currently translated at 95.1% (59 of 62 strings)

Translation: knowledge-18.0/knowledge-18.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_approval/sl/
Currently translated at 100.0% (62 of 62 strings)

Translation: knowledge-18.0/knowledge-18.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_approval/fr/
Currently translated at 100.0% (62 of 62 strings)

Translation: knowledge-18.0/knowledge-18.0-document_page_approval
Translate-URL: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_approval/sl/
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@max3903 max3903 added this to the 19.0 milestone Jun 19, 2026
@OCA-git-bot OCA-git-bot added series:19.0 mod:document_page_approval Module document_page_approval labels Jun 19, 2026
@max3903

max3903 commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

/ocabot migration document_page_approval

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.