[MERGE] Merge from trunk addons

bzr revid: mra@mra-laptop-20101213102512-pdoxe192euxfqrse
This commit is contained in:
Mustufa Rangwala 2010-12-13 15:55:12 +05:30
commit cc9ff03c66
90 changed files with 2403 additions and 2044 deletions

View File

@ -54,11 +54,11 @@ class Change:
def __init__(self, aVal= None, sURL=""):
self.win=DBModalDialog(60, 50, 120, 90, "Connect to Open ERP Server")
self.win.addFixedText("lblVariable", 38, 12, 60, 15, "Server")
self.win.addFixedText("lblVariable", 38, 12, 25, 15, "Server ")
self.win.addEdit("txtHost",-2,9,60,15,sURL[sURL.find("/")+2:sURL.rfind(":")])
self.win.addFixedText("lblReportName",45 , 31, 60, 15, "Port")
self.win.addFixedText("lblReportName",45 , 31, 15, 15, "Port ")
self.win.addEdit("txtPort",-2,28,60,15,sURL[sURL.rfind(":")+1:])
self.win.addFixedText("lblLoginName", 2, 51, 60, 15, "Protocol Connection")
@ -92,6 +92,8 @@ class Change:
global url
url = self.protocol[self.win.getListBoxSelectedItem("lstProtocol")]+self.win.getEditText("txtHost")+":"+self.win.getEditText("txtPort")
self.sock=RPCSession(url)
desktop=getDesktop()
doc = desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
docinfo.setUserFieldValue(0,url)
res=self.sock.listdb()

View File

@ -192,6 +192,10 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
Change(aVal,url)
if aVal[1]== -1:
self.win.getEditText("lstDatabase")
self.win.removeListBoxItems("lstDatabase", 0, self.win.getListBoxItemCount("lstDatabase"))
self.win.setEditText("txtHost",aVal[0])
for i in range(len(aVal[1])):
self.lstDatabase.addItem(aVal[1][i],i)
elif aVal[1]==0:
ErrorDialog(aVal[0],"")
else:

View File

@ -22,6 +22,7 @@
import time
import base64
import tools
from osv import fields
from osv import osv
from tools.translate import _
@ -135,6 +136,52 @@ class crm_case(object):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.context_section_id.id or False
def _find_next_stage(self, cr, uid, stage_list, index, current_seq, stage_pool, context=None):
if index + 1 == len(stage_list):
return False
next_stage_id = stage_list[index + 1]
next_stage = stage_pool.browse(cr, uid, next_stage_id, context=context)
if not next_stage:
return False
next_seq = next_stage.sequence
if (abs(next_seq - current_seq)) >= 1:
return next_stage
else :
return self._find_next_stage(cr, uid, stage_list, index + 1, current_seq, stage_pool)
def stage_change(self, cr, uid, ids, context=None, order='sequence'):
if not context:
context = {}
stage_pool = self.pool.get('crm.case.stage')
stage_type = context and context.get('stage_type','')
current_seq = False
next_stage_id = False
for case in self.browse(cr, uid, ids, context):
next_stage = False
data = {}
domain = [('type', '=', stage_type),('section_ids', '=', case.section_id.id)]
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=order)
current_seq = case.stage_id.sequence
index = -1
if case.stage_id and case.stage_id.id in stages:
index = stages.index(case.stage_id.id)
next_stage = self._find_next_stage(cr, uid, stages, index, current_seq, stage_pool, context=context)
if next_stage:
next_stage_id = next_stage.id
data = {'stage_id': next_stage.id}
if next_stage.on_change:
data.update({'probability': next_stage.probability})
self.write(cr, uid, [case.id], data, context=context)
return next_stage_id
def stage_next(self, cr, uid, ids, context=None):
"""This function computes next stage for case from its current stage
using available stage for that case type
@ -143,32 +190,10 @@ class crm_case(object):
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
stage_pool = self.pool.get('crm.case.stage')
model = self._name
for case in self.browse(cr, uid, ids, context):
next_stage = False
data = {}
domain = [('object_id.model', '=', model),('section_ids', '=', case.section_id.id)]
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
return self.stage_change(cr, uid, ids, context=context, order='sequence')
def stage_previous(self, cr, uid, ids, context=None):
"""This function computes previous stage for case from its current stage
using available stage for that case type
@ -177,31 +202,7 @@ class crm_case(object):
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
stage_pool = self.pool.get('crm.case.stage')
model = self._name
for case in self.browse(cr, uid, ids, context):
prev_stage = False
data = {}
domain = [('object_id.model', '=', model),('section_ids', '=', case.section_id.id)]
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 prev_stage
return self.stage_change(cr, uid, ids, context=context, order='sequence desc')
def onchange_partner_id(self, cr, uid, ids, part, email=False):
"""This function returns value of partner address based on partner
@ -482,27 +483,27 @@ class crm_case_stage(osv.osv):
_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')
'requirements': fields.text('Requirements'),
'type': fields.selection([('lead','Lead'),('opportunity','Opportunity'),('claim','Claim'), ('fundraising','Fundraising')], 'Type'),
}
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object
def _find_stage_type(self, cr, uid, context=None):
"""Finds type of stage according to object.
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users 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]
type = context and context.get('type', '') or ''
return type
_defaults = {
'sequence': lambda *args: 1,
'probability': lambda *args: 0.0,
'object_id' : _find_object_id
'type': _find_stage_type,
}
crm_case_stage()
@ -629,6 +630,7 @@ class crm_case_stage(osv.osv):
_columns = {
'section_ids':fields.many2many('crm.case.section', 'section_stage_rel', 'stage_id', 'section_id', 'Sections'),
}
crm_case_stage()

View File

@ -135,7 +135,7 @@ class crm_lead(crm_case, osv.osv):
],'Type', help="Type is used to separate Leads and Opportunities"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'date_closed': fields.datetime('Closed', readonly=True),
'stage_id': fields.many2one('crm.case.stage', 'Stage'),
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('type','=','lead')]"),
'user_id': fields.many2one('res.users', 'Salesman',help='By Default Salesman is Administrator when create New User'),
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),
@ -150,6 +150,19 @@ class crm_lead(crm_case, osv.osv):
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
}
def _get_stage_id(self, cr, uid, context=None):
"""Finds type of stage according to object.
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
type = context and context.get('stage_type', '')
stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('type','=',type),('sequence','>=',1)])
return stage_ids and stage_ids[0] or False
_defaults = {
'active': lambda *a: 1,
@ -160,6 +173,7 @@ class crm_lead(crm_case, osv.osv):
'section_id': crm_case._get_section,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'stage_id': _get_stage_id,
}
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
@ -297,7 +311,7 @@ class crm_lead(crm_case, osv.osv):
return super(crm_lead,self).write(cr, uid, ids, vals, context)
def stage_next(self, cr, uid, ids, context=None):
stage = super(crm_lead, self).stage_next(cr, uid, ids, context)
stage = super(crm_lead, self).stage_next(cr, uid, ids, context=context)
if stage:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
if stage_obj.on_change:

View File

@ -2,34 +2,39 @@
<openerp>
<data noupdate="1">
<record model="crm.case.stage" id="stage_lead6">
<field name="name">Lost</field>
<field eval="'0'" name="probability"/>
<field eval="'0'" name="sequence"/>
<field name="type">lead</field>
</record>
<!-- CASE STATUS(stage_id) -->
<record model="crm.case.stage" id="stage_lead1">
<field name="name">New</field>
<field eval="'10'" name="probability"/>
<field eval="'1'" name="sequence"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
<field name="type">lead</field>
</record>
<record model="crm.case.stage" id="stage_lead2">
<field name="name">Qualification</field>
<field eval="'20'" name="probability"/>
<field eval="'2'" name="sequence"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
<field name="type">lead</field>
</record>
<record model="crm.case.stage" id="stage_lead3">
<field name="name">Proposition</field>
<field eval="'40'" name="probability"/>
<field eval="'3'" name="sequence"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
<field name="type">lead</field>
</record>
<record model="crm.case.stage" id="stage_lead4">
<field name="name">Negotiation</field>
<field eval="'60'" name="probability"/>
<field eval="'4'" name="sequence"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
<field name="type">lead</field>
</record>
<record model="crm.case.stage" id="stage_lead5">
@ -37,15 +42,10 @@
<field eval="'100'" name="probability"/>
<field eval="'5'" name="sequence"/>
<field eval="1" name="on_change"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
<field name="type">lead</field>
</record>
<record model="crm.case.stage" id="stage_lead6">
<field name="name">Lost</field>
<field eval="'0'" name="probability"/>
<field eval="'6'" name="sequence"/>
<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>

View File

@ -9,7 +9,7 @@
<field name="domain">['|', ('type','=','lead'), ('type','=',False)]</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
<field name="context">{'search_default_current':1, 'default_type': 'lead', 'search_default_section_id': section_id}</field>
<field name="context">{'search_default_current':1, 'default_type': 'lead', 'search_default_section_id': section_id, 'stage_type': 'lead'}</field>
<field name="help">'Leads' allows you to manage and keep track of all first potential interests of a partner in one of your products or services. A lead is a first, unqualified, contact with a prospect or customer. After being qualified, a lead can be converted into a business opportunity with the creation of the related partner for further detailed tracking of any linked activities. You can use leads when you import a database of prospects or to integrate your website's contact form with OpenERP.</field>
</record>

View File

@ -9,8 +9,8 @@
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
<field name="context">{'object_id':'crm.lead'}</field>
<field name="domain">[('type', '=', 'lead')]</field>
<field name="context">{'type':'lead'}</field>
<field name="help">Create specific stages that will help your sales better organise their sales pipeline by maintaining them to their leads and sales opportunities. It will allow them to easily track how is positioned a specific lead or opportunity in the sales cycle.</field>
</record>
@ -57,14 +57,14 @@
<newline />
<field name="section_id" widget="selection" />
<field name="user_id" />
<field name="stage_id" domain="[('object_id.model', '=', 'crm.lead'), ('section_ids', '=', section_id)]"/>
<field name="stage_id" domain="[('type','=','lead'),('section_ids', '=', section_id)]" />
<group col="2" colspan="1">
<button name="stage_previous" string=""
states="open,pending,draft" type="object"
icon="gtk-go-back" />
icon="gtk-go-back" context="{'stage_type': 'lead'}" />
<button name="stage_next" string=""
states="open,pending,draft" type="object"
icon="gtk-go-forward" />
icon="gtk-go-forward" context="{'stage_type': 'lead'}" />
</group>
<field name="type" invisible="1"/>
</group>
@ -329,7 +329,7 @@
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<field name="stage_id" widget="selection" domain="[('type', '=', 'lead')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<separator orientation="vertical"/>
<field name="country_id" context="{'invisible_country': False}">

View File

@ -47,7 +47,7 @@
<field name="rrule_type" string="Recurrency"
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
<button string="Edit All"
help="Edit all Ourrences of recurrent Meeting"
help="Edit all Occurrences of recurrent Meeting"
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
name="open_meeting" icon="gtk-edit"
type="object" />

View File

@ -50,7 +50,9 @@ class crm_opportunity(osv.osv):
'date_deadline': fields.date('Expected Closing'),
'date_action': fields.date('Next Action Date'),
'title_action': fields.char('Next Action', size=64),
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('type','=','opportunity')]"),
}
def case_close(self, cr, uid, ids, *args):
"""Overrides close for crm_case for setting probability and close date
@param self: The object pointer
@ -60,7 +62,13 @@ class crm_opportunity(osv.osv):
@param *args: Tuple Value for additional Params
"""
res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
value = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}
data_obj = self.pool.get('ir.model.data')
data_id = data_obj._get_id(cr, uid, 'crm', 'stage_lead5')
stage_id = data_obj.browse(cr, uid, data_id).res_id
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage_id)
value = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id}
if stage_obj.on_change:
value.update({'probability': stage_obj.probability})
self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
@ -79,16 +87,22 @@ class crm_opportunity(osv.osv):
@param *args: Tuple Value for additional Params
"""
res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
value = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}
data_obj = self.pool.get('ir.model.data')
data_id = data_obj._get_id(cr, uid, 'crm', 'stage_lead6')
stage_id = data_obj.browse(cr, uid, data_id).res_id
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage_id)
value = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id}
if stage_obj.on_change:
value.update({'probability': stage_obj.probability})
res = self.write(cr, uid, ids, value)
self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
opp = self.browse(cr, uid, id)
if opp.type == 'opportunity':
message = _("The opportunity '%s' has been marked as lost.") % name
self.log(cr, uid, id, message)
return res
def case_cancel(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting probability
@param self: The object pointer
@ -110,7 +124,7 @@ class crm_opportunity(osv.osv):
@param *args: Tuple Value for additional Params
"""
res = super(crm_opportunity, self).case_reset(cr, uid, ids, *args)
self.write(cr, uid, ids, {'stage_id': False})
self.write(cr, uid, ids, {'stage_id': False, 'probability': 0.0})
return res

View File

@ -1,56 +1,109 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record model="crm.case.categ" id="categ_oppor1">
<field name="name">Interest in Computer</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor2">
<field name="name">Interest in Accessories</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor3">
<field name="name">Need Services</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor4">
<field name="name">Need Information</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor5">
<field name="name">Need a Website Design</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor6">
<field name="name">Potential Reseller</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor7">
<field name="name">Need Consulting</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor8">
<field name="name">Other</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<!-- CASE STATUS(stage_id) -->
<record model="crm.case.stage" id="stage_opportunity6">
<field name="name">Lost</field>
<field eval="'0'" name="probability"/>
<field eval="'0'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity1">
<field name="name">New</field>
<field eval="'10'" name="probability"/>
<field eval="'1'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity2">
<field name="name">Qualification</field>
<field eval="'20'" name="probability"/>
<field eval="'2'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity3">
<field name="name">Proposition</field>
<field eval="'40'" name="probability"/>
<field eval="'3'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity4">
<field name="name">Negotiation</field>
<field eval="'60'" name="probability"/>
<field eval="'4'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity5">
<field name="name">Won</field>
<field eval="'100'" name="probability"/>
<field eval="'5'" name="sequence"/>
<field eval="1" name="on_change"/>
<field name="type">opportunity</field>
</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_opportunity1')), (4, ref('stage_opportunity2')), (4, ref('stage_opportunity3')), (4, ref('stage_opportunity4')), (4, ref('stage_opportunity5')), (4, ref('stage_opportunity6'))]"/>
</record>
<!-- CASE CATEGORY(categ_id) -->
<record model="crm.case.categ" id="categ_oppor1">
<field name="name">Interest in Computer</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor2">
<field name="name">Interest in Accessories</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor3">
<field name="name">Need Services</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor4">
<field name="name">Need Information</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor5">
<field name="name">Need a Website Design</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor6">
<field name="name">Potential Reseller</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor7">
<field name="name">Need Consulting</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor8">
<field name="name">Other</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<!-- Case Resource(type_id) -->
<record model="crm.case.resource.type" id="type_oppor1">
<field name="name">Campaign 2</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_oppor2">
<field name="name">Campaign 1</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_oppor1">
<field name="name">Campaign 2</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_oppor2">
<field name="name">Campaign 1</field>
<field name="section_id" ref="section_sales_department"/>
</record>
</data>
</openerp>

View File

@ -20,7 +20,7 @@
<field eval="85000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor1"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field name="stage_id" ref="crm.stage_opportunity3"/>
<field eval="&quot;CONS TRUST (AZ) 529701 - 1000 units&quot;" name="name"/>
</record>
<record id="crm_case_rdroundfundingunits0" model="crm.lead">
@ -36,7 +36,7 @@
<field eval="50" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor5"/>
<field name="stage_id" ref="crm.stage_lead1"/>
<field name="stage_id" ref="crm.stage_opportunity1"/>
<field eval="&quot;3rd Round Funding - 1000 units &quot;" name="name"/>
</record>
<record id="crm_case_mediapoleunits0" model="crm.lead">
@ -53,7 +53,7 @@
<field eval="70" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor7"/>
<field name="stage_id" ref="crm.stage_lead5"/>
<field name="stage_id" ref="crm.stage_opportunity5"/>
<field eval="&quot;Mediapole - 5000 units&quot;" name="name"/>
<field eval="&quot;info@mycompany.net&quot;" name="email_from"/>
</record>
@ -70,7 +70,7 @@
<field eval="45000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor5"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field name="stage_id" ref="crm.stage_opportunity4"/>
<field eval="&quot;ABC FUEL CO 829264 - 1000 units &quot;" name="name"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
</record>
@ -86,7 +86,7 @@
<field eval="42000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor2"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field name="stage_id" ref="crm.stage_opportunity6"/>
<field eval="&quot;Dirt Mining Ltd 271742 - 1000 units&quot;" name="name"/>
</record>
</data>

View File

@ -28,7 +28,7 @@
<field name="res_model">crm.lead</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{'search_default_user_id':uid,'search_default_current':1, 'search_default_section_id':section_id,'default_type': 'opportunity'}</field>
<field name="context">{'search_default_user_id':uid,'search_default_current':1, 'search_default_section_id':section_id, 'stage_type': 'opportunity'}</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="help">Opportunities allows you to manage and keep track of your sales pipeline by creating specific customer or prospect related sales documents in order to follow up potential sales. Information such as the expected revenue, opportunity stage, expected closing date, communication history and so on can be maintained in them. Opportunities can be connected with the email gateway: new emails create opportunities, each of them automatically gets the history of the conversation with the customer.

View File

@ -1,6 +1,21 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="crm_opportunity_stage_act" model="ir.actions.act_window">
<field name="name">Stages</field>
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="domain">[('type', '=', 'opportunity')]</field>
<field name="context">{'type':'opportunity'}</field>
<field name="help">Create specific stages that will help your sales better organise their sales pipeline by maintaining them to their sales opportunities. It will allow them to easily track how is positioned a specific opportunity in the sales cycle.</field>
</record>
<menuitem action="crm_opportunity_stage_act" id="menu_crm_opportunity_stage_act" name="Stages"
groups="base.group_extended" sequence="0"
parent="base.menu_crm_config_opportunity" />
<!-- Opportunities Form View -->
<record model="ir.ui.view" id="crm_case_form_view_oppor">
<field name="name">Opportunities</field>
@ -15,12 +30,12 @@
<group colspan="1" col="4">
<field name="stage_id" nolabel="1"
on_change="onchange_stage_id(stage_id)"
domain="[('object_id.model', '=', 'crm.lead'), ('section_ids', '=', section_id)]"/>
domain="[('type','=','opportunity'),('section_ids', '=', section_id)]"/>
<button name="stage_previous"
states="draft,open,pending" type="object"
icon="gtk-go-back" string="" />
<button name="stage_next" states="draft,open,pending"
type="object" icon="gtk-go-forward" string="" />
type="object" icon="gtk-go-forward" string="" context="{'stage_type': 'opportunity'}"/>
</group>
<field name="user_id"/>
@ -303,7 +318,7 @@
</field>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<field name="stage_id" widget="selection" domain="[('type', '=', 'opportunity')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<separator orientation="vertical"/>
<field name="country_id" context="{'invisible_country': False}">

View File

@ -3,10 +3,13 @@
<data>
<menuitem icon="terp-partner" id="base.menu_base_partner" name="Sales" sequence="0"
groups="base.group_sale_manager,base.group_sale_salesman"/>
groups="base.group_sale_manager,base.group_sale_salesman,base.group_partner_manager"/>
<menuitem id="base.menu_crm_config_lead" name="Leads &amp; Opportunities"
parent="base.menu_base_config" sequence="1" groups="base.group_sale_manager"/>
<menuitem id="base.menu_crm_config_opportunity" name="Opportunities"
parent="base.menu_base_config" sequence="1" groups="base.group_sale_manager"/>
<menuitem id="base.menu_sale_config_sales" name="Sales"
parent="base.menu_base_config" sequence="0" groups="base.group_sale_manager"/>
@ -119,7 +122,8 @@
<form string="Stage">
<separator string="Stage Definition" colspan="4"/>
<field name="name" select="1"/>
<field name="object_id" invisible="1" />
<field name="type" invisible="1" />
<field name="section_ids" invisible="1" />
<field name="sequence"/>
<field name="probability"/>
<field name="on_change"/>

View File

@ -63,7 +63,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', readonly=True, domain="('object_id.model', '=', 'crm.lead')]"),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True, domain="('type', '=', '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),

View File

@ -111,7 +111,7 @@
<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="stage_id" widget="selection" domain="[('type', '=', 'lead')]" />
<field name="categ_id" widget="selection"/>
<field name="type_id" widget="selection"/>
<field name="channel_id" widget="selection"/>
@ -133,7 +133,8 @@
<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'}" />
context="{'group_by':'company_id'}"
groups="base.group_multi_company"/>
<separator orientation="vertical" />
<filter string="Stage" name="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />

View File

@ -42,3 +42,6 @@
"access_res_partner_bank_type_crm_user","res.partner.bank.type.crm.user","base.model_res_partner_bank_type","base.group_sale_salesman",1,0,0,0
"access_res_partner_bank_type_crm_manager","res.partner.bank.type.crm.manager","base.model_res_partner_bank_type","base.group_sale_manager",1,0,0,0
"access_res_partner_canal_manager","res.partner.canal.manager","base.model_res_partner_canal","base.group_sale_manager",1,1,1,1
"access_crm_lead_partner_manager","crm.lead.partner.manager","model_crm_lead","base.group_partner_manager",1,1,1,1
"access_crm_phonecall_partner_manager","crm.phonecall.partner.manager","model_crm_phonecall","base.group_partner_manager",1,1,1,1
"access_crm_meeting_partner_manager","crm.meeting.partner.manager","model_crm_meeting","base.group_partner_manager",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
42 access_res_partner_bank_type_crm_user res.partner.bank.type.crm.user base.model_res_partner_bank_type base.group_sale_salesman 1 0 0 0
43 access_res_partner_bank_type_crm_manager res.partner.bank.type.crm.manager base.model_res_partner_bank_type base.group_sale_manager 1 0 0 0
44 access_res_partner_canal_manager res.partner.canal.manager base.model_res_partner_canal base.group_sale_manager 1 1 1 1
45 access_crm_lead_partner_manager crm.lead.partner.manager model_crm_lead base.group_partner_manager 1 1 1 1
46 access_crm_phonecall_partner_manager crm.phonecall.partner.manager model_crm_phonecall base.group_partner_manager 1 1 1 1
47 access_crm_meeting_partner_manager crm.meeting.partner.manager model_crm_meeting base.group_partner_manager 1 1 1 1

View File

@ -8,7 +8,7 @@
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
probability: 1.0
stage_id: crm.stage_lead1
stage_id: crm.stage_opportunity1
categ_id: crm.categ_oppor2
section_id: crm.section_sales_department

View File

@ -70,6 +70,7 @@ class crm_lead2opportunity(osv.osv_memory):
cr, uid, opportunity_view_tree, context=context).res_id
lead = leads.browse(cr, uid, record_id, context=context)
stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('type','=','opportunity'),('sequence','>=',1)])
for this in self.browse(cr, uid, ids, context=context):
vals ={
@ -78,7 +79,8 @@ class crm_lead2opportunity(osv.osv_memory):
'name': this.name,
'partner_id': this.partner_id.id,
'user_id': (this.partner_id.user_id and this.partner_id.user_id.id) or (lead.user_id and lead.user_id.id),
'type': 'opportunity'
'type': 'opportunity',
'stage_id': stage_ids and stage_ids[0] or False
}
lead.write(vals, context=context)
leads.history(cr, uid, [lead], _('Opportunity'), details='Converted to Opportunity', context=context)

View File

@ -33,13 +33,15 @@
<field name="target">new</field>
</record>
<!-- partner To Opportunity wizard -->
<!-- partner To Opportunity wizard -->
<act_window id="crm_partner2opportunity"
key2="client_action_multi" name="Create Opportunity"
res_model="crm.partner2opportunity" src_model="res.partner"
view_mode="form" target="new" view_type="form"
groups="base.group_extended"/>
<act_window id="crm_partner2opportunity"
key2="client_action_multi" name="Create Opportunity"
res_model="crm.partner2opportunity" src_model="res.partner"
view_id="view_crm_partner2opportunity"
view_mode="form" target="new" view_type="form"
groups="base.group_extended"/>
</data>
</data>
</openerp>

View File

@ -63,7 +63,7 @@ class crm_claim(crm.crm_case, osv.osv):
'email_cc': fields.text('Watchers Emails', size=252, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'partner_phone': fields.char('Phone', size=32),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="('object_id.model', '=', 'crm.claim')]"),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('type','=','claim')]"),
'cause': fields.text('Root Cause'),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
@ -72,6 +72,19 @@ class crm_claim(crm.crm_case, osv.osv):
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
}
def _get_stage_id(self, cr, uid, context=None):
"""Finds type of stage according to object.
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
type = context and context.get('stage_type', '')
stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('type','=',type),('sequence','>=',1)])
return stage_ids and stage_ids[0] or False
_defaults = {
'user_id': crm.crm_case._get_default_user,
@ -82,7 +95,8 @@ class crm_claim(crm.crm_case, osv.osv):
'section_id':crm.crm_case. _get_section,
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'stage_id': _get_stage_id,
}
def onchange_partner_id(self, cr, uid, ids, part, email=False):
@ -119,7 +133,6 @@ class crm_claim(crm.crm_case, osv.osv):
address = self.pool.get('res.partner.address').browse(cr, uid, add)
return {'value': {'email_from': address.email, 'partner_phone': address.phone, 'partner_mobile': address.mobile}}
crm_claim()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -45,22 +45,22 @@
<record model="crm.case.stage" id="stage_claim1">
<field name="name">Accepted as Claim</field>
<field name="sequence">1</field>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
<field name="type">claim</field>
</record>
<record model="crm.case.stage" id="stage_claim5">
<field name="name">Actions Defined</field>
<field name="sequence">2</field>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
<field name="type">claim</field>
</record>
<record model="crm.case.stage" id="stage_claim2">
<field name="name">Actions Done</field>
<field name="sequence">10</field>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
<field name="type">claim</field>
</record>
<record model="crm.case.stage" id="stage_claim3">
<field name="name">Won't fix</field>
<field name="sequence">11</field>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
<field name="sequence">0</field>
<field name="type">claim</field>
</record>

View File

@ -14,7 +14,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_claims_tree_view"/>
<field name="context">{'search_default_section_id': section_id, "search_default_current":1,"search_default_user_id":uid}</field>
<field name="context">{'search_default_section_id': section_id, "search_default_current":1,"search_default_user_id":uid, "stage_type":'claim'}</field>
<field name="search_view_id" ref="crm_claim.view_crm_case_claims_filter"/>
<field name="help">Record and track your customers' claims. Claims can be linked to a sales order or a lot. You can send emails with attachments and get the history of everything that happened on a specific claim (emails sent, interventions type and so on..). Claims can be automatically linked to an email address using the mail gateway module.</field>
</record>

View File

@ -29,8 +29,8 @@
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.claim')]</field>
<field name="context">{'object_id':'crm.claim'}</field>
<field name="domain">[('type', '=', 'claim')]</field>
<field name="context">{'type':'claim'}</field>
<field name="help">You can create claim stages to categorize the status of every claim entered in the system. The stages define all the steps required for the resolution of a claim.</field>
</record>
@ -78,8 +78,7 @@
<field name="user_id"/>
<field name="priority"/>
<group colspan="2" col="4">
<field name="stage_id"
domain="[('object_id.model', '=', 'crm.claim'), ('section_ids', '=', section_id)]" />
<field name="stage_id" domain="[('type','=','claim')]"/>
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>

View File

@ -62,7 +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', readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True, domain="[('type','=','claim')]"),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]", readonly=True),

View File

@ -86,7 +86,7 @@
help="My Sales Team(s)" />
</field>
<field name="company_id">
<field name="company_id" groups="base.group_multi_company">
<filter icon="terp-go-home"
context="{'invisible_section': False}"
domain="[('section_id.user_id.company_id','=',uid)]"
@ -108,7 +108,7 @@
<separator orientation="vertical"/>
<field name="partner_id"/>
<separator orientation="vertical"/>
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
<field name="stage_id" widget="selection" domain="[('type', '=', 'claim')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
<separator orientation="vertical"/>
<field name="priority" />

View File

@ -61,7 +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="('object_id.model', '=', 'crm.fundraising')]"),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('type', '=', 'fundraising')]"),
'type_id': fields.many2one('crm.case.resource.type', 'Campaign', \
domain="[('section_id','=',section_id)]"),
'duration': fields.float('Duration'),

View File

@ -29,8 +29,8 @@
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
<field name="context">{'object_id':'crm.fundraising'}</field>
<field name="domain">[('type', '=', 'fundraising')]</field>
<field name="context">{'type':'fundraising'}</field>
<field name="help">Create and manage fund raising activity categories you want to be maintained in the system.</field>
</record>

View File

@ -105,7 +105,7 @@
domain="[('section_id.user_id','=',uid)]"
help="My Sales Team(s)" />
</field>
<field name="company_id">
<field name="company_id" groups="base.group_multi_company">
<filter icon="terp-go-home"
context="{'invisible_section': False}"
domain="[('section_id.user_id.company_id','=',uid)]"
@ -146,8 +146,9 @@
<separator orientation="vertical" />
<filter string="Company" icon="terp-go-home"
domain="[]"
groups="base.group_multi_company"
context="{'group_by':'company_id'}" />
<separator orientation="vertical" />
<separator orientation="vertical" groups="base.group_multi_company"/>
<filter string="Day" icon="terp-go-today"
domain="[]" context="{'group_by':'day'}"
help="Date of fundraising"/>

View File

@ -78,7 +78,7 @@
domain="[('section_id.user_id','=',uid)]"
help="My Sales Team(s)" />
</field>
<field name="company_id">
<field name="company_id" groups="base.group_multi_company">
<filter icon="terp-go-home"
context="{'invisible_section': False}"
domain="[('section_id.user_id.company_id','=',uid)]"
@ -115,8 +115,9 @@
<separator orientation="vertical" />
<filter string="Company" icon="terp-go-home"
domain="[]"
groups="base.group_multi_company"
context="{'group_by':'company_id'}" />
<separator orientation="vertical" />
<separator orientation="vertical" groups="base.group_multi_company"/>
<filter string="Day" icon="terp-go-today"
domain="[]" context="{'group_by':'day'}" help="Date of helpdesk requests"/>
<filter string="Month" icon="terp-go-month"

View File

@ -63,7 +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="('object_id.model', '=', 'crm.lead')]"),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="('type', '=', '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),

View File

@ -33,7 +33,7 @@
<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="stage_id" widget="selection" domain="[('type', '=', 'opportunity')]" />
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>

View File

@ -57,9 +57,8 @@ class email_server(osv.osv):
'user' : fields.char('User Name', size=256, required=True, readonly=True, states={'draft':[('readonly', False)]}),
'password' : fields.char('Password', size=1024, invisible=True, required=True, readonly=True, states={'draft':[('readonly', False)]}),
'note': fields.text('Description'),
'action_id':fields.many2one('ir.actions.server', 'Reply Email', required=False, domain="[('state','=','email')]",
help="An Email Server Action. It will be run whenever an e-mail is fetched from server."),
'object_id': fields.many2one('ir.model', "Model", required=True, help="OpenObject Model. Generates a record of this model."),
'action_id':fields.many2one('ir.actions.server', 'Email Server Action', required=False, domain="[('state','=','email')]", help="An Email Server Action. It will be run whenever an e-mail is fetched from server."),
'object_id': fields.many2one('ir.model', "Model", required=True, help="OpenObject Model. Generates a record of this model.\nSelect Object with message_new attrbutes."),
'priority': fields.integer('Server Priority', readonly=True, states={'draft':[('readonly', False)]}, help="Priority between 0 to 10, select define the order of Processing"),
'user_id':fields.many2one('res.users', 'User', required=False),
'message_ids': fields.one2many('mailgate.message', 'server_id', 'Messages', readonly=True),
@ -82,8 +81,19 @@ class email_server(osv.osv):
return False
return True
def check_model(self, cr, uid, ids, context = None):
if context is None:
context = {}
current_rec = self.read(cr, uid, ids, context)[0]
if current_rec:
model = self.pool.get(current_rec.get('object_id')[1])
if hasattr(model, 'message_new'):
return True
return False
_constraints = [
(check_duplicate, 'Warning! Can\'t have duplicate server configuration!', ['user', 'password'])
(check_duplicate, 'Warning! Can\'t have duplicate server configuration!', ['user', 'password']),
(check_model, 'Warning! Record for selected Model can not be created\nPlease choose valid Model', ['object_id'])
]
def onchange_server_type(self, cr, uid, ids, server_type=False, ssl=False):
@ -150,6 +160,7 @@ class email_server(osv.osv):
context.update({'get_server': True})
for server in self.browse(cr, uid, ids, context):
count = 0
user = server.user_id.id or uid
try:
if server.type == 'imap':
imap_server = self.button_confirm_login(cr, uid, [server.id], context=context)
@ -157,9 +168,9 @@ class email_server(osv.osv):
result, data = imap_server.search(None, '(UNSEEN)')
for num in data[0].split():
result, data = imap_server.fetch(num, '(RFC822)')
res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, context=context)
res_id = email_tool.process_email(cr, user, server.object_id.model, data[0][1], attach=server.attach, context=context)
if res_id and server.action_id:
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
action_pool.run(cr, user, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
imap_server.store(num, '+FLAGS', '\\Seen')
count += 1
@ -174,9 +185,9 @@ class email_server(osv.osv):
for num in range(1, numMsgs + 1):
(header, msges, octets) = pop_server.retr(num)
msg = '\n'.join(msges)
res_id = email_tool.process_email(cr, uid, server.object_id.model, msg, attach=server.attach, context=context)
res_id = email_tool.process_email(cr, user, server.object_id.model, msg, attach=server.attach, context=context)
if res_id and server.action_id:
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
action_pool.run(cr, user, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
pop_server.dele(num)

View File

@ -7,7 +7,7 @@
<field name="model">email.server</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');black:state in ('wating');gray:state in('done')" string="POP/IMAP Servers">
<tree colors="blue:state in ('draft');black:state in ('waiting');gray:state in('done')" string="POP/IMAP Servers">
<field name="name"/>
<field name="type"/>
<field name="user"/>
@ -48,6 +48,7 @@
<group col="2" colspan="2">
<separator string="Auto Reply?" colspan="2"/>
<field name="action_id"/>
<field name="user_id"/>
</group>
<group col="2" colspan="2">
<separator string="Process Parameter" colspan="2"/>

View File

@ -118,6 +118,7 @@
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
<field name="help">This lists show you every task work you can invoice to the customer. Select the lines in order to generate the invoices automatically.</field>
</record>
<menuitem

View File

@ -2,3 +2,4 @@
"mail_gateway_mailgate_message","mail_gateway.mailgate.message","model_mailgate_message","base.group_system",1,1,1,1
"mail_gateway_mailgate_thread","mail_gateway.mailgate.thread","model_mailgate_thread","base.group_system",1,1,1,1
"mail_gateway_message_internal_user","mail_gateway.mailgate.message.internal","model_mailgate_message","base.group_user",1,0,0,0
"mail_gateway_mailgate_message_partner_manager","mail_gateway.mailgate.message.partner.manager","model_mailgate_message","base.group_partner_manager",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 mail_gateway_mailgate_message mail_gateway.mailgate.message model_mailgate_message base.group_system 1 1 1 1
3 mail_gateway_mailgate_thread mail_gateway.mailgate.thread model_mailgate_thread base.group_system 1 1 1 1
4 mail_gateway_message_internal_user mail_gateway.mailgate.message.internal model_mailgate_message base.group_user 1 0 0 0
5 mail_gateway_mailgate_message_partner_manager mail_gateway.mailgate.message.partner.manager model_mailgate_message base.group_partner_manager 1 1 1 1

View File

@ -8,6 +8,7 @@ Pre requirements :
http://starship.python.net/crew/mhammond/win32/
3.If you are using MS Outlook 2007 than you are required to install "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (CDO 1.21)". It can be downloaded from
http://www.microsoft.com/downloads/en/details.aspx?familyid=2714320d-c997-4de1-986f-24f081725d36&displaylang=en
and With MS Outlook2003 Install inbuilt Collaboration Data Objects(CDO) while installing Outlook.
How to install openerp-outlook plug-in?
======================================================================================

View File

@ -55,7 +55,8 @@ class outlook_installer(osv.osv_memory):
Pre-requirements :
1. Python 2.6+ .
2. Python for Windows extensions - PyWin32 this module for python must be installed for appropriate version of the Python.
3. If you are using MS Outlook 2007 than you are required to install "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (CDO 1.21)".
3. If With MS Outlook 2007 it is required to install externally "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (CDO 1.21)".
and With MS Outlook2003 Install inbuilt Collaboration Data Objects(CDO) while installing Outlook.
How to install openerp-outlook plug-in?
1. Save the executable plug-in file.

View File

@ -151,47 +151,50 @@ class OutlookAddin:
activeExplorer = application.ActiveExplorer()
if activeExplorer is not None:
bars = activeExplorer.CommandBars
new_bar = bars.Add('Open ERP',0,0,0)
menu_bar = bars.Item("Menu Bar")
tools_menu = menu_bar.Controls(5)
tools_menu = CastTo(tools_menu, "CommandBarPopup")
item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.menu_bar_Button = DispatchWithEvents(item, Configuration)
item.Caption="OpenERP Configuration"
item.Caption="Configuration"
item.TooltipText = "Click to configure OpenERP"
item.Enabled = True
item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.menu_bar_arch_Button = DispatchWithEvents(item, ArchiveEvent)
item.Caption="Push to OpenERP"
item.Caption="Push"
item.TooltipText = "Click to push to OpenERP"
item.Enabled = True
toolbar = bars.Item("Standard")
openerp_bar = bars.Item('Open ERP')
item = toolbar.Controls.Add(Type=constants.msoControlButton, Temporary=True)
item = openerp_bar.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.toolbarButton = DispatchWithEvents(item, ArchiveEvent)
item.Caption="Push to OpenERP"
item.Caption="Push"
item.TooltipText = "Click to push to OpenERP"
item.Enabled = True
# Adding Menu in Menu Bar to the Web Menu of the Outlook
toolbarweb = bars.Item("Web")
item = toolbarweb.Controls.Add(Type = constants.msoControlButton, Temporary = True)
item = openerp_bar.Controls.Add(Type = constants.msoControlButton, Temporary = True)
item = self.toolbarButtonOpenPartner = DispatchWithEvents(item, OpenPartner)
item.Caption = "Open Partners"
item.Caption = "Partner"
item.TooltipText = "Click to Open OpenERP Partner Contact Information."
item.Enabled = True
item = toolbarweb.Controls.Add(Type = constants.msoControlButton, Temporary = True)
item = openerp_bar.Controls.Add(Type = constants.msoControlButton, Temporary = True)
item = self.toolbarButtonOpenDocument = DispatchWithEvents(item, OpenDocument)
item.Caption = "Open Document"
item.Caption = "Document"
item.TooltipText = "Click to Open Document that has been pushed to server."
item.Enabled = True
@ -213,22 +216,22 @@ class OutlookAddin:
item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.menu_bar_openpartner_Button = DispatchWithEvents(item, OpenPartner)
item.Caption = "Open Partner"
item.Caption = "Partner"
item.TooltipText = "Click to Open Partner detail"
item.Enabled = True
item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.menu_bar_opendocument_Button = DispatchWithEvents(item, OpenDocument)
item.Caption = "Open Document"
item.Caption = "Document"
item.TooltipText = "Click to Open Document that has been pushed to server."
item.Enabled = True
def OnDisconnection(self, mode, custom):
self.item.close()
mngr = manager.GetManager()
mngr.config['login'] = False
mngr.SaveConfig()
self.item.close()
pass
def OnAddInsUpdate(self, custom):
pass

View File

@ -205,6 +205,8 @@ def resetConnAttribs(window):
NewConn.setitem('_uname', config['uname'])
NewConn.setitem('_pwd', config['pwd'])
NewConn.setitem('_login', str(config['login']))
NewConn.setitem('_webserver',manager.config['webserver'])
NewConn.setitem('_webport',manager.config['webport'])
return
def setConnAttribs(server, port, manager):
@ -224,6 +226,8 @@ def setConnAttribs(server, port, manager):
NewConn.setitem('_pwd', manager.config['pwd'])
NewConn.setitem('_login', str(manager.config['login']))
NewConn.setitem('_obj_list', manager.config['objects'])
NewConn.setitem('_webserver',manager.config['webserver'])
NewConn.setitem('_webport',manager.config['webport'])
return
def getConnAttributes(manager):
@ -235,6 +239,13 @@ def getConnAttributes(manager):
manager.config['uname'] = NewConn.getitem('_uname')
manager.config['pwd'] = NewConn.getitem('_pwd')
manager.config['login'] = NewConn.getitem('_login')
manager.config['webserver'] = NewConn.getitem('_webserver')
manager.config['webport'] = NewConn.getitem('_webport')
return
def setWebConnAttribs(server, port, manager):
manager.config = manager.LoadConfig()
NewConn.setitem('_webserver',server)
NewConn.setitem('_webport',port)
return
def getMessage(e):
@ -306,6 +317,7 @@ class WEBOKButtonProcessor(ButtonProcessor):
if server.strip() == "" or server.strip() == "http:\\\\":
win32ui.MessageBox("Invalid web Server address.", "OpenERP Connection", flag_excl)
return
setWebConnAttribs(server, port, self.mngr)
web_server = server
web_server_port = port
win32gui.EndDialog(self.window.hwnd, id)
@ -831,6 +843,7 @@ def CreateContact(btnProcessor,*args):
win32ui.MessageBox("Contact name or Email id is Missing\nPlease fill those information", "Create Contact", flag_error)
return
try:
NewConn.CreateContact(str(res))
if not partner:
msg="New contact created."
else:
@ -848,15 +861,23 @@ def SetAllText(txtProcessor,*args):
# Set values for url, uname, pwd from config file
global web_server
global web_server_port
serverBox = txtProcessor.GetControl(txtProcessor.other_ids[2])
win32gui.SendMessage(serverBox, win32con.WM_SETTEXT, 0, "http:\\\\"+str(web_server)+":"+str(web_server_port))
url = NewConn.getitem('_uri')
tbox = txtProcessor.GetControl()
win32gui.SendMessage(tbox, win32con.WM_SETTEXT, 0, str(url))
uname = NewConn.getitem('_uname')
tbox = txtProcessor.GetControl(txtProcessor.other_ids[0])
win32gui.SendMessage(tbox, win32con.WM_SETTEXT, 0, str(uname))
passbox = txtProcessor.GetControl(txtProcessor.other_ids[1])
pwd = NewConn.getitem('_pwd')
win32gui.SendMessage(passbox, win32con.WM_SETTEXT, 0, str(pwd))
serverBox = txtProcessor.GetControl(txtProcessor.other_ids[2])
web_server = NewConn.getitem('_webserver')
web_server_port = NewConn.getitem('_webport')
webstr = "http:\\\\"+str(web_server)+":"+str(web_server_port)
win32gui.SendMessage(serverBox, win32con.WM_SETTEXT, 0, str(webstr))
def SetDefaultList(listProcessor,*args):
import win32api
hwndList = listProcessor.GetControl()
@ -956,6 +977,9 @@ def SetDefaultContact(txtProcessor,*args):
txtProcessor.init_done = True
def setCheckList(groupProcessor,*args):
b = check()
if not b:
return
try:
hinst = win32gui.dllhandle
objs = groupProcessor.window.manager.config['objects']
@ -1382,8 +1406,14 @@ def OpenPartnerForm(txtProcessor,*args):
txtProcessor.init_done=True
return
try:
linktopartner = "http:\\\\"+web_server+":"+str(web_server_port)+"\\openerp\\form\\view?model=res.partner&id="+str(vals)
win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, linktopartner)
linktopartner = "http://"+web_server+":"+str(web_server_port)+"/openerp/form/view?model=res.partner&id="+str(vals)
win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, str(linktopartner))
# import urllib
# encode = urllib.urlencode('/openerp/form/view?model=res.partner&id='+str(vals))
# weburl = 'http://'+web_server+':'+str(web_server_port)
# linktopartner = weburl + "?next=" + encode
# win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, linktopartner)
except Exception,e:
win32ui.MessageBox("Error While Opening Partner.\n"+str(e),"Open Partner", flag_error)
webbrowser.open_new(linktopartner)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -140,7 +140,7 @@ class OpenERPManager:
def LoadConfig(self):
import win32ui
path = os.path.join(self.data_directory, 'tiny.ini')
data = {'server' : 'localhost', 'port' : '8069', 'protocol' : 'http://', 'database' : '', 'objects' : self.default_objects, 'uname':'admin', 'pwd':'a', 'login':False}
data = {'server' : 'localhost', 'port' : '8069', 'protocol' : 'http://', 'database' : '', 'objects' : self.default_objects, 'uname':'admin', 'pwd':'a', 'login':False,'webserver':'localhost','webport':'8080'}
if os.path.exists(path):
fp = open(path, 'r')
data = fp.readlines()

View File

@ -64,10 +64,12 @@ class XMLRpcConn(object):
_reg_clsid_ = "{C6399AFD-763A-400F-8191-7F9D0503CAE2}"
_reg_progid_ = "Python.OpenERP.XMLRpcConn"
_reg_policy_spec_ = "win32com.server.policy.EventHandlerPolicy"
def __init__(self,server='localhost',port=8069,uri='http://localhost:8069'):
def __init__(self,server='localhost',port=8069,uri='http://localhost:8069',webserver='localhost', webport=8080):
self._server=server
self._port=port
self._uri=uri
self._webserver=webserver
self._webport=webport
self._obj_list=[]
self._dbname=''
self._uname='admin'
@ -79,6 +81,7 @@ class XMLRpcConn(object):
self.partner_id_list=None
self.protocol=None
def getitem(self, attrib):
v=self.__getattribute__(attrib)
return str(v)

View File

@ -14,8 +14,12 @@
id="act_my_project" name="My projects"
res_model="project.project" view_mode="tree,form"
view_type="form"/>
<act_window domain="[('user_id','=',uid),('state','&lt;&gt;','close')]" id="act_my_account" name="My accounts to invoice" res_model="account.analytic.account" view_mode="tree,form" view_type="form"/>
<act_window
id="act_my_account"
name="My accounts to invoice"
res_model="account.analytic.account"
domain="[('user_id','=',uid),('state','&lt;&gt;','close')]"
view_mode="tree,form"
view_type="form"/>
</data>
</openerp>

View File

@ -1430,7 +1430,7 @@ msgstr ""
#. module: project
#: model:ir.actions.act_window,help:project.open_view_project_all
msgid "A project contains a set of tasks or issues that will be performed by your resources assigned on it. A project can be put into a hierarchy, as a child of a Parent Project. This allows you to design large project structure with different phases spread over the project duration cycle. Each user can set his default project in his own preferences, in order to filter automatically the tasks or issues he usually works on."
msgid "A project contains a set of tasks or issues that will be performed by your assigned personnel. A project can be put into a hierarchy, as a child of a Parent Project. This allows you to design large project structure with different phases spread over the project's duration cycle. Each user can set his default project in his own preferences, in order to filter automatically the tasks or issues he usually works on. If you have personalized your Project application in order to invoice the time spent on a task, you can choose to invoice or not one project in the billing section."
msgstr ""
#. module: project

View File

@ -160,7 +160,7 @@
<field name="view_id" ref="view_project"/>
<field name="search_view_id" ref="view_project_project_filter"/>
<field name="context">{'search_default_Current':1}</field>
<field name="help">A project contains a set of tasks or issues that will be performed by your resources assigned on it. A project can be put into a hierarchy, as a child of a Parent Project. This allows you to design large project structure with different phases spread over the project duration cycle. Each user can set his default project in his own preferences, in order to filter automatically the tasks or issues he usually works on.</field>
<field name="help">A project contains a set of tasks or issues that will be performed by your assigned personnel. A project can be put into a hierarchy, as a child of a Parent Project. This allows you to design large project structure with different phases spread over the project's duration cycle. Each user can set his default project in his own preferences, in order to filter automatically the tasks or issues he usually works on. If you have personalized your Project application in order to invoice the time spent on a task, you can choose to invoice or not one project in the billing section.</field>
</record>
<menuitem action="open_view_project_all" id="menu_open_view_project_all" parent="menu_project_management" sequence="1"/>
@ -225,6 +225,9 @@
widget="float_time"
attrs="{'readonly':[('state','!=','draft')]}"
on_change="onchange_planned(planned_hours, effective_hours)"/>
<field
name="effective_hours"
widget="float_time" invisible="1"/>
</group>
<group col="3" colspan="2">
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/>

View File

@ -106,7 +106,7 @@ class project_task(osv.osv):
timebox_obj = self.pool.get('project.gtd.timebox')
access_pool = self.pool.get('ir.model.access')
if (res['type'] == 'search') and access_pool.check_groups(cr, uid, "project_gtd.group_project_getting"):
tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[]))
tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[]), context=context)
search_extended ='''<newline/><group col="%d" expand="%d" string="%s">''' % (len(tt)+7,1,_('Getting Things Done'))
search_extended += '''<filter domain="[('timebox_id','=', False)]" context="{'set_editable':True,'set_visible':True,'gtd_visible':True,'user_invisible':True}" icon="gtk-new" help="Undefined Timebox" string="%s"/>''' % (_('Inbox'),)
search_extended += '''<filter context="{'set_editable':True,'set_visible':True,'gtd_visible':True,'user_invisible':True}" icon="gtk-new" help="Getting things done" string="%s"/>''' % (_('GTD'),)
@ -125,7 +125,7 @@ class project_task(osv.osv):
if search_extended:
res['arch'] = unicode(res['arch'], 'utf8').replace('</search>', search_extended)
attrs_sel = self.pool.get('project.gtd.context').name_search(cr, uid, '', [], context=context)
context_id_info = self.pool.get('project.task').fields_get(cr, uid, ['context_id'])
context_id_info = self.pool.get('project.task').fields_get(cr, uid, ['context_id'], context=context)
context_id_info['context_id']['selection'] = attrs_sel
res['fields'].update(context_id_info)
return res

View File

@ -500,7 +500,7 @@ msgstr ""
#. module: project_long_term
#: model:ir.ui.menu,name:project_long_term.menu_view_resource_calendar
msgid "Working Period"
msgid "Working Time"
msgstr ""
#. module: project_long_term

View File

@ -377,7 +377,7 @@
src_model="project.phase"
view_mode="tree,form"
context="{'search_default_phase_id': [active_id]}"
domain="[('phase_id', '=', active_id)]"
domain="[('phase_id', '=', active_id),('project_id','=',project_id)]"
/>
<act_window
@ -386,8 +386,21 @@
name="Phases"
res_model="project.phase"
src_model="project.project"
domain="[('project_id', '=', active_id)]"
view_mode="tree,form"
view_type="form" />
view_type="form"
/>
<act_window
context="{'search_default_user_id': [user_id]}"
id="act_project_resource"
name="Resources"
res_model="resource.resource"
src_model="project.project"
domain="[('user_id', '=',user_id)]"
view_mode="tree,form"
view_type="form"
/>
# ------------------------------------------------------
# Menu Items

View File

@ -1,8 +1,8 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_project_phase","project.phase","model_project_phase","project.group_project_user",1,1,1,0
"access_project_resource_allocation","project.resource.allocation","model_project_resource_allocation","project.group_project_user",1,0,0,0
"access_project_phase_manager","project.phase manager","model_project_phase","project.group_project_manager",1,0,0,0
"access_project_resource_allocation_manager","project.resource.allocation manager","model_project_resource_allocation","project.group_project_manager",1,0,0,0
"access_project_phase_manager","project.phase manager","model_project_phase","project.group_project_manager",1,1,1,1
"access_project_resource_allocation_manager","project.resource.allocation manager","model_project_resource_allocation","project.group_project_manager",1,1,1,1
"access_resource_resource_user","resource.resource user","resource.model_resource_resource","project.group_project_user",1,0,0,0
"access_resource_calendar_leaves_user","resource.calendar.leaves user","resource.model_resource_calendar_leaves","project.group_project_user",1,1,1,1
"access_resource_resource_manager","resource.resource manager","resource.model_resource_resource","project.group_project_manager",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_project_phase project.phase model_project_phase project.group_project_user 1 1 1 0
3 access_project_resource_allocation project.resource.allocation model_project_resource_allocation project.group_project_user 1 0 0 0
4 access_project_phase_manager project.phase manager model_project_phase project.group_project_manager 1 0 1 0 1 0 1
5 access_project_resource_allocation_manager project.resource.allocation manager model_project_resource_allocation project.group_project_manager 1 0 1 0 1 0 1
6 access_resource_resource_user resource.resource user resource.model_resource_resource project.group_project_user 1 0 0 0
7 access_resource_calendar_leaves_user resource.calendar.leaves user resource.model_resource_calendar_leaves project.group_project_user 1 1 1 1
8 access_resource_resource_manager resource.resource manager resource.model_resource_resource project.group_project_manager 1 1 1 1

View File

@ -19,6 +19,18 @@
</field>
</record>
<record id="project_invoice_form_cutomer" model="ir.ui.view">
<field name="name">Inherit project form : Customer</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project_invoice_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="replace">
<field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" string="Customer" attrs="{'required':[('to_invoice','!=',False)]}"/>
</field>
</field>
</record>
<record id="project_invoice_search" model="ir.ui.view">
<field name="name">Inherit project search view : Invoicing Data</field>
<field name="model">project.project</field>
@ -64,10 +76,58 @@
</field>
</field>
</record>
<record id="view_account_analytic_line_filter_inherit_buttons" model="ir.ui.view">
<field name="name">account.analytic.line.inherit.select</field>
<field name="model">account.analytic.line</field>
<field name="type">search</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<search string="Search Analytic Lines">
<group col='6' colspan='4'>
<field name="name"/>
<field name="date"/>
<field name="account_id"/>
<field name="user_id">
<filter string="My Entries" domain="[('user_id','=',uid)]" icon="terp-personal"/>
</field>
</group>
<newline/>
<group expand="0" string="Extended Filters...">
<field name="journal_id" widget="selection"/>
<field name="product_id" widget="selection"/>
<field name="amount" select="1"/>
</group>
<newline/>
<group string="Group By..." expand="0">
<filter string="Account" context="{'group_by':'account_id'}" groups="base.group_extended" icon="terp-folder-green"/>
<filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
<filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
<separator orientation="vertical"/>
<filter string="Fin.Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green"/>
<separator orientation="vertical"/>
<filter string="Product" context="{'group_by':'product_id'}" icon="terp-accessories-archiver"/>
</group>
</search>
</field>
</record>
<!-- Menus -->
<record id="action_project_timesheet_bill_task" model="ir.actions.act_window">
<field name="name">Bill Tasks Works</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="view_id" ref="view_account_analytic_line_tree_inherit_account_id"/>
<field name="search_view_id" ref="view_account_analytic_line_filter_inherit_buttons"/>
<field name="help">This lists show you every task work you can invoice to the customer. Select the lines in order to generate the invoices automatically.</field>
</record>
<menuitem id="menu_project_billing" name="Invoicing"
parent="base.menu_main_pm" sequence="5"/>
<menuitem id="menu_project_billing_line" name="Invoice Tasks Work"
parent="menu_project_billing" action="hr_timesheet_invoice.action_hr_analytic_timesheet_open_tree"/>
parent="menu_project_billing" action="action_project_timesheet_bill_task"/>
<menuitem id="base.menu_project_management_time_tracking" name="Time Tracking"
parent="base.menu_main_pm" sequence="5"/>
</data>

View File

@ -88,7 +88,7 @@ msgstr ""
#. module: resource
#: view:resource.calendar:0
msgid "Search Working Period"
msgid "Search Working Time"
msgstr ""
#. module: resource
@ -187,7 +187,7 @@ msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_calendar_form
#: view:resource.calendar:0
msgid "Working Period"
msgid "Working Time"
msgstr ""
#. module: resource

View File

@ -203,8 +203,8 @@ class resource_calendar_attendance(osv.osv):
'name' : fields.char("Name", size=64, required=True),
'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of week'),
'date_from' : fields.date('Starting date'),
'hour_from' : fields.float('Work from', size=8, required=True),
'hour_to' : fields.float("Work to", size=8, required=True),
'hour_from' : fields.float('Work from', size=8, required=True, help="Working time will start from"),
'hour_to' : fields.float("Work to", size=8, required=True, help="Working time will end at"),
'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True),
}
_order = 'dayofweek, hour_from'

View File

@ -37,7 +37,7 @@
<field name="model">resource.calendar</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Working Period">
<search string="Search Working Time">
<group col='15' colspan='4'>
<field name="name" string="Name"/>
<field name="manager"/>
@ -76,7 +76,7 @@
<field name="model">resource.calendar</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Working Period">
<form string="Working Time">
<field name="name"/>
<field name="manager"/>
<field name="company_id" groups="base.group_multi_company"/>
@ -91,7 +91,7 @@
<field name="model">resource.calendar</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Working Period">
<tree string="Working Time">
<field name="name"/>
<field name="manager" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
@ -100,7 +100,7 @@
</record>
<record id="action_resource_calendar_form" model="ir.actions.act_window">
<field name="name">Working Period</field>
<field name="name">Working Time</field>
<field name="res_model">resource.calendar</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@ -116,8 +116,8 @@
<tree string="Working Time">
<field name="name"/>
<field name="dayofweek"/>
<field name="hour_from" widget="float_time"/>
<field name="hour_to" widget="float_time"/>
<field name="hour_from" widget="float_time" />
<field name="hour_to" widget="float_time" />
</tree>
</field>
</record>

View File

@ -92,9 +92,13 @@ class survey(osv.osv):
def survey_cancel(self, cr, uid, ids, arg):
self.write(cr, uid, ids, {'state': 'cancel' })
return True
def copy(self, cr, uid, id, default=None,context={}):
raise osv.except_osv(_('Warning !'),_('You cannot duplicate the resource!'))
def copy(self, cr, uid, ids, default=None, context={}):
vals = {}
current_rec = self.read(cr, uid, ids, context=context)
title = current_rec.get('title') + ' (Copy)'
vals.update({'title':title})
return super(survey, self).copy(cr, uid, ids, vals, context=context)
def action_print_survey(self, cr, uid, ids, context=None):
"""
@ -196,8 +200,12 @@ class survey_page(osv.osv):
'context': context
}
def copy(self, cr, uid, id, default=None, context={}):
raise osv.except_osv(_('Warning !'),_('You cannot duplicate the resource!'))
def copy(self, cr, uid, ids, default=None, context={}):
vals = {}
current_rec = self.read(cr, uid, ids, context=context)
title = current_rec.get('title') + ' (Copy)'
vals.update({'title':title})
return super(survey_page, self).copy(cr, uid, ids, vals, context=context)
survey_page()

View File

@ -29,11 +29,11 @@
"description": """
This module is required for the thuderbird plug-in to work
properly.
This allows you to select an object that youd like to add
to your email and its attachments. You can select a partner, a task,
a project, an analytical account, or any other object and attach selected
mail as .eml file in attachment of selected record.
The Plugin allows you archive email and its attachments to the selected
OpenERP objects. You can select a partner, a task, a project, an analytical
account,or any other object and attach selected mail as .eml file in
attachment of selected record. You can create Documents for crm Lead,
HR Applicant and project issue from selected mails.
""",
"init_xml" : [],

View File

@ -131,11 +131,11 @@ email_server_tools()
class thunderbird_partner(osv.osv_memory):
_name = "thunderbird.partner"
_description="Thunderbid mails"
_description="Thunderbid Plugin Tools"
def create_contact(self,cr,user,vals):
dictcreate = dict(vals)
# Set False value if 'undefined'. Thunerbird set 'undefined' if user did not set any value.
# Set False value if 'undefined' for record. Id User does not spicify the values, Thunerbird set 'undefined' by default for new contact.
for key in dictcreate:
if dictcreate[key] == 'undefined':
dictcreate[key] = False

View File

@ -3,101 +3,104 @@
<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/create.dtd">
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
title="&title.label;" onload="myPrefObserver.createContact();" height="460" width="860">
title="&title.label;" onload="myPrefObserver.createContact();" height="415" width="720">
<script type="text/javascript" src="chrome://openerp_plugin/content/tiny_xmlrpc.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/config.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/loaddata.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/static.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
<tabpanel id="contact">
<groupbox id="contact" style="border:1px solid black">
<separator class="groove-thin" orient="horizontal" width="94"/>
<hbox>
<label align="right" id="partner" value="&selectpartner.value;" width="97" />
<textbox id="txtselectpartner" readonly="true" value="" width="270"/>
<button label="&bsearch.label;" oncommand="Select.onMenuItemCommand(event);" image="&imagesearch.value;"/>
<button label="Create Partner" image="&imagecreate.value;" oncommand="CreatePartner.onMenuItemCommand(event);"/>
</hbox>
<hbox>
<label align="right" id="name" value="&name.value;" width="80" />
<textbox id="txtname" align="right" width="270"/>
</hbox>
<separator class="groove-thin" orient="horizontal" width="94"/>
</groupbox>
</tabpanel>
<separator class="groove-thin" orient="horizontal" width="94"/>
<tabpanel id="address">
<groupbox id="address" style="border:1px solid black">
<hbox>
<caption label="&postaladdress.value;" />
</hbox>
<separator class="groove-thin" orient="horizontal" width="94"/>
<hbox>
<label align="right" id="street" value="&street.value;" width="97" />
<textbox id="txtstreet" width="270" align="right"/>
<spacer width="33"/>
</hbox>
<groupbox id="contact" >
<separator class="groove-thin" orient="horizontal" width="94"/>
<hbox>
<label align="right" id="partner" value="&selectpartner.value;" width="97" />
<textbox id="txtselectpartner" readonly="true" value="" width="270"/>
<button label="&bsearch.label;" oncommand="Select.onMenuItemCommand(event);" image="&imagesearch.value;"/>
<button label="Create Partner" image="&imagecreate.value;" oncommand="CreatePartner.onMenuItemCommand(event);"/>
</hbox>
<hbox>
<label align="right" id="street2" value="&street2.value;" width="97" />
<textbox id="txtstreet2" width="270" align="right"/>
<spacer width="35"/>
</hbox>
<hbox>
<label align="right" id="zip" value="&zip.value;" width="97" />
<textbox id="txtzip" align="right" />
<spacer width="114"/>
</hbox>
<separator class="groove-thin" orient="horizontal" width="80"/>
</groupbox>
</tabpanel>
<tabpanel id="address">
<groupbox id="address" style="border:1px solid black">
<hbox>
<caption label="&postaladdress.value;" />
</hbox>
<separator class="groove-thin" orient="horizontal" width="94"/>
<hbox>
<label align="right" id="name" value="&name.value;" width="97" />
<textbox id="txtname" align="right" />
</hbox>
<hbox>
<label align="right" id="street" value="&street.value;" width="97" />
<textbox id="txtstreet" align="right"/>
<spacer width="33"/>
</hbox>
<hbox>
<label align="right" id="city" value="&city.value;" width="97"/>
<textbox id="txtcity" align="right" />
<spacer width="112"/>
</hbox>
<hbox>
<label align="right" id="countryname" value="&country.value;" width="97" />
<menulist id="country" width="190" oncommand= "getAllState();" >
<menupopup>
<menuitem label="" value=""/>
</menupopup>
</menulist>
</hbox>
<hbox>
<label align="right" id="street2" value="&street2.value;" width="97" />
<textbox id="txtstreet2" align="right"/>
<spacer width="33"/>
</hbox>
<hbox>
<label align="right" id="zip" value="&zip.value;" width="97" />
<textbox id="txtzip" align="right" />
<spacer width="33"/>
</hbox>
<hbox>
<label align="right" id="statename" value="&state.value;" width="97" />
<menulist id="state" width="190">
<menupopup>
<menuitem label="" value=""/>
</menupopup>
</menulist>
</hbox>
<separator class="groove-thin" orient="horizontal" width="94"/>
</groupbox>
<groupbox id="communication" style="border:1px solid black">
<vbox>
<caption label="&communication.value;" />
</vbox>
<separator class="groove-thin" orient="horizontal" width="94"/>
<hbox>
<label align="right" id="office" value="&office.value;" width="97" />
<textbox id="txtoffice" align="right" />
</hbox>
<hbox>
<label align="right" id="mobile" value="&mobile.value;" width="97" />
<textbox id="txtmobile" align="right"/>
</hbox>
<hbox>
<label align="right" id="fax" value="&fax.value;" width="97" />
<textbox id="txtfax" align="right" />
</hbox>
<hbox>
<label align="right" id="emailid" value="&email.value;" width="97" />
<textbox id="txtemail" width="280" align="right"/>
</hbox>
</groupbox>
</tabpanel>
<description></description>
<hbox>
<label align="right" id="city" value="&city.value;" width="97"/>
<textbox id="txtcity" align="right" />
<spacer width="33"/>
</hbox>
<hbox>
<label align="right" id="countryname" value="&country.value;" width="97" />
<menulist id="country" width="190" oncommand= "getAllState();" >
<menupopup>
<menuitem label="" value=""/>
</menupopup>
</menulist>
</hbox>
<hbox>
<label align="right" id="statename" value="&state.value;" width="97" />
<menulist id="state" width="190">
<menupopup>
<menuitem label="" value=""/>
</menupopup>
</menulist>
</hbox>
<separator class="groove-thin" orient="horizontal" width="60"/>
</groupbox>
<groupbox id="communication" style="border:1px solid black">
<vbox>
<caption label="&communication.value;" />
</vbox>
<separator class="groove-thin" orient="horizontal" width="94"/>
<hbox>
<label align="right" id="office" value="&office.value;" width="97" />
<textbox id="txtoffice" align="right" />
</hbox>
<hbox>
<label align="right" id="mobile" value="&mobile.value;" width="97" />
<textbox id="txtmobile" align="right"/>
</hbox>
<hbox>
<label align="right" id="fax" value="&fax.value;" width="97" />
<textbox id="txtfax" align="right" />
</hbox>
<hbox>
<label align="right" id="emailid" value="&email.value;" width="97" />
<textbox id="txtemail" align="right"/>
<spacer width="30"/>
</hbox>
</groupbox>
</tabpanel>
<description></description>
<hbox align="right">
<button label="&cancel.label;" image="&imagecancel.value;" oncommand="close();" />
<button label="&ok.label;" image="&imageok.value;" oncommand="createContact();"/>

View File

@ -6,185 +6,185 @@ var name = new Array();
var test = new Array();
var MBstrBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].
getService(Components.interfaces.nsIStringBundleService);
getService(Components.interfaces.nsIStringBundleService);
var mboximportbundle = MBstrBundleService.createBundle("chrome://mboximport/locale/mboximport.properties");
//function to get the required details of the selected email
function check()
{
setTimeout("createConnection()",5000)
if (getconnect_server() == "false")
{
alert("Please Login To The Database First !")
return false;
}
setTimeout("module_install()", 10000)
if (getmodule_install() == "no")
{
alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
return false
}
if (getconnect_server() == "false")
{
alert("Please Login To The Database First !")
return false;
}
setTimeout("module_install()", 10000)
if (getmodule_install() == "no")
{
alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
return false
}
if(GetNumSelectedMessages() < 1 || GetNumSelectedMessages() > 1){
alert("You must select only one mail to archive");
return false
}
return true
alert("You must select only one mail to archive");
return false
}
return true
}
function searchmail()
{
if (check() == false){
{
if (check() == false){
return true
}
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
version = version_obj.getCharPref("lastAppVersion");
version = parseInt(version[0])
file = getPredefinedFolder(2);
if (version > 2)
{
var emlsArray = gFolderDisplay.selectedMessages;
}
else
{
var emlsArray = GetSelectedMessages();
}
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
version = version_obj.getCharPref("lastAppVersion");
version = parseInt(version[0])
file = getPredefinedFolder(2);
if (version > 2)
{
var emlsArray = gFolderDisplay.selectedMessages;
}
else
{
var emlsArray = GetSelectedMessages();
}
IETtotal = emlsArray.length;
IETexported = 0;
var msguri = emlsArray[0];
IETtotal = emlsArray.length;
IETexported = 0;
var msguri = emlsArray[0];
//gives the selected email uri
var messageUri= gDBView.URIForFirstSelectedMessage;
//gives the selected email uri
var messageUri= gDBView.URIForFirstSelectedMessage;
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
//gives the selected email object
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
//gives the selected email object
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
if (version > 2)
{
m_uri = message.folder.getUriForMsg(message);
saveMsgAsEML(m_uri,file,false,emlsArray,null);
}
else
{
saveMsgAsEML(msguri,file,false,emlsArray,null);
}
if (version > 2)
{
m_uri = message.folder.getUriForMsg(message);
saveMsgAsEML(m_uri,file,false,emlsArray,null);
}
else
{
saveMsgAsEML(msguri,file,false,emlsArray,null);
}
//gives the received email date
var stdate = new Date(message.date / 1000);
//gives the received email date
var stdate = new Date(message.date / 1000);
//functionality to split the author name and email
if(message.author.charAt(0) == '"'){
sendername = message.author.split('"')[1].split('"')[0];
}
else if(message.author.indexOf('<')!=-1){
sendername = message.author.split('<')[0];
}
else{
sendername = message.author;
}
if(message.author.indexOf('<')!=-1){
senderemail = message.author.split('<')[1].split('>')[0];
}
else{
senderemail = message.author
}
//functionality to split the author name and email
if(message.author.charAt(0) == '"'){
sendername = message.author.split('"')[1].split('"')[0];
}
else if(message.author.indexOf('<')!=-1){
sendername = message.author.split('<')[0];
}
else{
sendername = message.author;
}
if(message.author.indexOf('<')!=-1){
senderemail = message.author.split('<')[1].split('>')[0];
}
else{
senderemail = message.author
}
//gives the receiver email address
receiveremail = message.mime2DecodedRecipients;
//gives the receiver email address
receiveremail = message.mime2DecodedRecipients;
//parsing the received date in the particular format
receivedDate = stdate.getFullYear()+'/'+(stdate.getMonth()+1)+'/'+stdate.getDate();
//parsing the received date in the particular format
receivedDate = stdate.getFullYear()+'/'+(stdate.getMonth()+1)+'/'+stdate.getDate();
//gives the selected email subject
subject = message.subject;
//gives the selected email subject
subject = message.subject;
//gives the selected email cclist
cclist = message.ccList;
//gives the selected email cclist
cclist = message.ccList;
//gives the selected email message body in text format
if (version > 2)
{
var listener = Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance(Components.interfaces.nsISyncStreamListener);
var uri = message.folder.getUriForMsg(message);
messenger.messageServiceFromURI(uri)
.streamMessage(uri, listener, null, null, false, "");
var folder = message.folder;
messagebody = folder.getMsgTextFromStream(listener.inputStream,message.Charset,65536,32768,false,true,{})
}
else
{
messagebody = getMessageBrowser().docShell.contentViewer.DOMDocument.body.textContent;
}
//gives the selected email message body in html format
msghtmlbody = ""// getMessageBrowser().docShell.contentViewer.DOMDocument.body.innerHTML;
//gives the selected email message body in text format
if (version > 2)
{
var listener = Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance(Components.interfaces.nsISyncStreamListener);
var uri = message.folder.getUriForMsg(message);
messenger.messageServiceFromURI(uri)
.streamMessage(uri, listener, null, null, false, "");
var folder = message.folder;
messagebody = folder.getMsgTextFromStream(listener.inputStream,message.Charset,65536,32768,false,true,{})
}
else
{
messagebody = getMessageBrowser().docShell.contentViewer.DOMDocument.body.textContent;
}
//gives the selected email message body in html format
msghtmlbody = ""// getMessageBrowser().docShell.contentViewer.DOMDocument.body.innerHTML;
//set the initial information for the selected email
setSenderEmail(senderemail);
setSenderName(sendername);
setReceiverEmail(receiveremail);
setSubject(subject);
setReceivedDate(receivedDate);
setCCList(cclist);
setMessageBody(messagebody);
getPref().setCharPref('displayName','');
getPref().setCharPref('attachmentdata','');
name = [];
test = [];
getPref().setCharPref('attachmentlength',currentAttachments.length);
//retrieving the information for the selected email's attachment
if(currentAttachments.length > 0){
for(i=0;i<currentAttachments.length;i++){
contentType[i] = currentAttachments[i].contentType;
uri = currentAttachments[i].uri;
url[i] = currentAttachments[i].url;
name[i] = currentAttachments[i].displayName;
var obj = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
if(navigator.userAgent.indexOf('Linux')!= -1){
obj.initWithPath("/tmp/");
}
else if(navigator.userAgent.indexOf('Win')!= -1){
obj.initWithPath("c:\\");
}
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
obj.initWithPath("/tmp/");
}
else{
alert("Not Compatible for this Operating System");
false();
}
//saving the attachment files in system's temp folder
test[i] = messenger.saveAttachmentToFolder(contentType[i],url[i],name[i],uri,obj);
}
//function to read the attachment file contents
att =getAttachValue()
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
createInstance(name,test)
//set the initial information for the selected email
setSenderEmail(senderemail);
setSenderName(sendername);
setReceiverEmail(receiveremail);
setSubject(subject);
setReceivedDate(receivedDate);
setCCList(cclist);
setMessageBody(messagebody);
getPref().setCharPref('displayName','');
getPref().setCharPref('attachmentdata','');
name = [];
test = [];
getPref().setCharPref('attachmentlength',currentAttachments.length);
//retrieving the information for the selected email's attachment
if(currentAttachments.length > 0){
for(i=0;i<currentAttachments.length;i++){
contentType[i] = currentAttachments[i].contentType;
uri = currentAttachments[i].uri;
url[i] = currentAttachments[i].url;
name[i] = currentAttachments[i].displayName;
var obj = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
if(navigator.userAgent.indexOf('Linux')!= -1){
obj.initWithPath("/tmp/");
}
else if(navigator.userAgent.indexOf('Win')!= -1){
obj.initWithPath("c:\\");
}
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
obj.initWithPath("/tmp/");
}
else{
alert("Not Compatible for this Operating System");
false();
}
//saving the attachment files in system's temp folder
test[i] = messenger.saveAttachmentToFolder(contentType[i],url[i],name[i],uri,obj);
}
//function to read the attachment file contents
att =getAttachValue()
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
createInstance(name,test)
}
else
{
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
}
}
else
{
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
}
}
var openPartnerHandler = {
onResult: function(client, context, result) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
onResult: function(client, context, result) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
// var sendername = getSenderEmail();
var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
var count = arrIdList.Count();
for (i = 0; i < count; i++) {
var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
var count = arrIdList.Count();
for (var i = 0; i < count; i++) {
var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
var strlSearchResult = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsCString);
var strlSearchResultValue = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
if(strlSearchResult=="email" && strlSearchResultValue=='')
@ -192,246 +192,286 @@ var openPartnerHandler = {
alert("Partner is not Available.");
return;
}
if(strlSearchResult=="partner_id"){
partner_id = strlSearchResultValue;
weburl = getWebServerURL();
if (parseInt(partner_id) > 0){
var t = weburl + "/openerp/form/view?model=res.partner&id="+partner_id;
window.open(t, "", "chrome","resizable=yes,scrollbars=yes,status=yes");
if(strlSearchResult=="partner_id"){
partner_id = strlSearchResultValue;
weburl = getWebServerURL();
if (parseInt(partner_id) > 0){
//Encode the url and form an url to have menu in webclient
var encoded = encodeURIComponent("/openerp/form/view?model=res.partner&id="+partner_id)
var t = weburl + "?next=" + encoded
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
messenger.launchExternalURL(t);
}
else{
alert("Partner is not Available.");
return;
}
}
}
},
onFault: function (client, ctxt, fault) {
}
},
onFault: function (client, ctxt, fault) {
},
},
onError: function (client, ctxt, status, errorMsg) {
onError: function (client, ctxt, status, errorMsg) {
}
}
}
function searchPartner(email)
{
var branchobj = getPref();
setServerService('xmlrpc/object');
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
arrFinalList = [];
var xmlRpcClient = getXmlRpc();
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strDbName.data = branchobj.getCharPref("serverdbname");
var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
struid.data = branchobj.getIntPref('userid');
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strpass.data = branchobj.getCharPref("password");
var branchobj = getPref();
setServerService('xmlrpc/object');
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
arrFinalList = [];
var xmlRpcClient = getXmlRpc();
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strDbName.data = branchobj.getCharPref("serverdbname");
var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
struid.data = branchobj.getIntPref('userid');
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strpass.data = branchobj.getCharPref("password");
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strobj.data = 'thunderbird.partner';
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strmethod.data = 'search_contact';
var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strname.data = email;
xmlRpcClient.asyncCall(openPartnerHandler,null,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
strobj.data = 'thunderbird.partner';
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strmethod.data = 'search_contact';
var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strname.data = email;
xmlRpcClient.asyncCall(openPartnerHandler,null,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
}
function open_partner()
{
if (check() == false){
return true
}
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
version = version_obj.getCharPref("lastAppVersion");
version = parseInt(version[0])
file = getPredefinedFolder(2);
if (version > 2)
{
var emlsArray = gFolderDisplay.selectedMessages;
}
else
{
var emlsArray = GetSelectedMessages();
}
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
version = version_obj.getCharPref("lastAppVersion");
version = parseInt(version[0])
file = getPredefinedFolder(2);
if (version > 2)
{
var emlsArray = gFolderDisplay.selectedMessages;
}
else
{
var emlsArray = GetSelectedMessages();
}
IETtotal = emlsArray.length;
IETexported = 0;
var msguri = emlsArray[0];
IETtotal = emlsArray.length;
IETexported = 0;
var msguri = emlsArray[0];
//gives the selected email uri
var messageUri= gDBView.URIForFirstSelectedMessage;
//gives the selected email uri
var messageUri= gDBView.URIForFirstSelectedMessage;
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
//gives the selected email object
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
//gives the selected email object
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
//functionality to split the author name and email
if(message.author.charAt(0) == '"'){
sendername = message.author.split('"')[1].split('"')[0];
}
else if(message.author.indexOf('<')!=-1){
sendername = message.author.split('<')[0];
}
else{
sendername = message.author;
}
if(message.author.indexOf('<')!=-1){
senderemail = message.author.split('<')[1].split('>')[0];
}
else{
senderemail = message.author
}
//functionality to split the author name and email
if(message.author.charAt(0) == '"'){
sendername = message.author.split('"')[1].split('"')[0];
}
else if(message.author.indexOf('<')!=-1){
sendername = message.author.split('<')[0];
}
else{
sendername = message.author;
}
if(message.author.indexOf('<')!=-1){
senderemail = message.author.split('<')[1].split('>')[0];
}
else{
senderemail = message.author
}
searchPartner(senderemail);
}
var listDocumentHandler = {
onResult: function(client, context, result) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
res_id = res.QueryElementAt(1, Components.interfaces.nsISupportsPRInt32);
model = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
weburl = getWebServerURL();
if(res_id==0)
{
alert("Document is not available.");
return;
}
else
{
var t = weburl + "/openerp/form/view?model=" + model +"&id=" + res_id;
window.open(t, "", "chrome","resizable=yes,scrollbars=yes,status=yes,");
}
},
onFault: function (client, ctxt, fault) {
onResult: function(client, context, result) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
res_id = res.QueryElementAt(1, Components.interfaces.nsISupportsPRInt32);
model = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
weburl = getWebServerURL();
if(res_id==0)
{
alert("Document is not available.");
return;
}
else
{
var encoded = encodeURIComponent("/openerp/form/view?model=" + model +"&id=" + res_id)
var t = weburl + "?next=" + encoded
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
messenger.launchExternalURL(t);
}
},
},
onFault: function (client, ctxt, fault) {
onError: function (client, ctxt, status, errorMsg) {
},
}
onError: function (client, ctxt, status, errorMsg) {
}
}
//function to archive the mail content through xmlrpc request
function parse_eml(){
var fpath =""
if(navigator.userAgent.indexOf('Linux')!= -1){
fpath ="/tmp/"
}
else if(navigator.userAgent.indexOf('Win')!= -1){
fpath ="C:\\"
}
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
fpath ="/tmp/"
}
name = fpath + getPref().getCharPref('fname') +".eml"
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath( name );
if ( file.exists() == false ) {
return null;
} else {
var is = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance( Components.interfaces.nsIFileInputStream );
is.init( file,0x01, 00004, null);
var sis = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance( Components.interfaces.nsIScriptableInputStream );
sis.init( is );
var output = sis.read( sis.available() );
return output
}
}
function open_document()
{
{
if (check() == false){
return true
}
}
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
version = version_obj.getCharPref("lastAppVersion");
version = parseInt(version[0])
file = getPredefinedFolder(2);
if (version > 2)
{
var emlsArray = gFolderDisplay.selectedMessages;
}
else
{
var emlsArray = GetSelectedMessages();
}
IETtotal = emlsArray.length;
IETexported = 0;
var msguri = emlsArray[0];
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
version = version_obj.getCharPref("lastAppVersion");
version = parseInt(version[0])
file = getPredefinedFolder(2);
if (version > 2)
{
var emlsArray = gFolderDisplay.selectedMessages;
}
else
{
var emlsArray = GetSelectedMessages();
}
IETtotal = emlsArray.length;
IETexported = 0;
var msguri = emlsArray[0];
//gives the selected email uri
var messageUri= gDBView.URIForFirstSelectedMessage;
var messageUri= gDBView.URIForFirstSelectedMessage;
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
//gives the selected email object
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
if (version > 2)
{
m_uri = message.folder.getUriForMsg(message);
saveMsgAsEML(m_uri,file,false,emlsArray,null);
}
else
{
saveMsgAsEML(msguri,file,false,emlsArray,null);
}
//gives the received email date
var stdate = new Date(message.date / 1000);
var branchobj = getPref();
setServerService('xmlrpc/object');
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strDbName.data = branchobj.getCharPref("serverdbname");
var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
struids.data = branchobj.getIntPref('userid');
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strpass.data = branchobj.getCharPref("password");
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strmethod.data = 'search_message';
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strobj.data = 'thunderbird.partner';
var eml_string = parse_eml()
var a = ['message'];
var b = [eml_string];
var arrofarr = dictcontact(a,b);
xmlRpcClient.asyncCall(listDocumentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
}
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
//gives the selected email object
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
var branchobj = getPref();
setServerService('xmlrpc/object');
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strDbName.data = branchobj.getCharPref("serverdbname");
var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
struids.data = branchobj.getIntPref('userid');
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strpass.data = branchobj.getCharPref("password");
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strmethod.data = 'search_message';
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strobj.data = 'thunderbird.partner';
var a = ['message_id'];
var b = ['<'+message.messageId+'>'];
var arrofarr = dictcontact(a,b);
xmlRpcClient.asyncCall(listDocumentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
}
function open_contact()
{
if (check() == false){
{
if (check() == false){
return true
}
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
version = version_obj.getCharPref("lastAppVersion");
version = parseInt(version[0])
file = getPredefinedFolder(2);
if (version > 2)
{
var emlsArray = gFolderDisplay.selectedMessages;
}
else
{
var emlsArray = GetSelectedMessages();
}
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
version = version_obj.getCharPref("lastAppVersion");
version = parseInt(version[0])
file = getPredefinedFolder(2);
if (version > 2)
{
var emlsArray = gFolderDisplay.selectedMessages;
}
else
{
var emlsArray = GetSelectedMessages();
}
IETtotal = emlsArray.length;
IETexported = 0;
var msguri = emlsArray[0];
IETtotal = emlsArray.length;
IETexported = 0;
var msguri = emlsArray[0];
//gives the selected email uri
var messageUri= gDBView.URIForFirstSelectedMessage;
//gives the selected email uri
var messageUri= gDBView.URIForFirstSelectedMessage;
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
//gives the selected email object
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
//gives the selected email object
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
//functionality to split the author name and email
if(message.author.charAt(0) == '"'){
sendername = message.author.split('"')[1].split('"')[0];
}
else if(message.author.indexOf('<')!=-1){
sendername = message.author.split('<')[0];
}
else{
sendername = message.author;
}
if(message.author.indexOf('<')!=-1){
senderemail = message.author.split('<')[1].split('>')[0];
}
else{
senderemail = message.author
}
//functionality to split the author name and email
if(message.author.charAt(0) == '"'){
sendername = message.author.split('"')[1].split('"')[0];
}
else if(message.author.indexOf('<')!=-1){
sendername = message.author.split('<')[0];
}
else{
sendername = message.author;
}
if(message.author.indexOf('<')!=-1){
senderemail = message.author.split('<')[1].split('>')[0];
}
else{
senderemail = message.author
}
//set the initial information for the selected email
//set the initial information for the selected email
setSenderEmail(senderemail);
setSenderName(sendername);
setPartnerName("");
@ -461,61 +501,61 @@ window.addEventListener("load", function(e) { Config.onLoad(e); }, false);
//function to open the plugin window for searching the records for a particular object
var Plugin = {
onLoad: function() {
this.initialized = true;
},
onLoad: function() {
this.initialized = true;
},
onMenuItemCommand: function() {
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
}
onMenuItemCommand: function() {
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
}
};
window.addEventListener("load", function(e) { Plugin.onLoad(e); }, false);
//function to open the window for creating a new partner contact
var Create = {
onLoad: function(){
this.initialized=true;
},
onLoad: function(){
this.initialized=true;
},
onMenuItemCommand: function(){
window.open("chrome://openerp_plugin/content/create.xul", "", "chrome");
}
onMenuItemCommand: function(){
window.open("chrome://openerp_plugin/content/create.xul", "", "chrome");
}
};
window.addEventListener("load", function(e) { Create.onLoad(e); }, false);
var Address = {
onLoad: function(){
this.initialized=true;
},
onLoad: function(){
this.initialized=true;
},
onMenuItemCommand: function(){
open_contact();
onMenuItemCommand: function(){
open_contact();
}
}
};
//function to open the window for selecting the partner for a new contact creation
var Select = {
onLoad: function(){
this.initialized=true;
},
onLoad: function(){
this.initialized=true;
},
onMenuItemCommand: function(){
// document.getElementById("txtselectpartner").value="";
window.open("chrome://openerp_plugin/content/selectpartner.xul", "", "chrome");
onMenuItemCommand: function(){
// document.getElementById("txtselectpartner").value="";
window.open("chrome://openerp_plugin/content/selectpartner.xul", "", "chrome");
}
};
};
var CreatePartner = {
onLoad: function(){
this.initialized=true;
},
onLoad: function(){
this.initialized=true;
},
onMenuItemCommand: function(){
window.open("chrome://openerp_plugin/content/createpartner.xul", "", "chrome");
}
onMenuItemCommand: function(){
window.open("chrome://openerp_plugin/content/createpartner.xul", "", "chrome");
}
};
window.addEventListener("load", function(e) { CreatePartner.onLoad(e); }, false);

View File

@ -8,54 +8,89 @@
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/exportTools.js"></script>
<menupopup id="taskPopup">
<menuitem id="tiny-plugin2" label="&tinyplugin;"
oncommand="Config.onMenuItemCommand(event);"
image="&menuicon.value;"
class="menuitem-iconic"
tooltiptext="&pluginconfig.value;"/>
</menupopup>
<menubar id="mail-menubar" >
<menu insertafter="messageMenu" id="menu_openerp" label="&openerpMenu.label;" accesskey="&openerpMenu.accesskey;">
<menupopup id="taskPopup">
<menuitem id="tiny-plugin3" label="&tinyplugin;"
oncommand="Config.onMenuItemCommand(event);"
image="&menuicon.settings;"
class="menuitem-iconic"
tooltiptext="&pluginconfig.value;"
/>
<menuseparator/>
<menuitem id="tiny-plugin4" label="&tinypluginconfig;"
oncommand="searchmail();"
image="&menuicon.value;"
class="menuitem-iconic"
tooltiptext="&pluginconfigvalue.value;"
/>
<menuseparator/>
<menuitem id="tiny-openpartner" label="&openpartner.value;"
oncommand="open_partner();"
image="&menuicon.value;"
class="menuitem-iconic"
tooltiptext="&openpartnertooltip.value;"
/>
<menupopup id="taskPopup">
<menuitem id="tiny-plugin1" label="&tinypluginconfig;"
oncommand="searchmail();"
image="&menuicon.value;"
class="menuitem-iconic"
tooltiptext="&pluginconfigvalue.value;"/>
</menupopup>
<menuitem id="tiny-opendocument" label="&opendocument.value;"
oncommand="open_document();"
image="&menuicon.value;"
class="menuitem-iconic"
tooltiptext="&opendocumenttooltip.value;"
/>
</menupopup>
</menu>
</menubar>
<!--<menupopup id="taskPopup">-->
<!-- <menuitem id="tiny-plugin2" label="&tinyplugin;"-->
<!-- oncommand="Config.onMenuItemCommand(event);"-->
<!-- image="&menuicon.value;"-->
<!-- class="menuitem-iconic"-->
<!-- tooltiptext="&pluginconfig.value;"/>-->
<!--</menupopup>-->
<!--<menupopup id="taskPopup">-->
<!-- <menuitem id="tiny-plugin1" label="&tinypluginconfig;"-->
<!-- oncommand="searchmail();"-->
<!-- image="&menuicon.value;"-->
<!-- class="menuitem-iconic"-->
<!-- tooltiptext="&pluginconfigvalue.value;"/>-->
<!--</menupopup>-->
<popup id="threadPaneContext">
<menuitem id="threadPaneContext-saveAsMultiple"
insertbefore="threadPaneContext-print"
class="menuitem-iconic"
image="&menuicon.value;"
label="Archive To OpenERP"
accesskey="T"
oncommand="searchmail();"/>
<menuitem id="threadPaneContext-saveAsMultiple"
insertbefore="threadPaneContext-print"
class="menuitem-iconic"
image="&menuicon.value;"
label="Archive To OpenERP"
accesskey="T"
oncommand="searchmail();"/>
</popup>
<toolbarpalette id="MailToolbarPalette">
<toolbarbutton id="GA-button"
class="toolbarbutton-1"
image="&menuicon.value;"
label= "Push To OpenERP"
oncommand="searchmail();" />
<toolbarbutton id="GA-button"
class="toolbarbutton-1"
image="&menuicon.value;"
label= "Push"
oncommand="searchmail();" />
</toolbarpalette>
<toolbarpalette id="MailToolbarPalette">
<toolbarbutton id="GA-button2"
class="toolbarbutton-1"
image="&partnericon.value;"
label= "Open Partner"
<toolbarbutton id="GA-button2"
class="toolbarbutton-1"
image="&partnericon.value;"
label= "Partner"
oncommand="open_partner();"
/>
/>
</toolbarpalette>
<toolbarpalette id="MailToolbarPalette">
<toolbarbutton id="GA-button3"
class="toolbarbutton-1"
image="&imagearchive.value;"
label= "Open Document"
oncommand="open_document();" />
<toolbarbutton id="GA-button3"
class="toolbarbutton-1"
image="&imagearchive.value;"
label= "Document"
oncommand="open_document();" />
</toolbarpalette>
</overlay>

View File

@ -3,7 +3,7 @@
<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/plugin.dtd">
<window id="pluginwindows" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
title="&title.label;" onload="myPrefObserver.loaddata()" height="650" width="1000">
title="&title.label;" onload="myPrefObserver.loaddata()" height="560" width="960">
<script type="text/javascript" src="chrome://openerp_plugin/content/tiny_xmlrpc.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/config.js"></script>
@ -12,11 +12,9 @@
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
<script type="text/javascript" src="chrome://openerp_plugin/content/exportTools.js"></script>
<description></description>
<hbox id="root" height="10" width="800" style="padding:12px;border:1px solid black">
<caption label="&title.label;" />
<hbox id="root" height="10" width="800" >
</hbox>
<hbox id="root1" height="380" width="800" style="padding:12px;border:1px solid black">
<hbox id="root1" height="380" width="800" >
<vbox>
<caption label="&gptinyobj.label;" />
<groupbox id="existsobjectgroup" width="400" style="border:1px solid black">
@ -42,6 +40,7 @@
<listbox height="250" width="100%" id="listSearchBox" style="border:1px solid red" seltype="multiple">
<listhead>
<listheader label="&listSearchBox.header;"/>
<!-- <listheader label="&listSearchBox.header2;"/>-->
</listhead>
<listcols>
<listcol flex="1"/>
@ -58,42 +57,42 @@
<vbox>
<caption label="&newobject.label;" />
<groupbox id="newobjectgroup" width="400" align="left" style="border:1px solid black;">
<separator class="groove-thin" orient="horizontal" width="400"/>
<hbox align="left">
<vbox>
<label id="lblex3" align="right" width="135" control="section" value="&object.label;"/>
</vbox>
<vbox>
<menulist id="section" width="150">
<menupopup>
<menuitem label="" value=""/>
</menupopup>
</menulist>
</vbox>
<vbox>
<button width="50" label="&archive.label;" accesskey="c" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('create');"/>
</vbox>
</hbox>
<groupbox id="newobjectgroup" width="400" align="left" style="border:1px solid black;">
<separator class="groove-thin" orient="horizontal" width="400" height="30"/>
<hbox align="left">
<vbox>
<label id="lblex3" align="right" width="135" control="section" value="&object.label;"/>
</vbox>
<vbox>
<menulist id="section" width="150">
<menupopup>
<menuitem label="" value=""/>
</menupopup>
</menulist>
</vbox>
<vbox>
<button width="50" label="&archive.label;" accesskey="c" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('create');"/>
</vbox>
</hbox>
<separator class="groove-thin" orient="horizontal" width="180" height="100"/>
</groupbox>
<caption label="&newcontact.label;" />
<groupbox id="newcontactgroup" width="400" align="left" style="border:1px solid black;">
<separator class="groove-thin" orient="horizontal" width="400" height="30"/>
<hbox align="left">
<vbox>
<label align="right" width="135" id="lblsection" control="section" value="&partner.label;"/>
</vbox>
<vbox>
<button label="&create.label;" image="&imagecreate.value;" oncommand="Create.onMenuItemCommand(event);"/>
</vbox>
</hbox>
<separator class="groove-thin" orient="horizontal" width="180" height="215"/>
</groupbox>
<separator class="groove-thin" orient="horizontal" width="180"/>
<hbox align="left">
<vbox>
<label align="right" width="135" id="lblsection" control="section" value="&partner.label;"/>
</vbox>
<vbox>
<button label="&create.label;" image="&imagecreate.value;" oncommand="Create.onMenuItemCommand(event);"/>
</vbox>
</hbox>
<separator class="groove-thin" orient="horizontal" width="480"/>
</groupbox>
</vbox>
</hbox>
<hbox height="60" align="right" width="800">
<button label="&close.label;" accesskey="l" image="&imagecancel.value;" oncommand="win_close();"/>
</hbox>
</vbox>
</hbox>
<hbox height="60" align="right" width="800">
<button label="&close.label;" accesskey="l" image="&imagecancel.value;" oncommand="win_close();"/>
</hbox>
</window>

View File

@ -1,11 +1,18 @@
<!ENTITY tinyplugin "OpenERP Configuration">
<!ENTITY tinypluginconfig "Push To OpenERP">
<!ENTITY tinyplugin "Configuration">
<!ENTITY tinypluginconfig "Push">
<!ENTITY tinyarchive "Push to OpenERP">
<!ENTITY imageicon.value "chrome://openerp_plugin/skin/NEWT1.png">
<!ENTITY menuicon.value "chrome://openerp_plugin/skin/openerp-icon.png">
<!ENTITY partnericon.value "chrome://openerp_plugin/skin/partner_icon.png">
<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/document-new.png">
<!ENTITY imageicon.value "chrome://openerp_plugin/skin/openerp.png">
<!ENTITY menuicon.settings "chrome://openerp_plugin/skin/settings.png">
<!ENTITY menuicon.value "chrome://openerp_plugin/skin/openerp.png">
<!ENTITY partnericon.value "chrome://openerp_plugin/skin/openerp.png">
<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/openerp.png">
<!ENTITY tooltip.value "Add To Archive">
<!ENTITY pluginconfig.value "OpenERP Configuration Settings">
<!ENTITY pluginconfigvalue.value "Archieve To OpenERP Settings">
<!ENTITY openerpMenu.label "OpenERP">
<!ENTITY openerpMenu.accesskey "OE">
<!ENTITY openpartner.value "Partner">
<!ENTITY openpartnertooltip.value "Click to Open Partner Realted to Sender Eamil address.">
<!ENTITY opendocument.value "Document">
<!ENTITY opendocumenttooltip.value "Click to See the Mail if it is archived to OpenERP.">

View File

@ -1,6 +1,6 @@
<!ENTITY title.label "Push To OpenERP">
<!ENTITY gptinyobj.label "Link to an Existing Document">
<!ENTITY newobject.label "New Documents">
<!ENTITY newobject.label "Create a New Documents">
<!ENTITY document.label "Documents">
<!ENTITY bsearch.label "Search">
<!ENTITY close.label "Close">
@ -27,3 +27,5 @@
<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/Archive.png">
<!ENTITY imagecreate.value "chrome://openerp_plugin/skin/Create.png">
<!ENTITY gptinyobjexe.label "Documents">
<!ENTITY newcontact.label "Create a New Contact">
<!ENTITY listSearchBox.header2 "Document Type">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 B

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -24,7 +24,7 @@ pref("extensions.tiny.partnername","");
pref("extensions.tiny.officeno","");
pref("extensions.tiny.phoneno","");
pref("extensions.tiny.address","");
pref("extensions.tiny.listobject","Partner,Accout Invoice,Product,Sale Order,Lead and opportunities");
pref("extensions.tiny.listobject","Partner,Account Invoice,Product,Sale Order,Lead and opportunities");
pref("extensions.tiny.object","res.partner,account.invoice,product.product,sale.order,crm.lead");
pref("extensions.tiny.imagename","chrome://openerp_plugin/skin/Partner.png,chrome://openerp_plugin/skin/Invoice.png,chrome://openerp_plugin/skin/Product.png,chrome://openerp_plugin/skin/Sale.png,chrome://openerp_plugin/skin/Case.png");
pref("extensions.tiny.attachmentlength","");