Skip to content

Commit

Permalink
Merge pull request #4 from victormartinelicocorp/2_business_requireme…
Browse files Browse the repository at this point in the history
…nt_deliverable_categ

[ADD] business_requirement_deliverable_categ
  • Loading branch information
elicoidal committed Sep 30, 2016
2 parents e86c207 + d68d55a commit 6bbfa18
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 0 deletions.
76 changes: 76 additions & 0 deletions business_requirement_deliverable_categ/README.rst
@@ -0,0 +1,76 @@
.. 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

==============================================
Business Requirement Resources Task Categories
==============================================

Introduction
============

This module is part of a set of modules (`Business Requirements <https://github.com/OCA/business-requirement/blob/8.0/README.md>`_).


This module introduces **Task Category** in the business requirements resource lines.

If module business_requirement_project is installed the category will be propagated
to the task at project/task creation.

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

You can maintain the task categories in the Project/Configuration/Task category menu.


Usage
=====

#. In the Business requirement, you can add as many Deliverable Lines as necessary. Price of the Deliverable Lines will depend on the pricelist defined in master project or customer.

#. Once the Deliverable Lines are created, you can create as many Resource Lines as necessary in each Deliverable Lines.

#. in Resource Lines, you can then already assign task category on top of the assignee if necessary.

NB: Task category cannot be assigned to a procurement line.

.. figure:: static/img/bus_req_category.png
:width: 600 px
:alt: Inputing the deliverables and resources lines


.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/222/8.0


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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/business-requirement/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.

Credits
=======

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

* Eric Caudal <eric.caudal@elico-corp.com>
* Victor M. Martin <victor.martin@elico-corp.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 https://odoo-community.org.
5 changes: 5 additions & 0 deletions business_requirement_deliverable_categ/__init__.py
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# © 2016 Elico Corp (www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
25 changes: 25 additions & 0 deletions business_requirement_deliverable_categ/__openerp__.py
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# © 2016 Elico Corp (www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Business Requirement Resources Task Categories",
'category': 'Business Requirement Management',
'summary': 'Adds Task Categories to your Business Requirement Resources',
"version": "8.0.3.0.2",
"website": "www.elico-corp.com",
"author": "Elico Corp, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"project_categ",
"business_requirement_deliverable"
],
'image': [
'static/description/icon.png',
'static/img/bus_req_category.png'
],
"data": [
"views/business_requirement_deliverable_categ.xml",
],
}
5 changes: 5 additions & 0 deletions business_requirement_deliverable_categ/models/__init__.py
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# © 2016 Elico Corp (www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import business_requirement_deliverable_categ
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# © 2016 Elico Corp (www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import api, fields, models


class BusinessRequirementDeliverableCateg(models.Model):
_inherit = "business.requirement.resource"

task_categ_id = fields.Many2one(
'project.category',
string="Root Category for Tasks"
)

@api.onchange('resource_type')
def resource_type_change(self):
super(BusinessRequirementDeliverableCateg, self).resource_type_change()
if self.resource_type == 'procurement':
self.task_categ_id = False
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<record id="view_business_requirement_resource_tree" model="ir.ui.view">
<field name="name">business.requirement.resource.tree</field>
<field name="model">business.requirement.resource</field>
<field name="inherit_id"
ref="business_requirement_deliverable.view_business_requirement_resource_tree"/>
<field name="arch" type="xml">
<field name="user_id" position='before'>
<field name="task_categ_id"
attrs="{'readonly':[('resource_type','=','procurement')],'required':[('resource_type','=','task')]}"/>
</field>
</field>
</record>

</data>
</openerp>

0 comments on commit 6bbfa18

Please sign in to comment.