Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from victormartinelicocorp/2_business_requireme…
…nt_deliverable_categ [ADD] business_requirement_deliverable_categ
- Loading branch information
Showing
8 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
20 changes: 20 additions & 0 deletions
20
business_requirement_deliverable_categ/models/business_requirement_deliverable_categ.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.
Binary file added
BIN
+57.1 KB
business_requirement_deliverable_categ/static/img/bus_req_category.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
business_requirement_deliverable_categ/views/business_requirement_deliverable_categ.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |