Browse Source

[ADD] Initial Commit

pull/29/head
SHEREEF PT 8 years ago
parent
commit
f1fce256f9
  1. 28
      task_from_project_issue/README.rst
  2. 24
      task_from_project_issue/__init__.py
  3. 42
      task_from_project_issue/__manifest__.py
  4. 24
      task_from_project_issue/models/__init__.py
  5. 49
      task_from_project_issue/models/project_issue_wizard.py
  6. BIN
      task_from_project_issue/static/description/after_task.png
  7. BIN
      task_from_project_issue/static/description/banner.jpg
  8. BIN
      task_from_project_issue/static/description/cybro_logo.png
  9. BIN
      task_from_project_issue/static/description/icon.png
  10. 103
      task_from_project_issue/static/description/index.html
  11. BIN
      task_from_project_issue/static/description/issue_form.png
  12. BIN
      task_from_project_issue/static/description/task_form.png
  13. BIN
      task_from_project_issue/static/description/task_wizard.png
  14. 45
      task_from_project_issue/views/project_issue_wizard.xml

28
task_from_project_issue/README.rst

@ -0,0 +1,28 @@
===========================
Task From Project Issue v10
===========================
This module helps you to create task for raised project issue.
Installation
============
Just select it from available modules to install it, there is no need to extra installations.
Configuration
=============
Nothing to configure.
Usage
=====
* Task creation from project issue via button.
* Task reference for project issue.
* Issue reference for task.
Credits
=======
Developer: Nilmar Shereef @ cybrosys, shereef@cybrosys.in

24
task_from_project_issue/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-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

42
task_from_project_issue/__manifest__.py

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-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': 'Task From Project Issue',
'version': '10.0.1.0.0',
'summary': """Task Creation From Project Issue""",
'description': """"This module helps you to create task for raised project issue""",
'category': 'Project',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': "http://www.cybrosys.com",
'depends': ['base', 'project_issue'],
'data': [
'views/project_issue_wizard.xml',
],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'demo': [],
'installable': True,
'auto_install': False,
'application': False,
}

24
task_from_project_issue/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-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_issue_wizard

49
task_from_project_issue/models/project_issue_wizard.py

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-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 odoo import models, fields, api
class ProjectTaskInherit(models.Model):
_inherit = 'project.task'
@api.model
def create(self, vals):
result = super(ProjectTaskInherit, self).create(vals)
if result['issue_id']:
result['issue_id'].task_id = result['id']
return result
issue_id = fields.Many2one('project.issue', string='Issue Reference')
class ProjectIssueInherit(models.Model):
_inherit = 'project.issue'
task_id = fields.Many2one('project.task', string='Task Reference')
@api.model
def create(self, vals):
result = super(ProjectIssueInherit, self).create(vals)
if result['task_id']:
result['task_id'].issue_id = result['id']
return result

BIN
task_from_project_issue/static/description/after_task.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
task_from_project_issue/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
task_from_project_issue/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
task_from_project_issue/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

103
task_from_project_issue/static/description/index.html

@ -0,0 +1,103 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Task From Project Issue</h2>
<h3 class="oe_slogan">Task Creation From Project Issue</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
<div>
<h4><p>Features:</p></h4>
<ul>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Task creation from project issue via button.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Task reference for project issue.</li>
<li style="list-style:none !important;"><span style="color:green;"> &#9745;</span>&nbsp;&nbsp; Issue reference for task.</li>
</ul>
</div>
<div>
<p>This module helps you to create task for raised project issue. When you click on 'Create Task' a task wizard will appear, then you can fill
all task information for creating task.You can also directly choose task from issue form itself. It will help you to simplify the issue process.</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Task Creation From Project Issue Via Button</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; Project -> Search -> Issue<br/>
</p>
</div>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="issue_form.png">
</div>
</div>
<div class="oe_span12">
<p class='oe_mt32'>
You can create task by clicking on 'Create Task' button. When you click on button task wizard will appear. Then you can enter all information and save it.
</p>
</div>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="task_wizard.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Task Reference For Project Issue</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; You can also select task from project issue form itself.<br>
</p>
</div>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="after_task.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Issue Reference For Task</h4>
<div class="oe_span12">
<p class='oe_mt32'>
&#x261B; You can also select issue from task form itself.<br>
</p>
</div>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="task_form.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<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
task_from_project_issue/static/description/issue_form.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
task_from_project_issue/static/description/task_form.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
task_from_project_issue/static/description/task_wizard.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

45
task_from_project_issue/views/project_issue_wizard.xml

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model='ir.actions.act_window' id='wizard_task_act'>
<field name="name">Create Task</field>
<field name="res_model">project.task</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="project.view_task_form2"/>
<field name="context">{'default_project_id': context.get('project_id'),
'default_user_id': context.get('user_id'),
'default_name': 'Issue: ' + context.get('name'),
'default_issue_id': context.get('issue_id'),
'default_description': context.get('description')}</field>
<field name="target">new</field>
</record>
<record id="project_inherit_project_issue" model="ir.ui.view">
<field name="name">project issue task</field>
<field name="model">project.issue</field>
<field name="inherit_id" ref="project_issue.project_issue_form_view"/>
<field name="arch" type="xml">
<xpath expr="//header/field[@name='stage_id']" position="before">
<button name="%(wizard_task_act)d" string="Create Task" type="action" class="oe_highlight"
attrs="{'invisible': [('task_id', 'not in', [None,False])]}"
context="{'project_id':project_id, 'user_id': user_id, 'name': name, 'issue_id': id, 'description': description}"/>
</xpath>
<field name="day_close" position="after">
<field name="task_id"/>
</field>
</field>
</record>
<record id="project_task_inherit_view" model="ir.ui.view">
<field name="name">project task</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="issue_id"/>
</field>
</field>
</record>
</data>
</odoo>
Loading…
Cancel
Save