mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-16 04:02:56 -06:00
[MIG] document_page_project: Migration to 13.0
This commit is contained in:
parent
c8897ae4c9
commit
cc9da35526
@ -1,14 +1,13 @@
|
||||
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
|
||||
# (http://www.eficent.com) - Lois Rilo
|
||||
# Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com) - Lois Rilo
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
"name": "Document Page Project",
|
||||
"summary": "This module links document pages to projects",
|
||||
"version": "12.0.1.0.0",
|
||||
"development_status": "Beta",
|
||||
"version": "13.0.1.0.0",
|
||||
"development_status": "Production/Stable",
|
||||
"category": "Project",
|
||||
"author": "Eficent, " "Odoo Community Association (OCA)",
|
||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/knowledge",
|
||||
"license": "AGPL-3",
|
||||
"depends": ["project", "document_page"],
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
|
||||
# (http://www.eficent.com)
|
||||
# Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
@ -1,8 +1,7 @@
|
||||
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
|
||||
# (http://www.eficent.com)
|
||||
# Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ProjectProject(models.Model):
|
||||
@ -13,7 +12,6 @@ class ProjectProject(models.Model):
|
||||
)
|
||||
document_page_count = fields.Integer(compute="_compute_document_page_count")
|
||||
|
||||
@api.multi
|
||||
def _compute_document_page_count(self):
|
||||
for rec in self:
|
||||
rec.document_page_count = len(rec.document_page_ids)
|
||||
|
@ -1,3 +1,3 @@
|
||||
* `Eficent <https://www.eficent.com>`_:
|
||||
* `Forgeflow <https://www.forgeflow.com>`_:
|
||||
|
||||
* Lois Rilo <lois.rilo@eficent.com>
|
||||
* Lois Rilo <lois.rilo@forgeflow.com>
|
||||
|
@ -1,35 +1,36 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_wiki_form" model="ir.ui.view">
|
||||
<field name="name">document.page.form - document_page_project</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="inherit_id" ref="document_page.view_wiki_form"/>
|
||||
<field name="inherit_id" ref="document_page.view_wiki_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="parent_id" position="after">
|
||||
<field name="project_id"/>
|
||||
<field name="project_id" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_document_page_projects" model="ir.actions.act_window">
|
||||
<field name="name">Project Wiki</field>
|
||||
<field name="res_model">document.page</field>
|
||||
<field name="domain">[('type','=','content'), ('project_id', '=', active_id)]</field>
|
||||
<field
|
||||
name="domain"
|
||||
>[('type','=','content'), ('project_id', '=', active_id)]</field>
|
||||
<field name="context">{
|
||||
'default_type': 'content',
|
||||
'default_project_id': active_id}</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_ids" eval="[(5,0,0),
|
||||
<field
|
||||
name="view_ids"
|
||||
eval="[(5,0,0),
|
||||
(0,0,{'view_mode':'tree', 'view_id': ref('document_page.view_wiki_tree')}),
|
||||
(0,0,{'view_mode':'form', 'view_id': ref('document_page.view_wiki_form')})]"/>
|
||||
<field name="search_view_id" ref="document_page.view_wiki_filter"/>
|
||||
(0,0,{'view_mode':'form', 'view_id': ref('document_page.view_wiki_form')})]"
|
||||
/>
|
||||
<field name="search_view_id" ref="document_page.view_wiki_filter" />
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to create a new web page.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
@ -1,15 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_project_kanban" model="ir.ui.view">
|
||||
<field name="model">project.project</field>
|
||||
<field name="inherit_id" ref="project.view_project_kanban"/>
|
||||
<field name="inherit_id" ref="project.view_project_kanban" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('o_project_kanban_boxes')]" position="inside">
|
||||
<a class="o_project_kanban_box" name="%(action_document_page_projects)d" type="action">
|
||||
<a
|
||||
class="o_project_kanban_box"
|
||||
name="%(action_document_page_projects)d"
|
||||
type="action"
|
||||
>
|
||||
<div>
|
||||
<b>
|
||||
<field name="document_page_count" nolabel="1" class="o_value"/>
|
||||
<field
|
||||
name="document_page_count"
|
||||
nolabel="1"
|
||||
class="o_value"
|
||||
/>
|
||||
</b>
|
||||
<span class="o_label">Wiki Pages</span>
|
||||
</div>
|
||||
@ -17,19 +24,25 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="edit_project" model="ir.ui.view">
|
||||
<field name="name">project.project.form - document_page_project</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="inherit_id" ref="project.edit_project"/>
|
||||
<field name="inherit_id" ref="project.edit_project" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" type="action"
|
||||
name="%(action_document_page_projects)d" icon="fa-book">
|
||||
<field string="Wiki Pages" name="document_page_count" widget="statinfo"/>
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
type="action"
|
||||
name="%(action_document_page_projects)d"
|
||||
icon="fa-book"
|
||||
>
|
||||
<field
|
||||
string="Wiki Pages"
|
||||
name="document_page_count"
|
||||
widget="statinfo"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
1
setup/document_page_project/odoo/addons/document_page_project
Symbolic link
1
setup/document_page_project/odoo/addons/document_page_project
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../document_page_project
|
6
setup/document_page_project/setup.py
Normal file
6
setup/document_page_project/setup.py
Normal file
@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
Loading…
Reference in New Issue
Block a user