Skip to content

Conversation

@ivantodorovich
Copy link
Contributor

@ivantodorovich ivantodorovich commented Feb 28, 2018

This PR introduces these changes to document_page and document_page_approval.
It's intended to improve document managing workflow, specially in the use-case of OCA/management-system

User experience changes

  • Added alerts to let the user know what's going to happen if he edits the document
  • It's now possible to add comments (summary) to each review.
  • Change requests (history) have a more complete workflow
  • Added a template field to be used as a template for categories.
  • diff is now css-styled and shown on email notifications
  • diff can also be viewed from the history
  • Improved several views

Security

  • Introduced new user groups for better security.
  • Approvers need to be members of Approver's group.

Backend changes

  • Cleaned up code according to OCA Guidelines.
  • display_content is deprecated. Replaced with just content as a computed field.
  • History is now deleted oncascade with pages.
  • diff is now a computed field, not just a wizard.
  • diff is now a little bit more readable by hacking in some new lines.
  • name_get for document.page.history
  • Pages that don't require approval still go through the workflow but gets auto-approved
  • On install, document_page_approval sets all previous history to approved
  • On uninstall, it deletes all non-approved history (change requests)

Screenshots

image

image

image

@ivantodorovich
Copy link
Contributor Author

ivantodorovich commented Mar 1, 2018

@max3903 I've noticed you've migrated this modules to 10.0.
Would you please take a look a this? I don't mind migrating this changes to 10.0 if it gets approved.

@max3903 max3903 requested review from dreispt and max3903 March 1, 2018 14:52
Copy link
Member

@max3903 max3903 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

1 pull request for each module would have been nice and easier to review the code.

@ivantodorovich
Copy link
Contributor Author

Yes, you are right. Sorry about that.

…mputed where possible.

Fix search views, store some fields to make them searchable, added filters
for page in self:
if page.type == "category":
display_content = self._get_page_index(page, link=False)
@api.multi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use api.depends for this compute field.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's not stored, I think it's not actually needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just checked and indeed I've already added depends here: dbeec6e

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaoral where you able to look at this?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivantodorovich yes thank you for apply the api.depends. LGTM

rec.display_content = rec.content

@api.multi
def _compute_content(self):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

create_uid = fields.Many2one('res.users', "Modified By")
diff = fields.Text(compute='_compute_diff')

@api.multi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivantodorovich I think we still need an api.depends here, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's not stored, it's actually not needed.
Function gets called every time you access the field.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case, just added it.

@ivantodorovich
Copy link
Contributor Author

Is this ready to merge or do we need more reviews?

@max3903 max3903 merged commit 96256b9 into OCA:9.0 Apr 12, 2018
max3903 added a commit that referenced this pull request Apr 16, 2018
[10.0][IMP] document_page: Change Requests and workflow improvements on documents (#155)
max3903 added a commit that referenced this pull request Apr 24, 2018
…proval

[IMP][10.0][document_page_approval] Change Requests and workflow improvements on documents (#155)
GavyMG pushed a commit to vauxoo-dev/knowledge that referenced this pull request Jun 20, 2018
GavyMG pushed a commit to vauxoo-dev/knowledge that referenced this pull request Jun 20, 2018
GavyMG pushed a commit to vauxoo-dev/knowledge that referenced this pull request Jun 20, 2018
GavyMG pushed a commit to vauxoo-dev/knowledge that referenced this pull request Jun 27, 2018
pedrobaeza pushed a commit to Tecnativa/knowledge that referenced this pull request Jun 27, 2018
GavyMG pushed a commit to vauxoo-dev/knowledge that referenced this pull request Jun 27, 2018
GavyMG pushed a commit to vauxoo-dev/knowledge that referenced this pull request Jun 27, 2018
josemoralesp pushed a commit to Vauxoo/knowledge that referenced this pull request Jul 9, 2018
* [UPD] README.rst

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 93.9% (31 of 33 strings)

Translation: knowledge-11.0/knowledge-11.0-knowledge
Translate-URL: https://translation.odoo-community.org/projects/knowledge-11-0/knowledge-11-0-knowledge/pt_BR/

* [ADD] document_page from odoo/7.0

* use new API

* [FIX+IMP] document_page:

* Add dependency to knowledge
* Adding hack in document_page_history to allow calling method that don't exists
* document_page_history don't have _sql attribute
* Filter more fields

* Slovene translations added

* [FIX+IMP] document_page:

* Changed history widget to html.
* Improved views and added followers to pages.
* Updated document_page pot and es translations.
* document_page:^Cissing dependency.

* Translations sync with templates

* [MIG] document_page: Migration to 9.0

* [MIG] document_page: Migration to version 10.0 (OCA#120)

* [MIG] Migration to version 10.0
* [FIX] Comments and CI errors
* [FIX] ValueError: External ID not found in the system: base.menu_base_partner
* [FIX] ValueError: Wrong value for ir.actions.act_window.target: 'inlineview'
* [FIX] Based on @lasley comments
* [FIX] External ID not found in the system: base.group_document_user

* [IMP][10.0][document_page] Change Requests and workflow improvements on documents (OCA#155)

* OCA Transbot updated translations from Transifex

* [MIG] document_page: Migration to 11.0

* [MIG] document_page: Migration to 11.0

continue migration

* [UPD] Update document_page.pot

* create document_page_approval module
(../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)

* [IMP] Documentation
[ADD] Translation file + french
[FIX] employee_id field does not exist
[FIX] user_email field deprecated

* [IMP] Split long lines

* [ADD] Images

* Fix pep8

* Set document_page_approval as unported

* Slovene translation added

* [IMP] - Changed string from email template.

* [FIX] - document-page-approval: Fixes OCA#60 url not valid when website module is installed.

* [UPD] prefix versions with 8.0

* [MIG] Make modules uninstallable

* OCA Transbot updated translations from Transifex

* [FIX] remove en.po that was erroneously created by transbot

* [MIG] document_page_approval

* [IMP][10.0][document_page_approval] Change Requests and workflow improvements on documents (OCA#155)

* [FIX] View

* remove obsolete .pot files [ci skip]

* start porting

fix act_draft and minor ui fix

remove unused variables

change order of xml data files

* Comment workflow that cause the error

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.

* Translations sync with templates

Translations and templates sync

Updated languages

* document_page_approval migration from Odoo 8.0 to Odoo 9.0

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

* [MIG] Make modules uninstallable

[MIG] Rename manifest files

* [ADD] setup.py

* [MIG] document_page_approval: Migration to 11.0

* [UPD] Update document_page_approval.pot
@ivantodorovich ivantodorovich deleted the 9.0-changerequest branch September 15, 2018 16:14
MiquelRForgeFlow pushed a commit to ForgeFlow/knowledge that referenced this pull request Mar 12, 2019
pedrobaeza pushed a commit to Tecnativa/knowledge that referenced this pull request Aug 23, 2019
ernestotejeda pushed a commit to Tecnativa/knowledge that referenced this pull request Nov 7, 2019
ernestotejeda pushed a commit to Tecnativa/knowledge that referenced this pull request Nov 7, 2019
ernestotejeda pushed a commit to Tecnativa/knowledge that referenced this pull request Nov 8, 2019
flachica pushed a commit to flachica/knowledge that referenced this pull request Mar 18, 2020
flachica pushed a commit to flachica/knowledge that referenced this pull request Jul 4, 2020
flachica pushed a commit to flachica/knowledge that referenced this pull request Jul 5, 2020
flachica pushed a commit to flachica/knowledge that referenced this pull request Jul 15, 2020
PierrickBrun pushed a commit to akretion/knowledge that referenced this pull request Dec 30, 2020
dzungtran89 pushed a commit to dzungtran89/knowledge that referenced this pull request Feb 22, 2021
filoquin pushed a commit to filoquin/knowledge that referenced this pull request May 30, 2021
filoquin pushed a commit to filoquin/knowledge that referenced this pull request May 30, 2021
dzungtran89 pushed a commit to dzungtran89/knowledge that referenced this pull request Jul 6, 2021
llabusch93 pushed a commit to archeti-org/knowledge that referenced this pull request Aug 18, 2021
jacob88 pushed a commit to jacob88/knowledge that referenced this pull request Oct 29, 2021
llabusch93 pushed a commit to archeti-org/knowledge that referenced this pull request Dec 13, 2021
BernatPForgeFlow pushed a commit to ForgeFlow/knowledge that referenced this pull request Dec 24, 2021
jacob88 pushed a commit to jacob88/knowledge that referenced this pull request Dec 24, 2021
victoralmau pushed a commit to Tecnativa/knowledge that referenced this pull request Jul 26, 2022
FernandoRomera pushed a commit to MallorcaSoft/knowledge that referenced this pull request Dec 5, 2022
FernandoRomera pushed a commit to MallorcaSoft/knowledge that referenced this pull request Dec 13, 2022
Tisho99 pushed a commit to sygel-technology/knowledge that referenced this pull request Mar 19, 2024
EdgarRetes pushed a commit to ursais/knowledge that referenced this pull request Oct 2, 2024
natuan9 pushed a commit to natuan9/knowledge that referenced this pull request Nov 4, 2024
jdoutreloux pushed a commit to jdoutreloux/knowledge that referenced this pull request Nov 7, 2024
victoralmau pushed a commit to Tecnativa/knowledge that referenced this pull request Nov 12, 2024
BhaveshHeliconia pushed a commit to HeliconiaIO/knowledge that referenced this pull request Feb 17, 2025
BhaveshHeliconia pushed a commit to HeliconiaIO/knowledge that referenced this pull request Feb 28, 2025
BhaveshHeliconia pushed a commit to HeliconiaIO/knowledge that referenced this pull request Dec 29, 2025
BhaveshHeliconia pushed a commit to HeliconiaIO/knowledge that referenced this pull request Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants