mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-27 19:08:42 -06:00
port 17.0
This commit is contained in:
parent
acebd9ca3b
commit
25f10c1629
@ -2,7 +2,7 @@
|
|||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
{
|
{
|
||||||
"name": "Attachment Zipped Download",
|
"name": "Attachment Zipped Download",
|
||||||
"version": "16.0.2.0.0",
|
"version": "17.0.2.0.0",
|
||||||
"category": "Tools",
|
"category": "Tools",
|
||||||
"website": "https://github.com/OCA/knowledge",
|
"website": "https://github.com/OCA/knowledge",
|
||||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
{
|
{
|
||||||
"name": "Documents Knowledge",
|
"name": "Documents Knowledge",
|
||||||
"version": "16.0.1.1.0",
|
"version": "17.0.1.1.0",
|
||||||
"author": "OpenERP SA,"
|
"author": "OpenERP SA,"
|
||||||
"MONK Software, "
|
"MONK Software, "
|
||||||
"Tecnativa, "
|
"Tecnativa, "
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||||
<field name="priority" eval="90" />
|
<field name="priority" eval="90" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
<xpath expr="//form" position="inside">
|
||||||
<div
|
<div
|
||||||
class="app_settings_block"
|
class="app_settings_block"
|
||||||
data-string="Knowledge"
|
data-string="Knowledge"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Document Page",
|
"name": "Document Page",
|
||||||
"version": "16.0.1.1.0",
|
"version": "17.0.1.1.0",
|
||||||
"category": "Knowledge Management",
|
"category": "Knowledge Management",
|
||||||
"author": "OpenERP SA, Odoo Community Association (OCA)",
|
"author": "OpenERP SA, Odoo Community Association (OCA)",
|
||||||
"images": [
|
"images": [
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<record id="view_wiki_tree_children" model="ir.ui.view">
|
<record id="view_wiki_tree_children" model="ir.ui.view">
|
||||||
<field name="name">document.page.tree</field>
|
<field name="name">document.page.tree</field>
|
||||||
<field name="model">document.page</field>
|
<field name="model">document.page</field>
|
||||||
<field name="field_parent">child_ids</field>
|
|
||||||
<field name="priority">100</field>
|
<field name="priority">100</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree>
|
<tree>
|
||||||
@ -42,7 +41,7 @@
|
|||||||
name="web_ribbon"
|
name="web_ribbon"
|
||||||
text="Archived"
|
text="Archived"
|
||||||
bg_color="bg-danger"
|
bg_color="bg-danger"
|
||||||
attrs="{'invisible': [('active', '=', True)]}"
|
invisible="active == True"
|
||||||
/>
|
/>
|
||||||
<field name="active" invisible="1" />
|
<field name="active" invisible="1" />
|
||||||
<field name="type" invisible="1" />
|
<field name="type" invisible="1" />
|
||||||
@ -75,7 +74,7 @@
|
|||||||
<field
|
<field
|
||||||
name="menu_id"
|
name="menu_id"
|
||||||
readonly="1"
|
readonly="1"
|
||||||
attrs="{'invisible': [('menu_id','=',False)]}"
|
invisible="menu_id == False"
|
||||||
/>
|
/>
|
||||||
</group>
|
</group>
|
||||||
<group string="Revision">
|
<group string="Revision">
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Document Page Approval",
|
"name": "Document Page Approval",
|
||||||
"version": "16.0.1.1.0",
|
"version": "17.0.1.1.0",
|
||||||
"author": "Savoir-faire Linux, Odoo Community Association (OCA)",
|
"author": "Savoir-faire Linux, Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/knowledge",
|
"website": "https://github.com/OCA/knowledge",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
|
@ -5,10 +5,10 @@ import logging
|
|||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def post_init_hook(cr, registry): # pragma: no cover
|
def post_init_hook(env): # pragma: no cover
|
||||||
# Set all pre-existing pages history to approved
|
# Set all pre-existing pages history to approved
|
||||||
_logger.info("Setting history to approved.")
|
_logger.info("Setting history to approved.")
|
||||||
cr.execute(
|
env.cr.execute(
|
||||||
"""
|
"""
|
||||||
UPDATE document_page_history
|
UPDATE document_page_history
|
||||||
SET state='approved',
|
SET state='approved',
|
||||||
@ -19,7 +19,7 @@ def post_init_hook(cr, registry): # pragma: no cover
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def uninstall_hook(cr, registry): # pragma: no cover
|
def uninstall_hook(env): # pragma: no cover
|
||||||
# Remove unapproved pages
|
# Remove unapproved pages
|
||||||
_logger.info("Deleting unapproved Change Requests.")
|
_logger.info("Deleting unapproved Change Requests.")
|
||||||
cr.execute("DELETE FROM document_page_history WHERE state != 'approved'")
|
env.cr.execute("DELETE FROM document_page_history WHERE state != 'approved'")
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
type="object"
|
type="object"
|
||||||
string="Send to Review"
|
string="Send to Review"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
attrs="{'invisible':['|','|',('is_approval_required','=',False),('am_i_owner','=',False),('state', 'not in', ['draft'])]}"
|
invisible="is_approval_required == False or am_i_owner == False or state not in ['draft']"
|
||||||
/>
|
/>
|
||||||
<!-- approve if i am approver -->
|
<!-- approve if i am approver -->
|
||||||
<button
|
<button
|
||||||
@ -22,7 +22,7 @@
|
|||||||
type="object"
|
type="object"
|
||||||
string="Approve"
|
string="Approve"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
attrs="{'invisible':['|','|',('is_approval_required','=',False),('am_i_approver','=',False),('state','not in',['draft','to approve'])]}"
|
invisible="is_approval_required == False or am_i_approver == False or state not in ['draft','to approve']"
|
||||||
/>
|
/>
|
||||||
<!-- approve if it's not required and i am owner -->
|
<!-- approve if it's not required and i am owner -->
|
||||||
<button
|
<button
|
||||||
@ -30,28 +30,28 @@
|
|||||||
type="object"
|
type="object"
|
||||||
string="Approve"
|
string="Approve"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
attrs="{'invisible':['|','|',('is_approval_required','=',True),('am_i_owner','=',False),('state','not in',['draft', 'to approve'])]}"
|
invisible="is_approval_required == True or am_i_owner == False or state not in ['draft', 'to approve']"
|
||||||
/>
|
/>
|
||||||
<!-- cancel if i am owner or approver -->
|
<!-- cancel if i am owner or approver -->
|
||||||
<button
|
<button
|
||||||
name="action_cancel"
|
name="action_cancel"
|
||||||
type="object"
|
type="object"
|
||||||
string="Cancel"
|
string="Cancel"
|
||||||
attrs="{'invisible':['|','&',('am_i_owner','=',False),('am_i_approver','=',False),('state','not in',['draft','to approve'])]}"
|
invisible="am_i_owner == False or am_i_approver == False and state not in ['draft','to approve']"
|
||||||
/>
|
/>
|
||||||
<!-- reopen if i am owner or approver -->
|
<!-- reopen if i am owner or approver -->
|
||||||
<button
|
<button
|
||||||
name="action_draft"
|
name="action_draft"
|
||||||
type="object"
|
type="object"
|
||||||
string="Back to draft"
|
string="Back to draft"
|
||||||
attrs="{'invisible':['|','&',('am_i_owner','=',False),('am_i_approver','=',False),('state','not in',['cancelled'])]}"
|
invisible="am_i_owner == False or am_i_approver == False and state not in ['cancelled']"
|
||||||
/>
|
/>
|
||||||
<!-- cancel & reopen, if i am owner or approver -->
|
<!-- cancel & reopen, if i am owner or approver -->
|
||||||
<button
|
<button
|
||||||
name="action_draft"
|
name="action_draft"
|
||||||
type="object"
|
type="object"
|
||||||
string="Back to draft"
|
string="Back to draft"
|
||||||
attrs="{'invisible':['|','&',('am_i_owner','=',False),('am_i_approver','=',False),('state','not in',['to approve'])]}"
|
invisible="am_i_owner == False or am_i_approver == False and state not in ['to approve']"
|
||||||
/>
|
/>
|
||||||
<field name="am_i_owner" invisible="1" />
|
<field name="am_i_owner" invisible="1" />
|
||||||
<field name="am_i_approver" invisible="1" />
|
<field name="am_i_approver" invisible="1" />
|
||||||
@ -68,35 +68,27 @@
|
|||||||
<field
|
<field
|
||||||
name="approved_uid"
|
name="approved_uid"
|
||||||
readonly="1"
|
readonly="1"
|
||||||
attrs="{'invisible':[('state','not in',['approved'])]}"
|
invisible="state not in ['approved']"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="approved_date"
|
name="approved_date"
|
||||||
readonly="1"
|
readonly="1"
|
||||||
attrs="{'invisible':[('state','not in',['approved'])]}"
|
invisible="state not in ['approved']"
|
||||||
/>
|
/>
|
||||||
</group>
|
</group>
|
||||||
</xpath>
|
</xpath>
|
||||||
<!-- Readonly fields -->
|
<!-- Readonly fields -->
|
||||||
<field name="content" position="attributes">
|
<field name="content" position="attributes">
|
||||||
<attribute
|
<attribute name="readonly">state not in ['draft']</attribute>
|
||||||
name="attrs"
|
|
||||||
>{'readonly': [('state', 'not in', ['draft'])]}</attribute>
|
|
||||||
</field>
|
</field>
|
||||||
<field name="page_id" position="attributes">
|
<field name="page_id" position="attributes">
|
||||||
<attribute
|
<attribute name="readonly">state not in ['draft']</attribute>
|
||||||
name="attrs"
|
|
||||||
>{'readonly': [('state', 'not in', ['draft'])]}</attribute>
|
|
||||||
</field>
|
</field>
|
||||||
<field name="name" position="attributes">
|
<field name="name" position="attributes">
|
||||||
<attribute
|
<attribute name="readonly">state not in ['draft']</attribute>
|
||||||
name="attrs"
|
|
||||||
>{'readonly': [('state', 'not in', ['draft'])]}</attribute>
|
|
||||||
</field>
|
</field>
|
||||||
<field name="summary" position="attributes">
|
<field name="summary" position="attributes">
|
||||||
<attribute
|
<attribute name="readonly">state not in ['draft']</attribute>
|
||||||
name="attrs"
|
|
||||||
>{'readonly': [('state', 'not in', ['draft'])]}</attribute>
|
|
||||||
</field>
|
</field>
|
||||||
<!-- Chatter -->
|
<!-- Chatter -->
|
||||||
<sheet position="after">
|
<sheet position="after">
|
||||||
@ -119,14 +111,14 @@
|
|||||||
position="attributes"
|
position="attributes"
|
||||||
groups="document_page.group_document_manager"
|
groups="document_page.group_document_manager"
|
||||||
>
|
>
|
||||||
<attribute name="attrs">{'readonly': False}</attribute>
|
<attribute name="readonly">False</attribute>
|
||||||
</field>
|
</field>
|
||||||
<field
|
<field
|
||||||
name="summary"
|
name="summary"
|
||||||
position="attributes"
|
position="attributes"
|
||||||
groups="document_page.group_document_manager"
|
groups="document_page.group_document_manager"
|
||||||
>
|
>
|
||||||
<attribute name="attrs">{'readonly': False}</attribute>
|
<attribute name="readonly">False</attribute>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@ -141,7 +133,7 @@
|
|||||||
class="alert alert-info"
|
class="alert alert-info"
|
||||||
role="alert"
|
role="alert"
|
||||||
style="margin-bottom:0px;"
|
style="margin-bottom:0px;"
|
||||||
attrs="{'invisible': [('has_changes_pending_approval','=',False)]}"
|
invisible="has_changes_pending_approval == False"
|
||||||
>
|
>
|
||||||
This document has <b
|
This document has <b
|
||||||
>Changes Pending Approval</b>. You are viewing the last approved content.
|
>Changes Pending Approval</b>. You are viewing the last approved content.
|
||||||
@ -150,7 +142,7 @@
|
|||||||
class="alert alert-warning oe_edit_only"
|
class="alert alert-warning oe_edit_only"
|
||||||
role="alert"
|
role="alert"
|
||||||
style="margin-bottom:0px;"
|
style="margin-bottom:0px;"
|
||||||
attrs="{'invisible': [('is_approval_required','=',False)]}"
|
invisible="is_approval_required == False"
|
||||||
>
|
>
|
||||||
This document requires approval. If edited, you will create a new <b
|
This document requires approval. If edited, you will create a new <b
|
||||||
>Change Request</b>.
|
>Change Request</b>.
|
||||||
@ -159,7 +151,7 @@
|
|||||||
class="alert alert-warning oe_edit_only"
|
class="alert alert-warning oe_edit_only"
|
||||||
role="alert"
|
role="alert"
|
||||||
style="margin-bottom:0px;"
|
style="margin-bottom:0px;"
|
||||||
attrs="{'invisible': [('user_has_drafts','=',False)]}"
|
invisible="user_has_drafts == False"
|
||||||
>
|
>
|
||||||
<b>You already have a Draft Change Request for this page.</b>
|
<b>You already have a Draft Change Request for this page.</b>
|
||||||
It is highly recommended that you edit that one instead of creating a new one.
|
It is highly recommended that you edit that one instead of creating a new one.
|
||||||
@ -174,7 +166,7 @@
|
|||||||
name="action_changes_pending_approval"
|
name="action_changes_pending_approval"
|
||||||
string="Change Requests"
|
string="Change Requests"
|
||||||
type="object"
|
type="object"
|
||||||
attrs="{'invisible':[('has_changes_pending_approval','=',False),('user_has_drafts','=',False)]}"
|
invisible="has_changes_pending_approval == False and user_has_drafts == False"
|
||||||
icon="fa-edit"
|
icon="fa-edit"
|
||||||
/>
|
/>
|
||||||
</xpath>
|
</xpath>
|
||||||
@ -207,7 +199,7 @@
|
|||||||
<field name="content" position="before">
|
<field name="content" position="before">
|
||||||
<group
|
<group
|
||||||
class="oe_read_only"
|
class="oe_read_only"
|
||||||
attrs="{'invisible':[('type','!=','content')]}"
|
invisible="type != 'content'"
|
||||||
>
|
>
|
||||||
<field name="approved_date" />
|
<field name="approved_date" />
|
||||||
<field name="approved_uid" />
|
<field name="approved_uid" />
|
||||||
@ -225,7 +217,8 @@
|
|||||||
<field name="approval_required" />
|
<field name="approval_required" />
|
||||||
<field
|
<field
|
||||||
name="approver_gid"
|
name="approver_gid"
|
||||||
attrs="{'invisible':[('approval_required','!=', True)], 'required':[('approval_required','=', True)]}"
|
invisible="approval_required != True"
|
||||||
|
required="approval_required == True"
|
||||||
/>
|
/>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"name": "Document Page Group",
|
"name": "Document Page Group",
|
||||||
"summary": """
|
"summary": """
|
||||||
Define access groups on documents""",
|
Define access groups on documents""",
|
||||||
"version": "16.0.1.0.0",
|
"version": "17.0.1.0.0",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "Creu Blanca,Odoo Community Association (OCA)",
|
"author": "Creu Blanca,Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/knowledge",
|
"website": "https://github.com/OCA/knowledge",
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"name": "Document Page Reference",
|
"name": "Document Page Reference",
|
||||||
"summary": """
|
"summary": """
|
||||||
Include references on document pages""",
|
Include references on document pages""",
|
||||||
"version": "16.0.1.0.0",
|
"version": "17.0.1.0.0",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "Creu Blanca,Odoo Community Association (OCA)",
|
"author": "Creu Blanca,Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/knowledge",
|
"website": "https://github.com/OCA/knowledge",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
{
|
{
|
||||||
"name": "Document Page Tag",
|
"name": "Document Page Tag",
|
||||||
"version": "16.0.1.0.0",
|
"version": "17.0.1.0.0",
|
||||||
"author": "Therp BV,Odoo Community Association (OCA)",
|
"author": "Therp BV,Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/knowledge",
|
"website": "https://github.com/OCA/knowledge",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Copyright 2020 Tecnativa - Manuel Calero
|
# Copyright 2020 Tecnativa - Manuel Calero
|
||||||
{
|
{
|
||||||
"name": "URL attachment",
|
"name": "URL attachment",
|
||||||
"version": "16.0.1.0.3",
|
"version": "17.0.1.0.3",
|
||||||
"category": "Tools",
|
"category": "Tools",
|
||||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/knowledge",
|
"website": "https://github.com/OCA/knowledge",
|
||||||
|
Loading…
Reference in New Issue
Block a user