[MERGE]: Merge with lp:trunk-dev-addons2
bzr revid: ron@tinyerp.com-20101004042520-ycpimxmjajyvfay9
This commit is contained in:
commit
5577ecd78a
|
@ -36,11 +36,11 @@ class base_calendar_invite_attendee(osv.osv_memory):
|
|||
_columns = {
|
||||
'type': fields.selection([('internal', 'Internal User'), \
|
||||
('external', 'External Email'), \
|
||||
('partner', 'Partner Contacts')], 'Type', required=True),
|
||||
('partner', 'Partner Contacts')], 'Type', required=True, help="Select whom you want to Invite"),
|
||||
'user_ids': fields.many2many('res.users', 'invite_user_rel',
|
||||
'invite_id', 'user_id', 'Users'),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
'email': fields.char('Email', size=124),
|
||||
'email': fields.char('Email', size=124, help="Provide external email address who will receive this invitation."),
|
||||
'contact_ids': fields.many2many('res.partner.address', 'invite_contact_rel',
|
||||
'invite_id', 'contact_id', 'Contacts'),
|
||||
'send_mail': fields.boolean('Send mail?', help='Check this if you want to \
|
||||
|
|
|
@ -10,42 +10,31 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Invite People">
|
||||
<separator string="Invite People" colspan="4" />
|
||||
<field name="type" />
|
||||
<field name="send_mail" />
|
||||
<newline />
|
||||
<group col="2" colspan="6"
|
||||
attrs="{'invisible': [('type', '!=', 'external')]}">
|
||||
<field name="email" colspan="4"
|
||||
attrs="{'required': [('type', '=', 'external')]}" />
|
||||
</group>
|
||||
<group col="2" colspan="6"
|
||||
attrs="{'invisible': [('type', '!=', 'internal')]}">
|
||||
<separator string="Users" colspan="4" />
|
||||
<field name="user_ids" select="1" colspan="4"
|
||||
nolabel="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="2" colspan="6"
|
||||
attrs="{'invisible': [('type', '!=', 'partner')]}">
|
||||
<field name="partner_id" colspan="2"
|
||||
on_change="onchange_partner_id(partner_id)"
|
||||
attrs="{'required': [('type', '=', 'partner')]}" />
|
||||
<newline />
|
||||
<separator string="Partner Contacts"
|
||||
colspan="6" />
|
||||
<field name="contact_ids" select="1" colspan="4"
|
||||
nolabel="1" domain="[('partner_id', '=', partner_id)]"
|
||||
attrs="{'readonly': [('type', '!=', 'partner')]}" />
|
||||
</group>
|
||||
<newline />
|
||||
<separator string="" colspan="6" />
|
||||
<group col="4" colspan="4">
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="do_invite" string="Invite"
|
||||
type="object" icon="gtk-ok" />
|
||||
</group>
|
||||
<separator string="Invite People" colspan="4"/>
|
||||
<field name="type"/>
|
||||
<field name="send_mail"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Data">
|
||||
<group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'external')]}">
|
||||
<field name="email" colspan="4" attrs="{'required': [('type', '=', 'external')]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'internal')]}">
|
||||
<separator string="Users" colspan="4"/>
|
||||
<field name="user_ids" select="1" colspan="4" nolabel="1" height="180"/>
|
||||
<newline/>
|
||||
</group>
|
||||
<group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'partner')]}">
|
||||
<field name="partner_id" colspan="2" on_change="onchange_partner_id(partner_id)" attrs="{'required': [('type', '=', 'partner')]}"/>
|
||||
<newline/>
|
||||
<separator string="Partner Contacts" colspan="6"/>
|
||||
<field name="contact_ids" select="1" colspan="4" nolabel="1" domain="[('partner_id', '=', partner_id)]" attrs="{'readonly': [('type', '!=', 'partner')]}"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="4" colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button name="do_invite" string="Invite" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -177,15 +177,15 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Synchronized server">
|
||||
<field name="name" select="1"/>
|
||||
<newline/>
|
||||
<field name="server_url" select="2"/>
|
||||
<newline/>
|
||||
<field name="server_port"/>
|
||||
<field name="server_db"/>
|
||||
<newline/>
|
||||
<field name="login" select="1"/>
|
||||
<field name="password" password="True"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="name"/>
|
||||
<field name="login"/>
|
||||
<field name="password" password="True"/>
|
||||
<field name="server_url"/>
|
||||
<field name="server_port"/>
|
||||
<field name="server_db"/>
|
||||
</group>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
## -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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.
|
||||
# it under the terms of the GNU Affero 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.
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
|
|
@ -9,14 +9,12 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Transfer Data To Server">
|
||||
<field name="server_url" colspan="4"/>
|
||||
<newline/>
|
||||
<separator string="Control" colspan="4"/>
|
||||
<field name="user_id" default="uid"/>
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<button special="cancel" string="_Close" icon="gtk-cancel"/>
|
||||
<button name="upload_download_multi_thread" string="_Synchronize" type="object" icon="gtk-ok"/>
|
||||
<field name="server_url" colspan="4"/>
|
||||
<field name="user_id" default="uid"/>
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<button special="cancel" string="_Close" icon="gtk-cancel"/>
|
||||
<button name="upload_download_multi_thread" string="_Synchronize" type="object" icon="gtk-ok"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -145,53 +145,29 @@ class crm_case(object):
|
|||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
s = self.get_stage_dict(cr, uid, ids, context=context)
|
||||
section = self._name
|
||||
stage = False
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
model = self._name
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = not context.get('force_domain', False) and case.stage_id.id or False
|
||||
if st in s[section]:
|
||||
data = {'stage_id': s[section][st]}
|
||||
stage = s[section][st]
|
||||
self.write(cr, uid, [case.id], data)
|
||||
return stage
|
||||
|
||||
def get_stage_dict(self, cr, uid, ids, context=None):
|
||||
"""This function gives dictionary for stage according to stage levels
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of case IDs
|
||||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
stage_obj = self.pool.get('crm.case.stage')
|
||||
res = self.read(cr, uid, ids, ['section_id', 'stage_id'], context)[0]
|
||||
section_id = res['section_id'] and res['section_id'][0] or False
|
||||
stage_id = res['stage_id'] and res['stage_id'][0] or False
|
||||
|
||||
# We select either the stages in the same section as the current stage
|
||||
# if it a stage that does not have a section, or the stages of the
|
||||
# current section of the case
|
||||
if stage_id:
|
||||
stage_record = stage_obj.browse(cr, uid, stage_id)
|
||||
if not stage_record.section_id:
|
||||
section_id = False # only select stages without section
|
||||
|
||||
domain = [('object_id.model', '=', self._name), '|', ('section_id', '=', section_id),('section_id','=',False)]
|
||||
if 'force_domain' in context and context['force_domain']:
|
||||
domain += context['force_domain']
|
||||
sid = stage_obj.search(cr, uid, domain, context=context)
|
||||
s = {}
|
||||
previous = {}
|
||||
section = self._name
|
||||
|
||||
for stage in stage_obj.browse(cr, uid, sid, context=context):
|
||||
s.setdefault(section, {})
|
||||
s[section][previous.get(section, False)] = stage.id
|
||||
previous[section] = stage.id
|
||||
return s
|
||||
next_stage = False
|
||||
data = {}
|
||||
domain = [('object_id.model', '=', model)]
|
||||
if case.section_id and case.section_id.stage_ids:
|
||||
domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids)))
|
||||
stages = stage_pool.search(cr, uid, domain, order='sequence')
|
||||
index = -1
|
||||
if case.stage_id and case.stage_id.id in stages:
|
||||
index = stages.index(case.stage_id.id)
|
||||
if index + 1 == len(stages):
|
||||
return False
|
||||
else:
|
||||
next_stage = stages[index + 1]
|
||||
if next_stage:
|
||||
data = {'stage_id': next_stage}
|
||||
stage = stage_pool.browse(cr, uid, next_stage, context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
self.write(cr, uid, [case.id], data, context=context)
|
||||
return next_stage
|
||||
|
||||
def stage_previous(self, cr, uid, ids, context=None):
|
||||
"""This function computes previous stage for case from its current stage
|
||||
|
@ -203,21 +179,28 @@ class crm_case(object):
|
|||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
s = self.get_stage_dict(cr, uid, ids, context=context)
|
||||
section = self._name
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
model = self._name
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = not context.get('force_domain', False) and case.stage_id.id or False
|
||||
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
|
||||
if st in s[section]:
|
||||
data = {'stage_id': s[section][st]}
|
||||
if s[section][st]:
|
||||
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
self.write(cr, uid, [case.id], data)
|
||||
prev_stage = False
|
||||
data = {}
|
||||
domain = [('object_id.model', '=', model)]
|
||||
if case.section_id and case.section_id.stage_ids:
|
||||
domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids)))
|
||||
stages = stage_pool.search(cr, uid, domain, order='sequence')
|
||||
index = 0
|
||||
if case.stage_id and case.stage_id.id in stages:
|
||||
index = stages.index(case.stage_id.id)
|
||||
if index == 0:
|
||||
return False
|
||||
else:
|
||||
prev_stage = stages[index - 1]
|
||||
if prev_stage:
|
||||
data = {'stage_id': prev_stage}
|
||||
stage = stage_pool.browse(cr, uid, prev_stage, context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
self.write(cr, uid, [case.id], data, context=context)
|
||||
return True
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part, email=False):
|
||||
|
@ -492,6 +475,43 @@ class crm_case(object):
|
|||
return res
|
||||
|
||||
|
||||
class crm_case_stage(osv.osv):
|
||||
""" Stage of case """
|
||||
|
||||
_name = "crm.case.stage"
|
||||
_description = "Stage of case"
|
||||
_rec_name = 'name'
|
||||
_order = "sequence"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Stage Name', size=64, required=True, translate=True),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
|
||||
'object_id': fields.many2one('ir.model', 'Object Name'),
|
||||
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
|
||||
'on_change': fields.boolean('Change Probability Automatically', \
|
||||
help="Change Probability on next and previous stages."),
|
||||
'requirements': fields.text('Requirements')
|
||||
}
|
||||
def _find_object_id(self, cr, uid, context=None):
|
||||
"""Finds id for case object
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
object_id = context and context.get('object_id', False) or False
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
|
||||
return ids and ids[0]
|
||||
|
||||
_defaults = {
|
||||
'sequence': lambda *args: 1,
|
||||
'probability': lambda *args: 0.0,
|
||||
'object_id' : _find_object_id
|
||||
}
|
||||
|
||||
crm_case_stage()
|
||||
|
||||
|
||||
class crm_case_section(osv.osv):
|
||||
"""Sales Team"""
|
||||
|
||||
|
@ -517,7 +537,8 @@ class crm_case_section(osv.osv):
|
|||
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'),
|
||||
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"),
|
||||
'note': fields.text('Description'),
|
||||
'working_hours': fields.float('Working Hours', digits=(16,2 )),
|
||||
'working_hours': fields.float('Working Hours', digits=(16,2 )),
|
||||
'stage_ids':fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
@ -619,43 +640,6 @@ class crm_case_resource_type(osv.osv):
|
|||
crm_case_resource_type()
|
||||
|
||||
|
||||
class crm_case_stage(osv.osv):
|
||||
""" Stage of case """
|
||||
|
||||
_name = "crm.case.stage"
|
||||
_description = "Stage of case"
|
||||
_rec_name = 'name'
|
||||
_order = "sequence"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Stage Name', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
|
||||
'object_id': fields.many2one('ir.model', 'Object Name'),
|
||||
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
|
||||
'on_change': fields.boolean('Change Probability Automatically', \
|
||||
help="Change Probability on next and previous stages."),
|
||||
'requirements': fields.text('Requirements')
|
||||
}
|
||||
def _find_object_id(self, cr, uid, context=None):
|
||||
"""Finds id for case object
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
object_id = context and context.get('object_id', False) or False
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
|
||||
return ids and ids[0]
|
||||
|
||||
_defaults = {
|
||||
'sequence': lambda *args: 1,
|
||||
'probability': lambda *args: 0.0,
|
||||
'object_id' : _find_object_id
|
||||
}
|
||||
|
||||
crm_case_stage()
|
||||
|
||||
def _links_get(self, cr, uid, context=None):
|
||||
"""Gets links value for reference field
|
||||
@param self: The object pointer
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<field name="name">New</field>
|
||||
<field eval="'10'" name="probability"/>
|
||||
<field eval="'1'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
@ -16,7 +15,6 @@
|
|||
<field name="name">Qualification</field>
|
||||
<field eval="'20'" name="probability"/>
|
||||
<field eval="'2'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
@ -24,7 +22,6 @@
|
|||
<field name="name">Proposition</field>
|
||||
<field eval="'40'" name="probability"/>
|
||||
<field eval="'3'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
@ -32,7 +29,6 @@
|
|||
<field name="name">Negotiation</field>
|
||||
<field eval="'60'" name="probability"/>
|
||||
<field eval="'4'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
@ -40,7 +36,6 @@
|
|||
<field name="name">Win</field>
|
||||
<field eval="'100'" name="probability"/>
|
||||
<field eval="'5'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
@ -48,10 +43,15 @@
|
|||
<field name="name">Lost</field>
|
||||
<field eval="'0'" name="probability"/>
|
||||
<field eval="'6'" name="sequence"/>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.section" id="section_sales_department">
|
||||
<field name="name">Sales Department</field>
|
||||
<field name="code">Sales</field>
|
||||
<field name="stage_ids" eval="[(4, ref('stage_lead1')), (4, ref('stage_lead2')), (4, ref('stage_lead3')), (4, ref('stage_lead4')), (4, ref('stage_lead5')), (4, ref('stage_lead6'))]"/>
|
||||
</record>
|
||||
|
||||
<!-- CASE CATEGORY2(category2_id) -->
|
||||
<record model="crm.case.resource.type" id="type_lead1">
|
||||
<field name="name">Telesales</field>
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
<newline />
|
||||
<field name="section_id" widget="selection" />
|
||||
<field name="user_id" />
|
||||
<field name="stage_id"
|
||||
domain="[('section_id','=',section_id), ('section_id','=',False), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="stage_id" readonly="1"/>
|
||||
<group col="2" colspan="1">
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending,draft" type="object"
|
||||
|
@ -235,7 +234,7 @@
|
|||
<field name="referred" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
|
||||
<field name="stage_id" />
|
||||
<field name="stage_id" readonly="1"/>
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next Stage"
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
<label string="Stage:" align="1.0"/>
|
||||
<group colspan="1" col="4">
|
||||
<field name="stage_id" nolabel="1"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False),('object_id.model', '=', 'crm.lead')]" />
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]"
|
||||
readonly="1" />
|
||||
<button name="stage_previous"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-back" string="" />
|
||||
|
|
|
@ -16,23 +16,5 @@
|
|||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<record model="crm.case.stage" id="stage_phone1">
|
||||
<field name="name">Planned</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone2">
|
||||
<field name="name">Held</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone3">
|
||||
<field name="name">Not Held</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
<field eval=""(726) 782-0636"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm.stage_phone1"/>
|
||||
<field eval=""(769) 703-274"" name="partner_phone"/>
|
||||
<field eval="2.3" name="duration"/>
|
||||
</record>
|
||||
|
@ -32,7 +31,6 @@
|
|||
<field eval=""(392) 895-7917"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm.stage_phone2"/>
|
||||
<field eval=""(956) 293-2595"" name="partner_phone"/>
|
||||
<field eval="1.5" name="duration"/>
|
||||
</record>
|
||||
|
@ -48,7 +46,6 @@
|
|||
<field eval=""(820) 167-3208"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field name="stage_id" ref="crm.stage_phone3"/>
|
||||
<field eval=""(079) 681-2139"" name="partner_phone"/>
|
||||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
<field eval="5.0" name="duration"/>
|
||||
|
@ -64,7 +61,6 @@
|
|||
<field eval=""(077) 582-4035"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm.stage_phone1"/>
|
||||
<field eval=""(514) 698-4118"" name="partner_phone"/>
|
||||
<field eval="3.45" name="duration"/>
|
||||
</record>
|
||||
|
@ -80,7 +76,6 @@
|
|||
<field eval=""(333) 715-1450"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm.stage_phone2"/>
|
||||
<field eval=""(855) 924-4364"" name="partner_phone"/>
|
||||
<field eval="2.08" name="duration"/>
|
||||
</record>
|
||||
|
@ -96,7 +91,6 @@
|
|||
<field eval=""(468) 017-2684"" name="partner_mobile"/>
|
||||
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field name="stage_id" ref="crm.stage_phone3"/>
|
||||
<field eval=""(373) 907-1009"" name="partner_phone"/>
|
||||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
<field eval="8.56" name="duration"/>
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
<separator string="Team Members" colspan="4"/>
|
||||
<field name="member_ids" nolabel="1" colspan="4"/>
|
||||
</page>
|
||||
<page string="Stages">
|
||||
<separator string="Select stages for this Sales Team" colspan="4"/>
|
||||
<field name="stage_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field name="note" select="1" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
|
@ -97,8 +101,6 @@
|
|||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="probability"/>
|
||||
<field name="section_id"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -113,7 +115,6 @@
|
|||
<form string="Stage">
|
||||
<separator string="Stage Definition" colspan="4"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="object_id" invisible="1" />
|
||||
<field name="sequence"/>
|
||||
<field name="probability"/>
|
||||
|
|
|
@ -101,9 +101,7 @@ class crm_lead_report(osv.osv):
|
|||
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="['|',('section_id','=',False),('section_id','=',section_id)]" , readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="['|',('section_id','=',False),('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]", readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True, domain="('object_id.model', '=', 'crm.lead')]"),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
|
||||
'opening_date': fields.date('Opening Date', readonly=True),
|
||||
'creation_date': fields.date('Creation Date', readonly=True),
|
||||
|
|
|
@ -107,32 +107,32 @@
|
|||
<field name="user_id" string="Salesman">
|
||||
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="channel_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="channel_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Salesman" name="user" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" />
|
||||
<filter string="Country" icon="terp-go-home" context="{'group_by':'country_id'}" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" />
|
||||
<filter string="Country" icon="terp-go-home" context="{'group_by':'country_id'}" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
|
@ -154,14 +154,14 @@
|
|||
domain="[]" context="{'group_by':'month'}" help="Month in which lead/opportunity is created"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" help="Year in which lead/opportunity is created"/>
|
||||
</group>
|
||||
</search>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Opportunity tree view -->
|
||||
|
||||
<record id="view_report_crm_opportunity_tree" model="ir.ui.view">
|
||||
<record id="view_report_crm_opportunity_tree" model="ir.ui.view">
|
||||
<field name="name">crm.lead.report.tree</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">tree</field>
|
||||
|
@ -246,11 +246,11 @@
|
|||
|
||||
<menuitem name="Leads Analysis" id="menu_report_crm_leads_tree"
|
||||
groups="base.group_extended"
|
||||
parent="base.next_id_64" action="action_report_crm_lead" sequence="3"/>
|
||||
parent="base.next_id_64" action="action_report_crm_lead" sequence="3"/>
|
||||
|
||||
<menuitem name="Opportunities Analysis" id="menu_report_crm_opportunities_tree"
|
||||
groups="base.group_extended"
|
||||
parent="base.next_id_64" action="action_report_crm_opportunity" sequence="4"/>
|
||||
parent="base.next_id_64" action="action_report_crm_opportunity" sequence="4"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="History" position="inside">
|
||||
<field name="opportunity_ids" colspan="4" nolabel="1">
|
||||
<field name="opportunity_ids" colspan="4" nolabel="1" context="{'default_partner_id': active_id}">
|
||||
<tree string="Leads and Opportunities" colors="blue:state=='pending';gray:state=='cancel'">
|
||||
<field name="create_date"/>
|
||||
<field name="name"/>
|
||||
|
@ -44,7 +44,7 @@
|
|||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
<field name="meeting_ids" colspan="4" nolabel="1" >
|
||||
<field name="meeting_ids" colspan="4" nolabel="1" context="{'default_partner_id': active_id}">
|
||||
<tree string="Meetings" colors="gray:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="name" string="Subject" />
|
||||
|
@ -52,7 +52,7 @@
|
|||
<field name="date_deadline" string="End Date"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="phonecall_ids" colspan="4" nolabel="1">
|
||||
<field name="phonecall_ids" colspan="4" nolabel="1" context="{'default_partner_id': active_id}">
|
||||
<tree string="Phone Calls" colors="gray:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="date" string="Date"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
|
|
|
@ -70,7 +70,7 @@ class crm_claim(crm.crm_case, osv.osv):
|
|||
'partner_name': fields.char("Employee's Name", size=64),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage'),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="('object_id.model', '=', 'crm.claim')]"),
|
||||
'probability': fields.float('Probability (%)'),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
|
|
|
@ -71,6 +71,11 @@
|
|||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="crm.case.section" id="crm.section_sales_department">
|
||||
<field name="name">Sales Department</field>
|
||||
<field name="code">Sales</field>
|
||||
<field name="stage_ids" eval="[(4, ref('stage_claim1')), (4, ref('stage_claim2')), (4, ref('stage_claim3')), (4, ref('stage_claim4')), (4, ref('stage_claim5'))]"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -109,9 +109,9 @@
|
|||
<field name="section_id" widget="selection"/>
|
||||
<label string="Stage: " align="1.0"/>
|
||||
<group colspan="1" col="3">
|
||||
<field name="stage_id" nolabel="1"
|
||||
<field name="stage_id" nolabel="1" readonly="1"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.claim')]" />
|
||||
domain="[('object_id.model', '=', 'crm.claim')]" />
|
||||
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
|
|
|
@ -62,9 +62,7 @@ class crm_claim_report(osv.osv):
|
|||
'create_date': fields.datetime('Create Date', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.claim')]", readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.claim')]", readonly=True),
|
||||
|
|
|
@ -61,9 +61,7 @@ class crm_fundraising(crm.crm_case, osv.osv):
|
|||
'partner_name2': fields.char('Employee Email', size=64),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.fundraising')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="('object_id.model', '=', 'crm.fundraising')]"),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Campaign', \
|
||||
domain="[('section_id','=',section_id)]"),
|
||||
'duration': fields.float('Duration'),
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<field name="user_id" string="Responsible"/>
|
||||
<field name="date"/>
|
||||
<field name="categ_id" select="1" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
|
||||
<field name="type_id" string="Payment Mode" select="1" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
|
||||
<field name="type_id" string="Payment Mode" select="1" widget="selection"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Funds">
|
||||
|
|
|
@ -63,9 +63,7 @@ class crm_lead_report_assign(osv.osv):
|
|||
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="[('section_id','=',section_id)]" , readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]", readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="('object_id.model', '=', 'crm.lead')]"),
|
||||
'partner_id': fields.many2one('res.partner', 'Customer' , readonly=True),
|
||||
'opening_date': fields.date('Opening Date', readonly=True),
|
||||
'creation_date': fields.date('Creation Date', readonly=True),
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
<field eval="time.strftime('%Y-%m-%d', time.localtime(time.mktime(time.localtime()[0:2] + (0,)*7)-1))" name="date_to"/>
|
||||
</record>
|
||||
|
||||
<record id="sheet1" model="hr_timesheet_sheet.sheet">
|
||||
<!-- record id="sheet1" model="hr_timesheet_sheet.sheet">
|
||||
<field name="name">Sheet 1</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_current"/>
|
||||
</record>
|
||||
</record-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<field name="user_id"/>
|
||||
<field name="assigned_to" />
|
||||
<group colspan="2" col="4">
|
||||
<field name="stage_id" on_change="onchange_stage_id(stage_id)" domain="[('object_id.model', '=', 'project.issue')]" widget="selection"/>
|
||||
<field name="stage_id" on_change="onchange_stage_id(stage_id)" domain="[('object_id.model', '=', 'project.issue')]" widget="selection" readonly="1"/>
|
||||
<button icon="gtk-go-back" string="" name="stage_previous" type="object"/>
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue