Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.0][MIG] mgmtsystem_nonconformity_project #190

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions mgmtsystem_nonconformity_project/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

============================
Management System - Project
============================

This module enables you to set a project as an action in the nonconformity.

Installation
============

No installation steps required.

Configuration
=============

No configuration required.

Usage
=====

Known issues / Roadmap
======================

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/
Management-system/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 `here <https://github.com/OCA/
Management-system/issues/new?body=module:%20
mgmtsystem_nonconformity_project%0Aversion:%20
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.


Credits
=======

Contributors
------------

* Savoir-faire Linux <support@savoirfairelinux.com>
* Gervais Naoussi <gervaisnaoussi@gmail.com>
* Dave Burkholder <dave@thinkwelldesigns.com>

Maintainer
----------

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

This module is maintained by the OCA.

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.

To contribute to this module, please visit http://odoo-community.org.

Changelog
---------

v9.0.1.0.0

* the module does no depends anymore on document_page module.
6 changes: 3 additions & 3 deletions mgmtsystem_nonconformity_project/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- encoding: utf-8 -*-

from . import mgmtsystem_nonconformity_project
# -*- coding: utf-8 -*-
from . import models
from .hooks import set_action_type
35 changes: 6 additions & 29 deletions mgmtsystem_nonconformity_project/__openerp__.py
Original file line number Diff line number Diff line change
@@ -1,43 +1,20 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# -*- coding: utf-8 -*-
{
"name": "Management System - Project",
"version": "1.0",
"version": "9.0.1.0.0",
"author": "Savoir-faire Linux,Odoo Community Association (OCA)",
"website": "http://www.savoirfairelinux.com",
"license": "AGPL-3",
"category": "Management System",
"description": """\
This module enables you to set a project as an action in the nonconformity.
""",
"depends": [
'mgmtsystem_nonconformity',
'mgmtsystem_action',
'project'
'project',
],
"data": [
'mgmtsystem_nonconformity_project.xml',
'mgmtsystem_nonconformity_project_data.xml',
'views/mgmtsystem_nonconformity_project.xml',
],
"demo": [],
'installable': False,
'installable': True,
"post_init_hook": "set_action_type",
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
11 changes: 11 additions & 0 deletions mgmtsystem_nonconformity_project/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


def set_action_type(cr, registry):
"""Initialize current data in inherited modules."""
cr.execute("""
UPDATE mgmtsystem_action SET action_type='action'
WHERE action_type IS null
""")

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 2 additions & 0 deletions mgmtsystem_nonconformity_project/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import mgmtsystem_nonconformity_project
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from openerp import models, fields


class MgmtsystemAction(models.Model):
_inherit = "mgmtsystem.action"

def _compute_complete_name(self):
for action in self:
action.complete_name = self.name

name = fields.Char('Claim Subject')
action_type = fields.Selection([
('action', 'Action'),
('project', 'Project'),
],
string='Action Type',
required=True,
default='action',
)
project_id = fields.Many2one('project.project', 'Project')
complete_name = fields.Char('Complete Name', store=True,
compute='_compute_complete_name')
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<openerp>

<record id="view_mgmtsystem_action_tree" model="ir.ui.view">
<field name="name">mgmtsystem.action.tree</field>
<field name="model">mgmtsystem.action</field>
<field name="inherit_id" ref="mgmtsystem_action.view_mgmtsystem_action_tree"/>
<field name="arch" type="xml">

<field name="name" position="replace">
<field name="action_type"/>
<field name="complete_name"/>
</field>

</field>
</record>

<record id="view_mgmtsystem_action_form" model="ir.ui.view">
<field name="name">mgmtsystem.action.form</field>
<field name="model">mgmtsystem.action</field>
<field name="inherit_id" ref="mgmtsystem_action.view_mgmtsystem_action_form"/>
<field name="arch" type="xml">

<field name="name" position="replace">
<field name="action_type"/>
</field>

<field name="type_action" position="after">
<field name="name" colspan="4"
attrs="{'invisible' : [('action_type', '!=', 'action')]}"/>
<field name="project_id" colspan="4"
attrs="{'invisible' : [('action_type', '!=', 'project')]}"/>
</field>

</field>
</record>

</openerp>