[MIG] document_page_project: Migration to 13.0

This commit is contained in:
Joan Sisquella 2020-01-15 12:40:00 +01:00 committed by Bhavesh Heliconia
parent 120ee8a7f5
commit 6da1be24e8
9 changed files with 64 additions and 55 deletions

View File

@ -7,20 +7,20 @@ Document Page Project
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github
:target: https://github.com/OCA/knowledge/tree/12.0/document_page_project
:target: https://github.com/OCA/knowledge/tree/13.0/document_page_project
:alt: OCA/knowledge
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-document_page_project
:target: https://translation.odoo-community.org/projects/knowledge-13-0/knowledge-13-0-document_page_project
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/118/12.0
:target: https://runbot.odoo-community.org/runbot/118/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@ -44,7 +44,7 @@ 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 <https://github.com/OCA/knowledge/issues/new?body=module:%20document_page_project%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20document_page_project%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@ -54,14 +54,14 @@ Credits
Authors
~~~~~~~
* Eficent
* ForgeFlow
Contributors
~~~~~~~~~~~~
* `Eficent <https://www.eficent.com>`_:
* `Forgeflow <https://www.forgeflow.com>`_:
* Lois Rilo <lois.rilo@eficent.com>
* Lois Rilo <lois.rilo@forgeflow.com>
Maintainers
~~~~~~~~~~~
@ -76,6 +76,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/12.0/document_page_project>`_ project on GitHub.
This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/13.0/document_page_project>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -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.1",
"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"],

View File

@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_project
# * document_page_project
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -53,4 +53,3 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:document_page_project.edit_project
msgid "Wiki Pages"
msgstr ""

View File

@ -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

View File

@ -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)

View File

@ -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>

View File

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/knowledge/tree/12.0/document_page_project"><img alt="OCA/knowledge" src="https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-document_page_project"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/118/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/knowledge/tree/13.0/document_page_project"><img alt="OCA/knowledge" src="https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/knowledge-13-0/knowledge-13-0-document_page_project"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/118/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allow to link document pages to projects.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
@ -394,7 +394,7 @@ create new ones.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/knowledge/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/knowledge/issues/new?body=module:%20document_page_project%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/knowledge/issues/new?body=module:%20document_page_project%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@ -402,14 +402,14 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
<ul class="simple">
<li>Eficent</li>
<li>ForgeFlow</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.eficent.com">Eficent</a>:<ul>
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;eficent.com">lois.rilo&#64;eficent.com</a>&gt;</li>
<li><a class="reference external" href="https://www.forgeflow.com">Forgeflow</a>:<ul>
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
</ul>
</li>
</ul>
@ -421,7 +421,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/knowledge/tree/12.0/document_page_project">OCA/knowledge</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/knowledge/tree/13.0/document_page_project">OCA/knowledge</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@ -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>

View File

@ -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>