Browse Source

[ADD] Initial Commit

pull/81/head
SHEREEF PT 8 years ago
parent
commit
cd77562b07
  1. 24
      project_code_in_task/__init__.py
  2. 42
      project_code_in_task/__openerp__.py
  3. 24
      project_code_in_task/models/__init__.py
  4. 59
      project_code_in_task/models/project_code.py
  5. BIN
      project_code_in_task/static/description/banner.jpg
  6. BIN
      project_code_in_task/static/description/cybro_logo.png
  7. BIN
      project_code_in_task/static/description/icon.png
  8. 77
      project_code_in_task/static/description/index.html
  9. BIN
      project_code_in_task/static/description/project.png
  10. BIN
      project_code_in_task/static/description/taskk.png
  11. 15
      project_code_in_task/views/project_code_view.xml

24
project_code_in_task/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Jesni Banu(<https://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

42
project_code_in_task/__openerp__.py

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Jesni Banu(<https://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': 'Project Code In Task',
'version': '9.0.1.0.0',
'summary': """Task Name With Respect To Project Code""",
'description': 'This module helps you to update task with respect to project code',
'category': 'Project Management',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['base', 'project'],
'data': [
'views/project_code_view.xml',
],
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'demo': [],
'installable': True,
'auto_install': False,
'application': False,
}

24
project_code_in_task/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Jesni Banu(<https://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_code

59
project_code_in_task/models/project_code.py

@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Jesni Banu(<https://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, fields, api, _
class ProjectCode(models.Model):
_inherit = 'project.project'
project_code = fields.Char(string='Project Code', required=True)
class ProjectCodeTask(models.Model):
_inherit = 'project.task'
@api.model
def create(self, vals):
if vals['project_id']:
obj = self.env['project.project'].browse(vals['project_id'])
vals['name'] = obj.project_code + '/' + vals['name']
return super(ProjectCodeTask, self).create(vals)
@api.multi
def write(self, vals):
if vals.get('project_id'):
obj = self.env['project.project'].browse(vals.get('project_id'))
if obj.project_code:
if vals.get('name'):
vals['name'] = obj.project_code + '/' + vals['name']
else:
vals['name'] = obj.project_code + '/' + self.name
else:
if not vals.get('name'):
if '/' in self.name:
s = self.name.index('/')
s += 1
vals['name'] = self.name[s:]
elif vals.get('name'):
vals['name'] = self.project_id.project_code + '/' + vals['name']
return super(ProjectCodeTask, self).write(vals)

BIN
project_code_in_task/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
project_code_in_task/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
project_code_in_task/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

77
project_code_in_task/static/description/index.html

@ -0,0 +1,77 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Project Code In Task</h2>
<h3 class="oe_slogan">Task Name With Project Code</h3>
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
<div>
<h4><p>Features:</p></h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Create specific code for project.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Update task name with project code.</li>
</ul>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Create specific code for project</h3>
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="project.png">
</div>
</div>
<div class="oe_span12">
<p class="oe_mt32">
Here you can create specific code for each project
</p>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Task Name</h3>
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="taskk.png">
</div>
</div>
<div class="oe_span12">
<p class="oe_mt32">
<p>Project ---> Search ---> Tasks</p>
<p>Task name updating with project code.</p>
</p>
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://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;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>

BIN
project_code_in_task/static/description/project.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
project_code_in_task/static/description/taskk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

15
project_code_in_task/views/project_code_view.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="code_project_form">
<field name="name">Project Code Form</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="project_code"/>
</field>
</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save