Skip to content

Commit

Permalink
Merge d00cc8e into 607388b
Browse files Browse the repository at this point in the history
  • Loading branch information
LoisRForgeFlow committed Mar 1, 2019
2 parents 607388b + d00cc8e commit df6973a
Show file tree
Hide file tree
Showing 12 changed files with 651 additions and 0 deletions.
81 changes: 81 additions & 0 deletions document_page_project/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
============
Project Wiki
============

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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/11.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-11-0/knowledge-11-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/11.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allow to link document pages to projects.

**Table of contents**

.. contents::
:local:

Usage
=====

* Go to to a project and click on "Wiki Pages" to see linked documents or to
create new ones.

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:%2011.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.

Credits
=======

Authors
~~~~~~~

* Efient

Contributors
~~~~~~~~~~~~

* `Eficent <https://www.eficent.com>`_:

* Lois Rilo <lois.rilo@eficent.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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/11.0/document_page_project>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions document_page_project/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
24 changes: 24 additions & 0 deletions document_page_project/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com) - Lois Rilo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
'name': 'Project Wiki',
'description': 'This module links document pages to projects',
'version': '11.0.1.0.0',
"development_status": "Beta",
'category': 'Project',
'author': 'Efient, '
'Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/project',
'license': 'AGPL-3',
'depends': [
'project',
'document_page',
],
'data': [
'views/document_page_views.xml',
'views/project_project_views.xml',
],
'installable': True,
}
2 changes: 2 additions & 0 deletions document_page_project/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import project_project
from . import document_page
14 changes: 14 additions & 0 deletions document_page_project/models/document_page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class DocumentPage(models.Model):
_inherit = 'document.page'

project_id = fields.Many2one(
string='Project',
comodel_name='project.project',
)
23 changes: 23 additions & 0 deletions document_page_project/models/project_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import api, fields, models


class ProjectProject(models.Model):
_inherit = 'project.project'

document_page_ids = fields.One2many(
string='Wiki',
comodel_name='document.page',
inverse_name='project_id'
)
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)
3 changes: 3 additions & 0 deletions document_page_project/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Eficent <https://www.eficent.com>`_:

* Lois Rilo <lois.rilo@eficent.com>
1 change: 1 addition & 0 deletions document_page_project/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allow to link document pages to projects.
2 changes: 2 additions & 0 deletions document_page_project/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Go to to a project and click on "Wiki Pages" to see linked documents or to
create new ones.

0 comments on commit df6973a

Please sign in to comment.