13 changed files with 243 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Nilmar Shereef(<http://www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
import models |
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Nilmar Shereef(<http://www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
{ |
||||
|
'name': "Automatic Colour Code for Task", |
||||
|
'summary': """Automatic Colour Code for Task Based on Project""", |
||||
|
'author': "Nilmar Shereef", |
||||
|
'website': "http://www.cybrosys.com", |
||||
|
'category': 'Project', |
||||
|
'version': '1.0', |
||||
|
'license': 'AGPL-3', |
||||
|
'depends': ['base', 'project'], |
||||
|
'data': ['views/color_code_project_view.xml'], |
||||
|
'images': ['static/description/project_banner.jpg'], |
||||
|
'demo': [], |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Nilmar Shereef(<http://www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
import project_task_color |
@ -0,0 +1,67 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Nilmar Shereef(<http://www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
from openerp import models, api, fields |
||||
|
|
||||
|
|
||||
|
class ProjectColor(models.Model): |
||||
|
_inherit = 'project.project' |
||||
|
|
||||
|
color_name = fields.Char(string='Name') |
||||
|
project_colors = fields.Many2one('colour.code', string="Colour Code") |
||||
|
color = fields.Integer(string='Colour') |
||||
|
|
||||
|
@api.onchange('project_colors') |
||||
|
def _change_color_type(self): |
||||
|
if self.project_colors: |
||||
|
self.color = self.project_colors.color |
||||
|
self.color_name = self.project_colors.name |
||||
|
|
||||
|
|
||||
|
class Color(models.Model): |
||||
|
_name = 'colour.code' |
||||
|
|
||||
|
name = fields.Char(string='Name', required=True, |
||||
|
help="White : 0,Grey : 1,Pink :2,Yellow :3,Light Green : 4 ,Light Blue :5," |
||||
|
"Sky Blue : 6, Light Orange : 7,Purple: 8,Light Purple: 9") |
||||
|
color = fields.Integer('Colour Index', required=True, size=1, |
||||
|
help="White : 0,Grey : 1,Pink :2,Yellow :3,Light Green : 4 ,Light Blue :5," |
||||
|
"Sky Blue : 6, Light Orange : 7,Purple: 8,Light Purple: 9") |
||||
|
|
||||
|
|
||||
|
class TaskColor(models.Model): |
||||
|
_inherit = 'project.task' |
||||
|
|
||||
|
task_color_name = fields.Char(string='Name') |
||||
|
task_color = fields.Many2one('colour.code', readonly=True, string='Related Colour Code', related="project_id.project_colors") |
||||
|
color = fields.Integer(string='Colour', related="project_id.color") |
||||
|
|
||||
|
@api.onchange('task_color') |
||||
|
def _change_task_type(self): |
||||
|
if self.task_color: |
||||
|
self.color = self.task_color.color |
||||
|
self.task_color_name = self.task_color.name |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
|
After Width: | Height: | Size: 9.9 KiB |
@ -0,0 +1,62 @@ |
|||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<div class="oe_span12"> |
||||
|
<h2 class="oe_slogan">Project Management</h2> |
||||
|
<h3 class="oe_slogan">Colour Code in Project & tasks</h3> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="project_color.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="task_color.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<p class="oe_mt32"> |
||||
|
Option to set a colour code in project. |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h2 class="oe_slogan">Automatically follow that colour code for every tasks in that project.</h2> |
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="project_view.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="task_view.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<h2 class="oe_slogan">Need Any Help?</h2> |
||||
|
<div class="oe_slogan"> |
||||
|
<a class="btn btn-primary btn-lg mt8" |
||||
|
style="color: #FFFFFF !important;" href="http://www.cybrosys.com"><i |
||||
|
class="fa fa-envelope"></i> Email </a> <a |
||||
|
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" |
||||
|
href="http://www.cybrosys.com/contact/"><i |
||||
|
class="fa fa-phone"></i> Contact Us </a> <a |
||||
|
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" |
||||
|
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i |
||||
|
class="fa fa-check-square"></i> Request Customization </a> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
After Width: | Height: | Size: 128 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 72 KiB |
@ -0,0 +1,29 @@ |
|||||
|
<openerp> |
||||
|
<data> |
||||
|
|
||||
|
<record model="ir.ui.view" id="colour_code_project_form"> |
||||
|
<field name="name">ProjectForm</field> |
||||
|
<field name="model">project.project</field> |
||||
|
<field name="inherit_id" ref="project.edit_project"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="date" position="after"> |
||||
|
<field name="project_colors" placeholder="Project Color Code"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="colour_code_view_task_form" model="ir.ui.view"> |
||||
|
<field name="name">project.task.form</field> |
||||
|
<field name="model">project.task</field> |
||||
|
<field name="inherit_id" ref="project.view_task_form2"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="project_id" position="after"> |
||||
|
<field name="task_color" placeholder="color"/> |
||||
|
<field name="color" invisible="1" /> |
||||
|
<field name="task_color_name" invisible="1" /> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
Loading…
Reference in new issue