Kaynağa Gözat

bi_crm_task

Sebas 7 yıl önce
işleme
5902388ad0

+ 1 - 0
__init__.py

@@ -0,0 +1 @@
+import models

BIN
__init__.pyc


+ 42 - 0
__openerp__.py

@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    This module uses OpenERP, Open Source Management Solution Framework.
+#    Copyright (C) 2014-Today BrowseInfo (<http://www.browseinfo.in>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>
+#
+##############################################################################
+{
+    'name': 'Create Task from Lead',
+    'category': 'Project',
+    'description': """
+""",
+    'author': 'BrowseInfo',
+    'website': 'http://www.browseinfo.in',
+    "price": 20,
+    "currency": 'EUR',
+
+    'images': [],
+    'depends': ['base', 'crm', 'sale',  'project_issue','project'],
+    
+    'data': [ 
+             'views/crm_lead_view.xml'
+    ],
+    'installable': True,
+    'auto_install': False,
+    'application': True,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 42 - 0
__openerp__.py~

@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    This module uses OpenERP, Open Source Management Solution Framework.
+#    Copyright (C) 2014-Today BrowseInfo (<http://www.browseinfo.in>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>
+#
+##############################################################################
+{
+    'name': 'Create Task from Lead',
+    'category': 'Project',
+    'description': """
+""",
+    'author': 'BrowseInfo',
+    'website': 'http://www.browseinfo.in',
+    "price": 20,
+    "currency": 'EUR',
+
+    'images': [],
+    'depends': ['base', 'crm', 'sale',  'project_issue','project'],
+    
+    'data': [ 
+             'views/crm_lead_view.xml'
+    ],
+    'installable': True,
+    'auto_install': False,
+    'application': True,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 1 - 0
models/__init__.py

@@ -0,0 +1 @@
+import crm_task

BIN
models/__init__.pyc


+ 79 - 0
models/crm_task.py

@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    This module uses OpenERP, Open Source Management Solution Framework.
+#    Copyright (C) 2014-Today BrowseInfo (<http://www.browseinfo.in>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>
+#
+##############################################################################
+from openerp.tools.translate import _
+from datetime import datetime, timedelta, date
+from dateutil.relativedelta import relativedelta
+from openerp import tools, api
+from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
+from openerp import api, fields, models, _
+import logging
+from openerp.osv import  osv
+from openerp import SUPERUSER_ID
+
+
+
+class crm_lead(models.Model):
+    """ CRM Lead Case """
+    _inherit = "crm.lead"
+    
+    @api.multi
+    def task_count(self):
+        task_obj = self.env['project.task']
+        self.task_number = task_obj.search_count([('lead_id', 'in', [a.id for a in self])])
+
+    task_number = fields.Integer(compute='task_count', string='Tasks')
+    
+class crm_task_wizard(models.TransientModel):
+    _name = 'crm.task.wizard'
+    
+    
+    def get_name(self):
+        ctx = dict(self._context or {})
+        active_id = ctx.get('active_id')
+        crm_brw = self.env['crm.lead'].browse(active_id)
+        name = crm_brw.name
+        return name
+    
+    
+    project_id = fields.Many2one('project.project','Project')
+    dead_line = fields.Date('Deadline')
+    name = fields.Char('Task Name',default = get_name)
+    user_id = fields.Many2one('res.users','Assigned To',default=lambda self: self.env.uid,
+        index=True, track_visibility='always')
+    
+    @api.one
+    def create_task(self):
+        ctx = dict(self._context or {})
+        active_id = ctx.get('active_id')
+        crm_brw = self.env['crm.lead'].browse(active_id)
+        vals = {'name': self.name,
+                'project_id':self.project_id.id or False,
+                'user_id': self.user_id.id or False,
+                'date_deadline':  self.dead_line or False,
+                'partner_id': crm_brw.partner_id.id or False,
+                'lead_id': crm_brw.id or False
+                }
+        self.env['project.task'].create(vals)
+        
+class project_Task(models.Model):
+    _inherit='project.task'
+    
+    lead_id =  fields.Many2one('crm.lead', 'Opportunity')

BIN
models/crm_task.pyc


BIN
static/description/bi_logo.png


BIN
static/description/create_button_v10.png


BIN
static/description/created_task_v9.png


BIN
static/description/icon.png


+ 85 - 0
static/description/index.html

@@ -0,0 +1,85 @@
+<section class="oe_container oe_dark">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span12">
+            <h2 class="oe_slogan">Easy to create task from Lead : Odoo8</h2>
+            <h3 class="oe_slogan">This module is used to create task form lead.
+            </h3><br/>
+            <h4 class="oe_slogan">How to use</h4>
+           </div>
+          </div>
+</section>
+
+     <section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <p class="oe_mt32" style="text-align:center;">
+            You can find create task button on the form of lead so if you want to create task form that lead you have to just click on that button.
+  <img class="oe_picture oe_screenshot" src="main_task_v9.png" style="width:99%;border-width: 3px;border-style: solid;border-color: #656060;">
+
+        </p>
+</div> 
+</section>
+
+<section class="oe_container oe_dark">
+  <div class="oe_row oe_spaced">   
+	<h2 class="oe_slogan">Wizard for enter extra details releted to project task.</h2>
+	<p class="oe_mt32" style="text-align:center;">
+          When you  click on create task button wizard will be open where you have to enter details of project of that task,dedline of the task and assigned person details.</p>
+        <img class="oe_picture oe_screenshot" src="task_wizard_v9.png" style="width:99%;border-width: 3px;border-style: solid;border-color: #656060;">
+</div>
+</section>
+<section class="oe_container">
+  <div class="oe_row oe_spaced"> 
+        <p class="oe_mt32" style="text-align:center;">
+          On lead form  you can See Number of task created from that lead .  
+        </p>
+        <img class="oe_picture oe_screenshot" src="smart_task_v9.png.png" style="width:99%;border-width: 3px;border-style: solid;border-color: #656060;">
+</div>
+</section>
+<br/>
+
+<section class="oe_container oe_dark">
+  <div class="oe_row oe_spaced"> 
+        <p class="oe_mt32" style="text-align:center;">
+           Here you can see the detailed information of the task created from the lead. 
+        </p>
+        <img class="oe_picture oe_screenshot" src="created_task_v9.png" style="width:99%;border-width: 3px;border-style: solid;border-color: #656060;">    
+</div>
+</section>
+<br/>
+
+
+
+<section class="oe_container oe_dark">
+  <div class="oe_row oe_spaced"> 
+      <h2 class="oe_slogan">Free Support</h2>
+<h3 class="oe_slogan" style="font-size: 20px;">You will get 90 Days free support incase any bugs or issue (Except data recovery).</h3>
+        <p class="oe_mt32" style="text-align:center;">
+           At BrowseInfo we offer  end to end solution for Odoo services. Which includes analysis & consultation on the workflows and integration part.  Please note that You're not allowed to distribute this module after purchase! Incase of any question regarding this module feel free to email us on <a href="mailto:sales@browseinfo.in">sales@browseinfo.in</a> or raise a ticket on support.
+		      </p>
+    </div>
+</section>
+<br/>
+
+
+
+
+
+<section class="oe_container oe_dark">
+    <div class="oe_row ">
+        <div class="oe_slogan text-center">
+            <a href="http://www.browseinfo.in" target="new">
+                <img src="bi_logo.png"/>
+            </a>
+            <br/>
+            <div class="oe_span12">
+            <h2 class="text-center"><a>About us</a></h2>
+        </div>
+            <span>
+                <a style="color: #a24689 !important;" href="http://www.browseinfo.in" target="new">Website</a> | 
+                <a style="color: #a24689 !important;" href="http://www.blog.browseinfo.in" target="new">Blog</a> | 
+                <a style="color: #a24689 !important;" href="mailto:sales@browseinfo.in">Contact Us</a> |
+                <a style="color: #a24689 !important;" href="mailto:sales@browseinfo.in">Request New Feature</a>
+            </span>
+        </div>
+    </div>
+</section>

+ 85 - 0
static/description/index.html~

@@ -0,0 +1,85 @@
+<section class="oe_container oe_dark">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span12">
+            <h2 class="oe_slogan">Easy to create task from Lead : Odoo8</h2>
+            <h3 class="oe_slogan">This module is used to create task form lead.
+            </h3><br/>
+            <h4 class="oe_slogan">How to use</h4>
+           </div>
+          </div>
+</section>
+
+     <section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <p class="oe_mt32" style="text-align:center;">
+            You can find create task button on the form of lead so if you want to create task form that lead you have to just click on that button.
+  <img class="oe_picture oe_screenshot" src="main_task_v9.png" style="width:99%;border-width: 3px;border-style: solid;border-color: #656060;">
+
+        </p>
+</div> 
+</section>
+
+<section class="oe_container oe_dark">
+  <div class="oe_row oe_spaced">   
+	<h2 class="oe_slogan">Wizard for enter extra details releted to project task.</h2>
+	<p class="oe_mt32" style="text-align:center;">
+          When you  click on create task button wizard will be open where you have to enter details of project of that task,dedline of the task and assigned person details.</p>
+        <img class="oe_picture oe_screenshot" src="task_wizard_v9.png" style="width:99%;border-width: 3px;border-style: solid;border-color: #656060;">
+</div>
+</section>
+<section class="oe_container">
+  <div class="oe_row oe_spaced"> 
+        <p class="oe_mt32" style="text-align:center;">
+          On lead form  you can See Number of task created from that lead .  
+        </p>
+        <img class="oe_picture oe_screenshot" src="smart_task_v9.png.png" style="width:99%;border-width: 3px;border-style: solid;border-color: #656060;">
+</div>
+</section>
+<br/>
+
+<section class="oe_container oe_dark">
+  <div class="oe_row oe_spaced"> 
+        <p class="oe_mt32" style="text-align:center;">
+           Here you can see the detailed information of the task created from the lead. 
+        </p>
+        <img class="oe_picture oe_screenshot" src="created_task_v9.png" style="width:99%;border-width: 3px;border-style: solid;border-color: #656060;">    
+</div>
+</section>
+<br/>
+
+
+
+<section class="oe_container oe_dark">
+  <div class="oe_row oe_spaced"> 
+      <h2 class="oe_slogan">Free Support</h2>
+<h3 class="oe_slogan" style="font-size: 20px;">You will get 90 Days free support incase any bugs or issue (Except data recovery).</h3>
+        <p class="oe_mt32" style="text-align:center;">
+           At BrowseInfo we offer  end to end solution for Odoo services. Which includes analysis & consultation on the workflows and integration part.  Please note that You're not allowed to distribute this module after purchase! Incase of any question regarding this module feel free to email us on <a href="mailto:sales@browseinfo.in">sales@browseinfo.in</a> or raise a ticket on support.
+		      </p>
+    </div>
+</section>
+<br/>
+
+
+
+
+
+<section class="oe_container oe_dark">
+    <div class="oe_row ">
+        <div class="oe_slogan text-center">
+            <a href="http://www.browseinfo.in" target="new">
+                <img src="bi_logo.png"/>
+            </a>
+            <br/>
+            <div class="oe_span12">
+            <h2 class="text-center"><a>About us</a></h2>
+        </div>
+            <span>
+                <a style="color: #a24689 !important;" href="http://www.browseinfo.in" target="new">Website</a> | 
+                <a style="color: #a24689 !important;" href="http://www.blog.browseinfo.in" target="new">Blog</a> | 
+                <a style="color: #a24689 !important;" href="mailto:sales@browseinfo.in">Contact Us</a> |
+                <a style="color: #a24689 !important;" href="mailto:sales@browseinfo.in">Request New Feature</a>
+            </span>
+        </div>
+    </div>
+</section>

BIN
static/description/main_issue.png


BIN
static/description/main_task_v9.png


BIN
static/description/smart_button.png


BIN
static/description/smart_task_v9.png.png


BIN
static/description/task_created_from_button.png


BIN
static/description/task_wizard_v9.png


BIN
static/description/wizard_10.png


+ 76 - 0
views/crm_lead_view.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+		
+		<record id="view_crm_task_form" model="ir.ui.view">
+            <field name="name">crm.task.wizard</field>
+            <field name="model">crm.task.wizard</field>
+            <field name="arch" type="xml">
+                <form string="Create Task">
+                       <div class="oe_title">
+                        <h1>
+                            <field name="name" placeholder="Project Task"/>
+                        </h1>
+                    </div>
+                    <group>
+                        <group>
+                            <field name="project_id" domain="[('active', '=', True)]" context="{'default_use_tasks':1}"/>
+                            <field name="user_id"
+                                class="o_task_user_field"
+                                options='{"no_open": True}'/>
+                        </group>
+                        <group>
+                            <field name="dead_line"/>
+                        </group>
+                    </group>
+                    <footer>
+                    	<button name="create_task" string="Create Task" type="object"/>
+                    </footer>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_view_crm_task_form" model="ir.actions.act_window">
+            <field name="name">Create Task</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">crm.task.wizard</field>
+            <field name="view_mode">form</field>
+            <field name="view_id" ref="view_crm_task_form"/>
+            <field name="target">new</field>
+        </record>
+		
+		<record id="action_view_task_id" model="ir.actions.act_window">
+            <field name="name">Tasks</field>
+            <field name="res_model">project.task</field>
+            <field name="view_mode">kanban,tree,form,calendar,pivot,graph</field>
+             <field name="domain">[('lead_id', '=', active_id)]</field>
+            <field name="context">{'search_default_lead_id': active_id, 'default_lead_id': active_id}</field>
+            <field name="help" type="html">
+                <p>
+                    Odoo's project management allows you to manage the pipeline of your tasks efficiently. You can track progress, discuss on tasks, attach documents, etc.
+                </p>
+            </field>
+        </record>
+		
+		
+		<record id="crm_inherit_form" model="ir.ui.view">
+			<field name="name">Crm Lead</field>
+			<field name="model">crm.lead</field>
+			<field name="inherit_id" ref="crm.crm_case_form_view_leads" />
+			<field name="arch" type="xml">
+			<div class="oe_right oe_button_box" position="inside">
+				<button class="oe_stat_button" type="action" name="%(action_view_task_id)d"
+                        context="{'default_partner_id': partner_id }"
+                        icon="fa-tasks">
+                        <field  string="Tasks" name="task_number" widget="statinfo"/>
+                    </button>
+                  </div>
+				<button name="%(crm.action_crm_lead2opportunity_partner)d" position="after">
+					<button name="%(action_view_crm_task_form)d" string="Create Task" type="action"/>
+				</button>
+			</field>
+		</record>
+	</data>
+</openerp>
+        
+