mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
[MIG] document_page_tags: Migration to 12.0
This commit is contained in:
parent
28b6d83f97
commit
f46168f4bb
@ -5,12 +5,14 @@
|
||||
Tags/Keywords for document page
|
||||
===============================
|
||||
|
||||
This module allows you to fill in keywords on your pages to simplify finding them afterwards.
|
||||
This module allows you to fill in keywords on your pages to simplify finding
|
||||
them afterwards.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Fill in your keywords, and search for them by typing (part of) the keyword and choose searching for keywords.
|
||||
Fill in your keywords, and search for them by typing (part of) the keyword and
|
||||
choose searching for keywords.
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
@ -21,7 +23,8 @@ Bug Tracker
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/knowledge/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
|
||||
If you spotted it first, help us smashing it by providing a detailed and
|
||||
welcomed feedback
|
||||
`here <https://github.com/OCA/knowledge/issues/new?body=module:%20document_page_tags%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Credits
|
||||
@ -31,6 +34,7 @@ Contributors
|
||||
------------
|
||||
|
||||
* Holger Brunn <hbrunn@therp.nl>
|
||||
* Marcel Savegnago <marcel.savegnago@gmail.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Therp BV <https://therp.nl>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
from . import models
|
||||
|
@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Therp BV <https://therp.nl>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
"name": "Tags/Keywords for document page",
|
||||
"version": "10.0.1.0.0",
|
||||
"name": "Document Page Tags",
|
||||
"version": "12.0.1.0.0",
|
||||
"author": "Therp BV,Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/knowledge",
|
||||
"license": "AGPL-3",
|
||||
"category": "Knowledge Management",
|
||||
"summary": "Allows you to assign tags or keywords to pages and search for "
|
||||
|
@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Therp BV <https://therp.nl>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
from . import document_page
|
||||
|
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Therp BV <https://therp.nl>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
from openerp import models, fields
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class DocumentPage(models.Model):
|
||||
|
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Therp BV <https://therp.nl>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
from openerp import api, models, fields
|
||||
from odoo import api, models, fields
|
||||
|
||||
|
||||
class DocumentPageTag(models.Model):
|
||||
@ -9,6 +8,8 @@ class DocumentPageTag(models.Model):
|
||||
_description = 'A keyword for document pages'
|
||||
|
||||
name = fields.Char(required=True, translate=True)
|
||||
color = fields.Integer(string='Color Index')
|
||||
active = fields.Boolean(default=True)
|
||||
|
||||
_sql_constraints = [
|
||||
('unique_name', 'unique(name)', 'Tags must me unique'),
|
||||
|
@ -1,3 +1,4 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
access_document_page_tag_all,access_document_page_tag,model_document_page_tag,,1,0,0,0
|
||||
access_document_page_tag,access_document_page_tag,model_document_page_tag,base.group_user,1,0,1,1
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
document_page_user,document.page user,model_document_page_tag,knowledge.group_document_user,1,0,0,0
|
||||
document_page_editor,document.page editor,model_document_page_tag,document_page.group_document_editor,1,1,1,0
|
||||
document_page_manager,document.page manager,model_document_page_tag,document_page.group_document_manager,1,1,1,1
|
||||
|
|
@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Therp BV <https://therp.nl>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
from . import test_document_page_tags
|
||||
|
@ -1,9 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Therp BV <https://therp.nl>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
from psycopg2 import IntegrityError
|
||||
from openerp.tests.common import TransactionCase
|
||||
from openerp.tools.misc import mute_logger
|
||||
from odoo.tests.common import TransactionCase
|
||||
from odoo.tools.misc import mute_logger
|
||||
|
||||
|
||||
class TestDocumentPageTags(TransactionCase):
|
||||
|
@ -1,11 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_wiki_form" model="ir.ui.view">
|
||||
<field name="model">document.page</field>
|
||||
<field name="inherit_id" ref="document_page.view_wiki_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="parent_id" position="after">
|
||||
<field name="tag_ids" widget="many2many_tags" />
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@ -18,4 +19,21 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- List View-->
|
||||
<record id="document_page_tag_view_inherit_list" model="ir.ui.view">
|
||||
<field name="name">document_page.tags.tree</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="inherit_id" ref="document_page.view_wiki_tree"/>
|
||||
<field name="type">tree</field>
|
||||
<field name="field_parent">child_ids</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="parent_id" position="after">
|
||||
<field name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
@ -1,13 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_document_page_tag_form" model="ir.ui.view">
|
||||
|
||||
<record id="view_document_page_tag_search" model="ir.ui.view">
|
||||
<field name="name">document.page.tag.search</field>
|
||||
<field name="model">document.page.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group>
|
||||
<field name="name" />
|
||||
</group>
|
||||
<search string="Document Tag Search">
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]" />
|
||||
<separator/>
|
||||
<field name="name" filter_domain="[('name', 'ilike', self)]" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_document_page_tag_form" model="ir.ui.view">
|
||||
<field name="name">document.page.tag.form</field>
|
||||
<field name="model">document.page.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Tag">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-check">
|
||||
<field name="active" widget="boolean_button" options="{"terminology": "active"}" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only" />
|
||||
<h1>
|
||||
<field name="name" required="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group name="main">
|
||||
<field name="color" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_document_page_tag_tree" model="ir.ui.view">
|
||||
<field name="name">document.page.tag.tree</field>
|
||||
<field name="model">document.page.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Document Tags">
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="document_page_tag_action" model="ir.actions.act_window">
|
||||
<field name="name">Tags</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">document.page.tag</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="document_page_tag_menu"
|
||||
name="Tags"
|
||||
parent="knowledge.menu_document_configuration"
|
||||
action="document_page_tag_action"
|
||||
sequence="45" />
|
||||
|
||||
</odoo>
|
||||
|
Loading…
Reference in New Issue
Block a user