[MERGE] merge from trunk addons
bzr revid: qdp-launchpad@tinyerp.com-20100921171408-4jkxib8pq0pwku3r bzr revid: mra@mra-laptop-20100922043045-7x5f92ldnry168cx
This commit is contained in:
@@ -150,7 +150,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Supplier invoice">
|
||||
<group col="8" colspan="4">
|
||||
<field domain="[('type', '=', 'purchase')]" name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
|
||||
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
|
||||
<field name="number" readonly="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="currency_id" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
|
||||
@@ -212,7 +212,7 @@
|
||||
<field name="residual"/>
|
||||
<group col="6" colspan="4">
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
|
||||
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
|
||||
@@ -431,7 +431,7 @@
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field eval="False" name="view_id"/>
|
||||
<field name="domain">[('type','=','out_invoice')]</field>
|
||||
<field name="context">{'type':'out_invoice'}</field>
|
||||
<field name="context">{'type':'out_invoice', 'journal_type': 'sale'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
<field name="help">Most of customer invoices are automatically generated in draft mode by OpenERP flows, following a purchase order for instance. Review, confirm or cancel, pay or refund your customers' invoices here. A manual invoice can be created here.</field>
|
||||
</record>
|
||||
@@ -457,7 +457,7 @@
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field eval="False" name="view_id"/>
|
||||
<field name="domain">[('type','=','in_invoice')]</field>
|
||||
<field name="context">{'type':'in_invoice'}</field>
|
||||
<field name="context">{'type':'in_invoice', 'journal_type': 'purchase'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
<field name="help">Proposal for vendor invoices are usually automatically generate by OpenERP, following a procurement order or a production order for instance. To consult and to check for, or to manually create a customer invoice, use this menu. You can review, confirm or cancel, pay or refund an invoice from the view from of the invoices.</field>
|
||||
</record>
|
||||
@@ -470,7 +470,7 @@
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field eval="False" name="view_id"/>
|
||||
<field name="domain">[('type','=','out_refund')]</field>
|
||||
<field name="context">{'type':'out_refund'}</field>
|
||||
<field name="context">{'type':'out_refund', 'journal_type': 'sale_refund'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
<field name="help">A customer refund is a credit note to your customer that cancel invoice or a part of it.</field>
|
||||
</record>
|
||||
@@ -496,7 +496,7 @@
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field eval="False" name="view_id"/>
|
||||
<field name="domain">[('type','=','in_refund')]</field>
|
||||
<field name="context">{'type':'in_refund'}</field>
|
||||
<field name="context">{'type':'in_refund', 'journal_type': 'purchase_refund'}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_filter"/>
|
||||
<field name="help">A vendor refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you.</field>
|
||||
</record>
|
||||
@@ -504,11 +504,11 @@
|
||||
|
||||
<act_window context="{'search_default_partner_id':[active_id]}" id="act_res_partner_2_account_invoice_opened" name="Invoices" res_model="account.invoice" src_model="res.partner"/>
|
||||
|
||||
<act_window
|
||||
id="act_account_journal_2_account_invoice_opened"
|
||||
<act_window
|
||||
id="act_account_journal_2_account_invoice_opened"
|
||||
name="Unpaid Invoices"
|
||||
context="{'search_default_journal_id':active_id, 'search_default_unpaid':1,}"
|
||||
res_model="account.invoice"
|
||||
res_model="account.invoice"
|
||||
src_model="account.journal"/>
|
||||
|
||||
<act_window
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
import time
|
||||
from operator import itemgetter
|
||||
import decimal_precision as dp
|
||||
from lxml import etree
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv, orm
|
||||
@@ -341,7 +342,13 @@ class account_invoice(osv.osv):
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.supplier.form')])[0]
|
||||
else:
|
||||
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.form')])[0]
|
||||
return super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
res = super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
for field in res['fields']:
|
||||
type = context.get('journal_type', 'sale')
|
||||
if field == 'journal_id':
|
||||
journal_select = self.pool.get('account.journal')._name_search(cr, uid, '', [('type', '=', type)], context=context, limit=None, name_get_uid=1)
|
||||
res['fields'][field]['selection'] = journal_select
|
||||
return res
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
try:
|
||||
|
||||
@@ -15,15 +15,6 @@
|
||||
name: Voucher Axelor
|
||||
period_id: account.period_6
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a account_voucher, we will print account voucher amount Report
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.voucher.cash_amount').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account_voucher-amount.'+format), 'wb+').write(data)
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a account_voucher, we will print account voucher Report
|
||||
-
|
||||
|
||||
@@ -85,7 +85,6 @@ Create dashboard for CRM that includes:
|
||||
|
||||
'wizard/crm_send_email_view.xml',
|
||||
'wizard/crm_add_note_view.xml',
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'wizard/crm_merge_opportunities_view.xml',
|
||||
|
||||
'crm_view.xml',
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data noupdate="1">
|
||||
|
||||
<!--
|
||||
Administrator shortcut
|
||||
Demo user startup menu
|
||||
-->
|
||||
<record model="res.users" id="base.user_root">
|
||||
<field name="action_id" ref="open_board_crm"/>
|
||||
</record>
|
||||
<!--
|
||||
Administrator shortcut
|
||||
Demo user startup menu
|
||||
-->
|
||||
<record model="res.users" id="base.user_root">
|
||||
<field name="action_id" ref="open_board_crm"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="board.note.type" id="note_crm_type">
|
||||
<field name="name">CRM Configuration</field>
|
||||
</record>
|
||||
<data>
|
||||
<record model="board.note.type" id="note_crm_type">
|
||||
<field name="name">CRM Configuration</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
|
||||
<field name="name">crm.opportunity.user.graph1</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Opportunities by User and Section" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field name="user_id" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
|
||||
<field name="name">crm.opportunity.user.graph1</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Opportunities by User and Team" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field name="user_id" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_report_crm_oppor_graph" model="ir.ui.view">
|
||||
<field name="name">crm.lead.report.graph</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
@@ -31,7 +31,7 @@
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_my_open_oppor">
|
||||
<field name="name">My Open Opportunities</field>
|
||||
<field name="name">Opportunities</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -64,13 +64,13 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_oppor">
|
||||
<field name="name">My Open Opportunities</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<record model="ir.actions.act_window" id="act_my_oppor">
|
||||
<field name="name">My Open Opportunities</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','=','open'), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="act_my_oppor_tree_view">
|
||||
<field name="sequence" eval="1"/>
|
||||
@@ -86,52 +86,52 @@
|
||||
<field name="act_window_id" ref="act_my_oppor"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_meetings">
|
||||
<field name="res_model">crm.meeting</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
|
||||
<record model="ir.actions.act_window" id="act_my_meetings">
|
||||
<field name="res_model">crm.meeting</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','not in',('cancel','done'))]</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_oppor_stage">
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_report_crm_oppor_graph"/>
|
||||
<record model="ir.actions.act_window" id="act_my_oppor_stage">
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_report_crm_oppor_graph"/>
|
||||
<field name="domain">['&', '&', ('user_id','=',uid), ('type', '=', 'opportunity'), '!' , '&', ('state', '=', 'done'), ('date_closed','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_sales_pipeline">
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
|
||||
<field name="domain">['&', ('user_id', '=', uid),'&', ('state', '=', 'done') , '&', ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d')), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="act_sales_pipeline">
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
|
||||
<field name="domain">['&', ('user_id', '=', uid),'&', ('state', '=', 'done') , '&', ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d')), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_crm_form">
|
||||
<field name="name">CRM - Dashboard Form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Connecting Dashboard">
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action
|
||||
string="My Open Opportunities"
|
||||
name="%(act_my_oppor)d"
|
||||
colspan="4"
|
||||
height="150"
|
||||
width="510"/>
|
||||
<action
|
||||
string="My Meetings"
|
||||
name="%(act_my_meetings)d"
|
||||
height="150"
|
||||
colspan="4"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<action
|
||||
<record model="ir.ui.view" id="board_crm_form">
|
||||
<field name="name">CRM - Dashboard Form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Connecting Dashboard">
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action
|
||||
string="My Open Opportunities"
|
||||
name="%(act_my_oppor)d"
|
||||
colspan="4"
|
||||
height="150"
|
||||
width="510"/>
|
||||
<action
|
||||
string="My Meetings"
|
||||
name="%(act_my_meetings)d"
|
||||
height="150"
|
||||
colspan="4"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<action
|
||||
string="My Planned Revenues by Stage"
|
||||
name="%(act_my_oppor_stage)d"
|
||||
colspan="4"/>
|
||||
@@ -152,7 +152,7 @@
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_crm_form"/>
|
||||
</record>
|
||||
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
|
||||
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
|
||||
<menuitem
|
||||
name="Connecting Dashboard" parent="board.menu_dasboard"
|
||||
action="open_board_crm"
|
||||
|
||||
+8
-27
@@ -613,31 +613,13 @@ crm_case_categ()
|
||||
|
||||
class crm_case_resource_type(osv.osv):
|
||||
""" Resource Type of case """
|
||||
|
||||
_name = "crm.case.resource.type"
|
||||
_description = "Resource Type of case"
|
||||
_description = "Campaign"
|
||||
_rec_name = "name"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Resource Type', size=64, required=True, translate=True),
|
||||
'name': fields.char('Campaign Name', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'object_id': fields.many2one('ir.model', 'Object Name'),
|
||||
}
|
||||
def _find_object_id(self, cr, uid, context=None):
|
||||
"""Finds id for case object
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
object_id = context and context.get('object_id', False) or False
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
|
||||
return ids and ids[0]
|
||||
|
||||
_defaults = {
|
||||
'object_id' : _find_object_id
|
||||
}
|
||||
|
||||
crm_case_resource_type()
|
||||
|
||||
|
||||
@@ -711,17 +693,16 @@ res_partner()
|
||||
|
||||
class crm_case_section_custom(osv.osv):
|
||||
_name = "crm.case.section.custom"
|
||||
_description = 'Custom CRM Case Section'
|
||||
|
||||
_description = 'Custom CRM Case Teams'
|
||||
_columns = {
|
||||
'name': fields.char('Case Section',size=64, required=True, translate=True),
|
||||
'code': fields.char('Section Code',size=8),
|
||||
'name': fields.char('Case Team',size=64, required=True, translate=True),
|
||||
'code': fields.char('Team Code',size=8),
|
||||
'active': fields.boolean('Active'),
|
||||
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'user_id': fields.many2one('res.users', 'Responsible User'),
|
||||
'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by OpenERP about cases in this section"),
|
||||
'parent_id': fields.many2one('crm.case.section.custom', 'Parent Section'),
|
||||
'parent_id': fields.many2one('crm.case.section.custom', 'Parent Team'),
|
||||
'note': fields.text('Notes'),
|
||||
}
|
||||
|
||||
@@ -731,7 +712,7 @@ class crm_case_section_custom(osv.osv):
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
('code_uniq', 'unique (code)', 'The code of the section must be unique !')
|
||||
('code_uniq', 'unique (code)', 'The code of the team must be unique !')
|
||||
]
|
||||
|
||||
def _check_recursion(self, cr, uid, ids):
|
||||
@@ -763,7 +744,7 @@ class crm_case_custom(osv.osv, crm_case):
|
||||
'priority': fields.selection(AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'active': fields.boolean('Active'),
|
||||
'description': fields.text('Description'),
|
||||
'section_id': fields.many2one('crm.case.section.custom', 'Section', required=True, select=True),
|
||||
'section_id': fields.many2one('crm.case.section.custom', 'Team', required=True, select=True),
|
||||
'probability': fields.float('Probability (%)'),
|
||||
'email_from': fields.char('Partner Email', size=128),
|
||||
'email_cc': fields.char('CC', size=252),
|
||||
|
||||
@@ -114,17 +114,17 @@ class crm_lead(crm_case, osv.osv):
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
|
||||
select=True, help='Sales team to which this case belongs to. Defines responsible user and e-mail address for the mail gateway.'),
|
||||
'create_date': fields.datetime('Creation Date' , readonly=True),
|
||||
'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_cc': fields.text('Global CC', 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"),
|
||||
'description': fields.text('Notes'),
|
||||
'write_date': fields.datetime('Update Date' , readonly=True),
|
||||
|
||||
# Lead fields
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]"),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]"),
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False)]"),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Campaign', \
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False)]"),
|
||||
'channel_id': fields.many2one('res.partner.canal', 'Channel'),
|
||||
|
||||
'partner_name': fields.char("Partner Name", size=64),
|
||||
'optin': fields.boolean('Opt-In'),
|
||||
'optout': fields.boolean('Opt-Out'),
|
||||
|
||||
@@ -56,49 +56,41 @@
|
||||
<record model="crm.case.resource.type" id="type_lead1">
|
||||
<field name="name">Telesales</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.resource.type" id="type_lead2">
|
||||
<field name="name">Mail</field>
|
||||
<field name="name">Mail Campaign 1</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.resource.type" id="type_lead3">
|
||||
<field name="name">Email</field>
|
||||
<field name="name">Mail Campaign 2</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.resource.type" id="type_lead4">
|
||||
<field name="name">Print</field>
|
||||
<field name="name">Twitter Ads</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.resource.type" id="type_lead5">
|
||||
<field name="name">Web</field>
|
||||
<field name="name">Google Adwords</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.resource.type" id="type_lead6">
|
||||
<field name="name">Radio</field>
|
||||
<field name="name">Google Adwords 2</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.resource.type" id="type_lead7">
|
||||
<field name="name">Television</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.resource.type" id="type_lead8">
|
||||
<field name="name">Newsletter</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<page string="Lead">
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Contact" colspan="4" col="4"/>
|
||||
<field name="partner_name" string="Partner Name" colspan="4"/>
|
||||
<field name="partner_name" colspan="4"/>
|
||||
<newline/>
|
||||
<field domain="[('domain', '=', 'contact')]" name="title"/>
|
||||
<field name="function" />
|
||||
@@ -146,7 +146,8 @@
|
||||
<field name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
widget="selection" colspan="2" />
|
||||
<field name="type_id" string="Campaign" select="1"/>
|
||||
<field name="type_id" select="1" widget="selection"/>
|
||||
<field name="channel_id" select="1" widget="selection"/>
|
||||
<field name="referred"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
@@ -169,7 +170,7 @@
|
||||
</page>
|
||||
<page string="History" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/>
|
||||
<field colspan="4" name="email_cc" widget="char" size="512"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<tree string="Communication history">
|
||||
@@ -218,9 +219,6 @@
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'crm.lead'}"
|
||||
icon="terp-mail-message-new" type="action" />
|
||||
<button string="Forward"
|
||||
name="%(crm_lead_forward_to_partner_act)d"
|
||||
icon="terp-mail-forward" type="action" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
@@ -246,6 +244,7 @@
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="type_id" invisible="1"/>
|
||||
<field name="referred" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
|
||||
<field name="stage_id" />
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
@@ -341,7 +340,12 @@
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Category" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="Campaign" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'type_id'}" />
|
||||
<filter string="Channel" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
|
||||
@@ -306,8 +306,8 @@
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1" string="Subject"/>
|
||||
<field name="categ_id" select="1"
|
||||
string="Meeting Type" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.meeting')]" />
|
||||
string="Meeting Type" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.meeting')]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id" select="1" />
|
||||
<field name="section_id" select="1" widget="selection">
|
||||
|
||||
@@ -44,14 +44,12 @@
|
||||
|
||||
<!-- Case Resource(type_id) -->
|
||||
<record model="crm.case.resource.type" id="type_oppor1">
|
||||
<field name="name">Existing Business</field>
|
||||
<field name="name">Campaign 2</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.resource.type" id="type_oppor2">
|
||||
<field name="name">New Business</field>
|
||||
<field name="name">Campaign 1</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<field name="planned_revenue"/>
|
||||
<field name="probability"/>
|
||||
<field name="date_deadline" string="Expected Closing"/>
|
||||
<field name="date_deadline"/>
|
||||
<button string="Schedule/Log Call"
|
||||
name="%(opportunity2phonecall_act)d" icon="terp-call-start" type="action" groups="base.group_extended"/>
|
||||
<newline/>
|
||||
@@ -116,6 +116,11 @@
|
||||
<field name="fax"/>
|
||||
<field name="mobile"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Categorization" colspan="2"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="channel_id" widget="selection"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Mailings" colspan="2"/>
|
||||
<field name="optin"/>
|
||||
@@ -174,9 +179,6 @@
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'crm.lead'}"
|
||||
icon="terp-mail-message-new" type="action" />
|
||||
<button string="Forward"
|
||||
name="%(crm_lead_forward_to_partner_act)d"
|
||||
icon="terp-mail-forward" type="action" />
|
||||
</page>
|
||||
<page string="Extra Info" groups="base.group_extended">
|
||||
<group col="2" colspan="2">
|
||||
@@ -219,6 +221,8 @@
|
||||
<field name="title_action" />
|
||||
<field name="stage_id"/>
|
||||
<field name="partner_assigned_id" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
<field name="type_id" invisible="1"/>
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next Stage"
|
||||
@@ -316,6 +320,10 @@
|
||||
context="{'group_by':'priority'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<filter string="Campaign" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'type_id'}" />
|
||||
<filter string="Channel" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Salesman" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
|
||||
@@ -36,7 +36,7 @@ class crm_phonecall(crm_case, osv.osv):
|
||||
_columns = {
|
||||
# From crm.case
|
||||
'id': fields.integer('ID'),
|
||||
'name': fields.char('Name', size=64),
|
||||
'name': fields.char('Call Summary', size=64),
|
||||
'active': fields.boolean('Active', required=False),
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
'date_action_next': fields.datetime('Next Action', readonly=1),
|
||||
|
||||
@@ -19,16 +19,14 @@
|
||||
<!-- ResourceType Form View -->
|
||||
|
||||
<record id="crm_phonecall_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Phonecall Resource Type</field>
|
||||
<field name="name">Phonecall Campaigns</field>
|
||||
<field name="res_model">crm.case.resource.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
|
||||
<field name="context">{'object_id':'crm.phonecall'}</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_phonecall_resource_act"
|
||||
id="menu_crm_phonecall_resource_act" name="Resource Type"
|
||||
id="menu_crm_phonecall_resource_act" name="Campaigns"
|
||||
parent="menu_crm_config_phonecall" />
|
||||
|
||||
<!-- PhoneCalls Tree View -->
|
||||
@@ -39,9 +37,9 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
|
||||
<field name="date" string="Date"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
<field name="partner_id" string="Partner"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_contact"/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="user_id"/>
|
||||
@@ -71,12 +69,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Phone Call">
|
||||
<group colspan="6" col="7">
|
||||
<field name="name" string="Summary" required="1"/>
|
||||
<field name="name" required="1"/>
|
||||
<field name="partner_phone" required="1"/>
|
||||
<field name="duration" widget="float_time" required="1"/>
|
||||
<button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
|
||||
|
||||
<field name="date" string="Date" required="1"/>
|
||||
<field name="date" required="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" colspan="1" widget="selection" />
|
||||
<button string="Convert to Opportunity"
|
||||
@@ -101,7 +99,7 @@
|
||||
type="action"
|
||||
attrs="{'invisible':[('partner_id','!=',False)]}" />
|
||||
<newline/>
|
||||
<field name="partner_address_id" string="Contact"
|
||||
<field name="partner_address_id"
|
||||
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
|
||||
<newline/>
|
||||
<field name="partner_mobile" />
|
||||
@@ -147,7 +145,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Phone Call">
|
||||
<group colspan="4" col="7">
|
||||
<field name="name" string="Summary" required="1"/>
|
||||
<field name="name" required="1"/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="duration" widget="float_time"/>
|
||||
<button string="Schedule a Meeting"
|
||||
@@ -155,7 +153,7 @@
|
||||
icon="gtk-redo"
|
||||
type="object" />
|
||||
|
||||
<field name="date" string="Date" required="1"/>
|
||||
<field name="date" required="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" colspan="1" widget="selection" />
|
||||
<button string="Convert to Opportunity"
|
||||
@@ -179,7 +177,7 @@
|
||||
type="action"
|
||||
attrs="{'invisible':[('partner_id','!=',False)]}" />
|
||||
<newline/>
|
||||
<field name="partner_address_id" string="Contact"
|
||||
<field name="partner_address_id"
|
||||
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
|
||||
<newline/>
|
||||
<field name="partner_mobile" />
|
||||
@@ -207,12 +205,12 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
|
||||
<field name="date" string="Date"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"
|
||||
on_change="onchange_partner_id(partner_id, email_from)"
|
||||
string="Partner" />
|
||||
<field name="partner_address_id" string="Contact"
|
||||
<field name="partner_address_id"
|
||||
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
|
||||
<field name="partner_phone"/>
|
||||
<field name="user_id"/>
|
||||
@@ -273,7 +271,7 @@
|
||||
/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal-"
|
||||
|
||||
+6
-11
@@ -169,9 +169,8 @@
|
||||
<field name="model">crm.case.resource.type</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Resource Type">
|
||||
<tree string="Campaign">
|
||||
<field name="name"/>
|
||||
<field name="object_id"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -184,10 +183,9 @@
|
||||
<field name="model">crm.case.resource.type</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Resource Type">
|
||||
<form string="Campaign">
|
||||
<field name="name" select="1"/>
|
||||
<field name="section_id" select="1" widget="selection"/>
|
||||
<field name="object_id" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -195,14 +193,14 @@
|
||||
<!-- Resource Type of case Action -->
|
||||
|
||||
<record id="crm_case_resource_type_act" model="ir.actions.act_window">
|
||||
<field name="name">Resource Type</field>
|
||||
<field name="name">Campaigns</field>
|
||||
<field name="res_model">crm.case.resource.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm_case_resource_type_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_section_act_tree" model="ir.actions.act_window">
|
||||
<field name="name">Cases by section</field>
|
||||
<field name="name">Cases by Sales Team</field>
|
||||
<field name="res_model">crm.case.section</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
<field name="view_type">tree</field>
|
||||
@@ -436,7 +434,7 @@
|
||||
<field name="model">crm.case.section.custom</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Custom Case Section">
|
||||
<tree string="Custom Case Teams">
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
@@ -527,7 +525,7 @@
|
||||
</page>
|
||||
<page string="Emails" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/>
|
||||
<field colspan="4" name="email_cc" widget="char" size="512"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<tree string="Communication history">
|
||||
@@ -576,9 +574,6 @@
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'crm.case.custom'}"
|
||||
icon="terp-mail-message-new" type="action" />
|
||||
<button string="Forward to Partner"
|
||||
name="%(crm_lead_forward_to_partner_act)d"
|
||||
icon="terp-mail-forward" type="action" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
||||
@@ -77,7 +77,9 @@ class crm_lead_report(osv.osv):
|
||||
'name': fields.char('Year', size=64, required=False, readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'User', readonly=True),
|
||||
'country_id':fields.many2one('res.country', 'Country', readonly=True),
|
||||
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
|
||||
'section_id':fields.many2one('crm.case.section', 'Sales Team', readonly=True),
|
||||
'channel_id':fields.many2one('res.partner.canal', 'Channel', readonly=True),
|
||||
'type_id':fields.many2one('crm.case.resource.type', 'Campaign', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"),
|
||||
'perc_done': fields.function(_get_data, string='%Done', method=True, type="float"),
|
||||
@@ -99,8 +101,7 @@ class crm_lead_report(osv.osv):
|
||||
'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True),
|
||||
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]" , readonly=True),
|
||||
domain="[('section_id','=',section_id)]" , readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]", readonly=True),
|
||||
@@ -141,6 +142,8 @@ class crm_lead_report(osv.osv):
|
||||
c.company_id,
|
||||
c.priority,
|
||||
c.section_id,
|
||||
c.channel_id,
|
||||
c.type_id,
|
||||
c.categ_id,
|
||||
c.partner_id,
|
||||
c.country_id,
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="type_id" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
@@ -69,9 +71,17 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Leads Analysis">
|
||||
<group col="20" colspan="8">
|
||||
<filter string="Last 365 Days" icon="terp-go-year"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string="Last 30 Days" icon="terp-go-month" name="this_month"
|
||||
<filter string="Leads"
|
||||
icon="terp-check"
|
||||
name="filter_lead"
|
||||
groups="base.group_extended"
|
||||
domain="[('type','=','lead')]"/>
|
||||
<filter string="Opportunities"
|
||||
icon="terp-check"
|
||||
name="filter_opportunity"
|
||||
domain="[('type','=','opportunity')]"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="30 Days" icon="terp-go-month" name="this_month"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
@@ -111,6 +121,10 @@
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<filter string="Campaign" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'type_id'}" />
|
||||
<filter string="Channel" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
@@ -135,7 +149,9 @@
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="categ_id" widget="selection"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="channel_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
@@ -166,6 +182,8 @@
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="type_id" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
|
||||
<field name="nbr" string="#Opportunities" sum="#Opportunities"/>
|
||||
@@ -186,9 +204,9 @@
|
||||
<field name="name">Leads Analysis</field>
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{'search_default_lead':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="context">{'search_default_filter_lead': 1, 'search_default_lead':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain">[('type', '=', 'lead')]</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="help">Leads Analysis allows you to consult different informations relative to CRM. Check for treatments delays, number of responses given and emails send. You can sort out your leads analysis on different groups to get fine grained analysis.</field>
|
||||
</record>
|
||||
|
||||
@@ -210,9 +228,9 @@
|
||||
<field name="name">Opportunities Analysis</field>
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="context">{"search_default_filter_opportunity":1, "search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain">[('type', '=', 'opportunity')]</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="help">Opportunities Analysis menu gives you an instant access to your opportunities like expected revenue, planned cost, overpassed deadline or the number of exchanges by opportunity.</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -20,3 +20,5 @@
|
||||
##############################################################################
|
||||
|
||||
import partner_geo_assign
|
||||
import wizard
|
||||
import report
|
||||
|
||||
@@ -32,8 +32,9 @@ based on geolocalization.
|
||||
'depends': ['crm'],
|
||||
'update_xml': [
|
||||
'res_partner_view.xml',
|
||||
'crm_lead_view.xml',
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'crm_lead_view.xml',
|
||||
'report/crm_lead_report_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<page string="Assignation" groups="base.group_extended">
|
||||
<group name="partner_assign_group" col="5" colspan="4">
|
||||
<separator string="Partner Assignation" colspan="5"/>
|
||||
<field name="partner_assigned_id" on_change="onchange_assign_id(partner_assigned_id)" domain="[('partner_weight','>',0)]"/>
|
||||
<field name="partner_assigned_id" on_change="onchange_assign_id(partner_assigned_id)" domain="[('grade_id','<>',False)]"/>
|
||||
<field name="date_assign"/>
|
||||
<group colspan="1" col="1">
|
||||
<button string="Forward"
|
||||
|
||||
@@ -41,6 +41,20 @@ def geo_find(addr):
|
||||
_('Could not contact geolocation servers, please make sure you have a working internet connection (%s)') % e)
|
||||
|
||||
|
||||
class res_partner_grade(osv.osv):
|
||||
_order = 'sequence'
|
||||
_name = 'res.partner.grade'
|
||||
_columns = {
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'active': fields.boolean('Active'),
|
||||
'name': fields.char('Grade Name', size=32)
|
||||
}
|
||||
_defaults = {
|
||||
'active': lambda *args: 1
|
||||
}
|
||||
res_partner_grade()
|
||||
|
||||
|
||||
class res_partner(osv.osv):
|
||||
_inherit = "res.partner"
|
||||
_columns = {
|
||||
@@ -51,6 +65,7 @@ class res_partner(osv.osv):
|
||||
help="Gives the probability to assign a lead to this partner. (0 means no assignation.)"),
|
||||
'opportunity_assigned_ids': fields.one2many('crm.lead', 'partner_assigned_id',\
|
||||
'Assigned Opportunities'),
|
||||
'grade_id': fields.many2one('res.partner.grade', 'Partner Grade')
|
||||
}
|
||||
_defaults = {
|
||||
'partner_weight': lambda *args: 0
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import crm_lead_report
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields,osv
|
||||
import tools
|
||||
from crm import crm
|
||||
|
||||
AVAILABLE_STATES = [
|
||||
('draft','Draft'),
|
||||
('open','Open'),
|
||||
('cancel', 'Cancelled'),
|
||||
('done', 'Closed'),
|
||||
('pending','Pending')
|
||||
]
|
||||
|
||||
class crm_lead_report_assign(osv.osv):
|
||||
""" CRM Lead Report """
|
||||
_name = "crm.lead.report.assign"
|
||||
_auto = False
|
||||
_description = "CRM Lead Report"
|
||||
_columns = {
|
||||
'name': fields.char('Year', size=64, required=False, readonly=True),
|
||||
'partner_assigned_id':fields.many2one('res.partner', 'Partner', readonly=True),
|
||||
'grade_id':fields.many2one('res.partner.grade', 'Grade', readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'User', readonly=True),
|
||||
'country_id':fields.many2one('res.country', 'Country', readonly=True),
|
||||
'section_id':fields.many2one('crm.case.section', 'Sales Team', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'month':fields.selection([('01', 'January'), ('02', 'February'), \
|
||||
('03', 'March'), ('04', 'April'),\
|
||||
('05', 'May'), ('06', 'June'), \
|
||||
('07', 'July'), ('08', 'August'),\
|
||||
('09', 'September'), ('10', 'October'),\
|
||||
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'partner_date': fields.date('Partner Date', readonly=True),
|
||||
'create_date': fields.datetime('Create Date', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'delay_open': fields.float('Delay to Open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
|
||||
'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
|
||||
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'probability': fields.float('Avg Probability',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'probability_max': fields.float('Max Probability',digits=(16,2),readonly=True, group_operator="max"),
|
||||
'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True),
|
||||
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="[('section_id','=',section_id)]" , readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]", readonly=True),
|
||||
'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),
|
||||
'date_closed': fields.date('Close Date', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'type':fields.selection([
|
||||
('lead','Lead'),
|
||||
('opportunity','Opportunity'),
|
||||
],'Type', help="Type is used to separate Leads and Opportunities"),
|
||||
}
|
||||
def init(self, cr):
|
||||
|
||||
"""
|
||||
CRM Lead Report
|
||||
@param cr: the current row, from the database cursor
|
||||
"""
|
||||
tools.drop_view_if_exists(cr, 'crm_lead_report_assign')
|
||||
cr.execute("""
|
||||
CREATE OR REPLACE VIEW crm_lead_report_assign AS (
|
||||
SELECT
|
||||
c.id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
|
||||
to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
|
||||
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
|
||||
c.state,
|
||||
c.user_id,
|
||||
c.probability,
|
||||
c.probability as probability_max,
|
||||
c.stage_id,
|
||||
c.type,
|
||||
c.company_id,
|
||||
c.priority,
|
||||
c.section_id,
|
||||
c.categ_id,
|
||||
c.partner_id,
|
||||
c.country_id,
|
||||
c.planned_revenue,
|
||||
c.partner_assigned_id,
|
||||
p.grade_id,
|
||||
p.date as partner_date,
|
||||
c.planned_revenue*(c.probability/100) as probable_revenue,
|
||||
1 as nbr,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close,
|
||||
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected,
|
||||
extract('epoch' from (c.date_open-c.create_date))/(3600*24) as delay_open
|
||||
FROM
|
||||
crm_lead c
|
||||
left join res_partner p on (c.partner_assigned_id=p.id)
|
||||
)""")
|
||||
|
||||
crm_lead_report_assign()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Opportunity tree view -->
|
||||
<record id="view_report_crm_lead_assign_filter" model="ir.ui.view">
|
||||
<field name="name">crm.lead.report.assign.select</field>
|
||||
<field name="model">crm.lead.report.assign</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Leads Analysis">
|
||||
<group col="20" colspan="8">
|
||||
<filter string="Last 30 Days" icon="terp-go-month" name="this_month"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','open'))]"/>
|
||||
<filter icon="terp-check"
|
||||
string="Closed"
|
||||
domain="[('state','=','done')]"/>
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}"/>
|
||||
<field name="grade_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_assigned_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="user" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_assigned_id'}" />
|
||||
<filter string="Country" icon="terp-go-home" context="{'group_by':'country_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Section" icon="terp-personal+"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Grade" name="group_grade" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'grade_id'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Partner Date" icon="terp-go-today"
|
||||
domain="[]"
|
||||
name="group_partner_date"
|
||||
context="{'group_by':'partner_date'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="view_report_crm_opportunity_assign_tree" model="ir.ui.view">
|
||||
<field name="name">crm.lead.assign.report.tree</field>
|
||||
<field name="model">crm.lead.report.assign</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Opportunities Assignment Analysis">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="partner_date" invisible="1"/>
|
||||
<field name="section_id" invisible="1" groups="base.group_extended"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="grade_id" invisible="1" widget="selection"/>
|
||||
<field name="partner_assigned_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="country_id" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
|
||||
<field name="nbr" string="#Opportunities" sum="#Opportunities"/>
|
||||
<field name="planned_revenue" sum="Planned Revenues"/>
|
||||
<field name="delay_open" sum='Delay to open'/>
|
||||
<field name="delay_close" sum='Delay to close'/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="probability" widget="progressbar"/>
|
||||
<field name="probability_max" widget="progressbar"/>
|
||||
<field name="probable_revenue"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Leads by user and section Action -->
|
||||
|
||||
<record id="action_report_crm_opportunity_assign" model="ir.actions.act_window">
|
||||
<field name="name">Opp. Assignment Analysis</field>
|
||||
<field name="res_model">crm.lead.report.assign</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_group_partner_date": 1, "search_default_group_grade":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_assign_tree">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_report_crm_opportunity_assign_tree"/>
|
||||
<field name="act_window_id" ref="action_report_crm_opportunity_assign"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_report_crm_opportunities_assign_tree"
|
||||
groups="base.group_extended"
|
||||
parent="base.next_id_64" action="action_report_crm_opportunity_assign" sequence="5"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,62 +1,126 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_crm_partner_geo_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.geo.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook[last()]" position="inside">
|
||||
<page string="Geo Localization">
|
||||
<field name="partner_weight"/>
|
||||
<label string="" colspan="1"/>
|
||||
<button
|
||||
string="Geo Localize"
|
||||
name="geo_localize"
|
||||
icon="gtk-apply"
|
||||
type="object"/>
|
||||
<newline/>
|
||||
<field name="partner_latitude"/>
|
||||
<field name="partner_longitude"/>
|
||||
<field name="date_localization"/>
|
||||
<!--Partner Grade -->
|
||||
|
||||
<field name="opportunity_assigned_ids" colspan="4" nolabel="1">
|
||||
<tree string="Assigned Opportunities" colors="blue:state=='pending';gray:state=='cancel'">
|
||||
<field name="create_date"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" />
|
||||
<field name="user_id" />
|
||||
<field name="state" />
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_close" string="Close"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-close" />
|
||||
<button string="Convert to Opportunity"
|
||||
name="convert_opportunity"
|
||||
states="draft,open,pending" icon="gtk-index"
|
||||
type="object" attrs="{'invisible':[('type','=','opportunity')]}" />
|
||||
<button name="case_escalate" string="Escalate"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-go-up" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
|
||||
<record id="view_partner_grade_tree" model="ir.ui.view">
|
||||
<field name="name">res.partner.grade.tree</field>
|
||||
<field name="model">res.partner.grade</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Partner Grade">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_partner_grade_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.grade.form</field>
|
||||
<field name="model">res.partner.grade</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Partner Grade">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="res_partner_grade_action" model="ir.actions.act_window">
|
||||
<field name="name">Partner Grade</field>
|
||||
<field name="res_model">res.partner.grade</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem action="res_partner_grade_action" id="menu_res_partner_grade_action"
|
||||
groups="base.group_extended"
|
||||
parent="base.menu_crm_config_lead" />
|
||||
|
||||
<!-- Partner form -->
|
||||
<record id="view_res_partner_filter_assign_tree" model="ir.ui.view">
|
||||
<field name="name">res.partner.geo.inherit.tree</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base.view_partner_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="after">
|
||||
<field name="grade_id"/>
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_res_partner_filter_assign" model="ir.ui.view">
|
||||
<field name="name">res.partner.geo.inherit.search</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">search</field>
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="category_id" position="after">
|
||||
<field name="grade_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_crm_partner_geo_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.geo.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook[last()]" position="inside">
|
||||
<page string="Geo Localization">
|
||||
<field name="grade_id" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="partner_weight"/>
|
||||
<label string="" colspan="1"/>
|
||||
<button
|
||||
string="Geo Localize"
|
||||
name="geo_localize"
|
||||
icon="gtk-apply"
|
||||
type="object"/>
|
||||
<newline/>
|
||||
<field name="partner_latitude"/>
|
||||
<field name="partner_longitude"/>
|
||||
<field name="date_localization"/>
|
||||
|
||||
<field name="opportunity_assigned_ids" colspan="4" nolabel="1">
|
||||
<tree string="Assigned Opportunities" colors="blue:state=='pending';gray:state=='cancel'">
|
||||
<field name="create_date"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" />
|
||||
<field name="user_id" />
|
||||
<field name="state" />
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_close" string="Close"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-close" />
|
||||
<button string="Convert to Opportunity"
|
||||
name="convert_opportunity"
|
||||
states="draft,open,pending" icon="gtk-index"
|
||||
type="object" attrs="{'invisible':[('type','=','opportunity')]}" />
|
||||
<button name="case_escalate" string="Escalate"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-go-up" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
##############################################################################
|
||||
|
||||
from osv import osv, fields
|
||||
from tools import cache
|
||||
import pooler
|
||||
|
||||
|
||||
class decimal_precision(osv.osv):
|
||||
_name = 'decimal.precision'
|
||||
@@ -30,23 +33,33 @@ class decimal_precision(osv.osv):
|
||||
_defaults = {
|
||||
'digits': lambda *a : 2,
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
('name_uniq', 'unique (name)', """The Usage of the decimal precision must be unique!"""),
|
||||
]
|
||||
|
||||
@cache(skiparg=3)
|
||||
def precision_get(self, cr, uid, application):
|
||||
cr.execute('select digits from decimal_precision where name=%s', (application,))
|
||||
res = cr.fetchone()
|
||||
return res and res[0] or 2
|
||||
|
||||
def write(self, cr, uid, ids, data, *args, **argv):
|
||||
self.precision_get.clear_cache(cr.dbname)
|
||||
res = super(decimal_precision, self).write(cr, uid, ids, data, *args, **argv)
|
||||
for obj in self.pool.obj_list():
|
||||
for colname,col in self.pool.get(obj)._columns.items():
|
||||
if isinstance(col, fields.float):
|
||||
col.digits_change(cr)
|
||||
return res
|
||||
|
||||
decimal_precision()
|
||||
|
||||
|
||||
def get_precision(application):
|
||||
def change_digit(cr):
|
||||
cr.execute('select digits from decimal_precision where name=%s', (application,))
|
||||
res = cr.fetchone()
|
||||
return (16,res and res[0] or 2)
|
||||
res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, application)
|
||||
return (16, res)
|
||||
return change_digit
|
||||
|
||||
|
||||
|
||||
@@ -27,28 +27,39 @@ from mx import DateTime
|
||||
from tools.translate import _
|
||||
|
||||
class one2many_mod2(fields.one2many):
|
||||
def get(self, cr, obj, ids, name, user=None, offset=0, context={}, values={}):
|
||||
res = {}
|
||||
for id in ids:
|
||||
res[id] = []
|
||||
def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
res5 = obj.read(cr, user, ids, ['date_current', 'user_id'], context=context)
|
||||
res6 = {}
|
||||
for r in res5:
|
||||
res6[r['id']] = (r['date_current'], r['user_id'][0])
|
||||
if values is None:
|
||||
values = {}
|
||||
|
||||
ids2 = []
|
||||
for id in ids:
|
||||
dom = []
|
||||
res = {}.fromkeys(ids, [])
|
||||
|
||||
# dict:
|
||||
# {idn: (date_current, user_id), ...
|
||||
# 1: ('2010-08-15', 1)}
|
||||
res6 = dict([(rec['id'], (rec['date_current'], rec['user_id'][0]))
|
||||
for rec
|
||||
in obj.read(cr, user, ids, ['date_current', 'user_id'], context=context)])
|
||||
|
||||
# eg: ['|', '|',
|
||||
# '&', '&', ('name', '>=', '2011-03-01'), ('name', '<=', '2011-03-01'), ('employee_id.user_id', '=', 1),
|
||||
# '&', '&', ('name', '>=', '2011-02-01'), ('name', '<=', '2011-02-01'), ('employee_id.user_id', '=', 1)]
|
||||
dom = []
|
||||
for c, id in enumerate(ids):
|
||||
if id in res6:
|
||||
dom = [('name', '>=', res6[id][0] + ' 00:00:00'),
|
||||
('name', '<=', res6[id][0] + ' 23:59:59'),
|
||||
('employee_id.user_id', '=', res6[id][1])]
|
||||
ids2.extend(obj.pool.get(self._obj).search(cr, user,
|
||||
dom, limit=self._limit))
|
||||
if c: # skip first
|
||||
dom.insert(0 ,'|')
|
||||
dom.append('&')
|
||||
dom.append('&')
|
||||
dom.append(('name', '>=', res6[id][0]))
|
||||
dom.append(('name', '<=', res6[id][0]))
|
||||
dom.append(('employee_id.user_id', '=', res6[id][1]))
|
||||
|
||||
for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2,
|
||||
[self._fields_id], context=context, load='_classic_write'):
|
||||
ids2 = obj.pool.get(self._obj).search(cr, user, dom, limit=self._limit)
|
||||
|
||||
for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
|
||||
if r[self._fields_id]:
|
||||
res.setdefault(r[self._fields_id][0], []).append(r['id'])
|
||||
|
||||
@@ -57,17 +68,21 @@ class one2many_mod2(fields.one2many):
|
||||
def set(self, cr, obj, id, field, values, user=None, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
context = context.copy()
|
||||
context['sheet_id'] = id
|
||||
return super(one2many_mod2, self).set(cr, obj, id, field, values, user=user,
|
||||
context=context)
|
||||
return super(one2many_mod2, self).set(cr, obj, id, field, values, user=user, context=context)
|
||||
|
||||
|
||||
class one2many_mod(fields.one2many):
|
||||
def get(self, cr, obj, ids, name, user=None, offset=0, context={}, values={}):
|
||||
res = {}
|
||||
for id in ids:
|
||||
res[id] = []
|
||||
def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
if values is None:
|
||||
values = {}
|
||||
|
||||
res = {}.fromkeys(ids, [])
|
||||
|
||||
res5 = obj.read(cr, user, ids, ['date_current', 'user_id'], context=context)
|
||||
res6 = {}
|
||||
|
||||
@@ -378,7 +378,6 @@ class one2many_domain(fields.one2many):
|
||||
|
||||
move_obj = obj.pool.get('stock.move')
|
||||
res = {}.fromkeys(ids, [])
|
||||
key = operator.itemgetter(0)
|
||||
move_ids = move_obj.search(cr, user, self._domain+[('production_id', 'in', tuple(ids))], context=context)
|
||||
related_move_dict = dict([(o.production_id.id, [o.id]) for o in move_obj.browse(cr, user, move_ids, context=context)])
|
||||
res.update(related_move_dict)
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
#!/usr/bin/python
|
||||
#-*- encoding: utf-8 -*-
|
||||
# This module is part of the spambayes project, which is Copyright 2003
|
||||
# The Python Software Foundation and is covered by the Python Software
|
||||
# Foundation license.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from win32com import universal
|
||||
from win32com.server.exception import COMException
|
||||
@@ -40,8 +62,12 @@ def GetConn():
|
||||
|
||||
class ButtonEvent:
|
||||
def OnClick(self, button, cancel):
|
||||
mngr = manager.GetManager()
|
||||
mngr.ShowManager()
|
||||
import win32ui
|
||||
try:
|
||||
mngr = manager.GetManager()
|
||||
mngr.ShowManager()
|
||||
except Exception,e:
|
||||
win32ui.MessageBox("Fail to Initialize dialog.\n"+str(e),"OpenERP Configuration", win32con.MB_ICONERROR)
|
||||
return cancel
|
||||
#
|
||||
class ViewPartners:
|
||||
@@ -55,12 +81,12 @@ class ViewPartners:
|
||||
if ex:
|
||||
is_login = str(data['login'])
|
||||
if is_login == 'False':
|
||||
win32ui.MessageBox("Please login to the database first", "Database Connection", win32con.MB_ICONEXCLAMATION)
|
||||
win32ui.MessageBox("Please login to the database first", "OpenERP Connection", win32con.MB_ICONEXCLAMATION)
|
||||
elif ex.Selection.Count == 1 or ex.Selection.Count == 0:
|
||||
mngr = manager.GetManager()
|
||||
mngr.ShowManager("IDD_VIEW_PARTNER_DIALOG")
|
||||
elif ex.Selection.Count > 1:
|
||||
win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","",win32con.MB_ICONINFORMATION)
|
||||
win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Open Contact",win32con.MB_ICONINFORMATION)
|
||||
return cancel
|
||||
#
|
||||
class ArchiveEvent:
|
||||
@@ -74,14 +100,14 @@ class ArchiveEvent:
|
||||
if ex:
|
||||
is_login = str(data['login'])
|
||||
if is_login == 'False':
|
||||
win32ui.MessageBox("Please login to the database first", "Database Connection", win32con.MB_ICONEXCLAMATION)
|
||||
win32ui.MessageBox("Please login to the database first", "OpenERP Connection", win32con.MB_ICONEXCLAMATION)
|
||||
elif ex.Selection.Count == 1:
|
||||
mngr = manager.GetManager()
|
||||
mngr.ShowManager("IDD_SYNC")
|
||||
elif ex.Selection.Count == 0:
|
||||
win32ui.MessageBox("No mail selected to archive to OpenERP","",win32con.MB_ICONINFORMATION)
|
||||
win32ui.MessageBox("No mail selected to push to OpenERP","Push to OpenERP",win32con.MB_ICONINFORMATION)
|
||||
elif ex.Selection.Count > 1:
|
||||
win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","",win32con.MB_ICONINFORMATION)
|
||||
win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Push to OpenERP",win32con.MB_ICONINFORMATION)
|
||||
return cancel
|
||||
#
|
||||
class OutlookAddin:
|
||||
@@ -111,8 +137,8 @@ class OutlookAddin:
|
||||
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="Archive to OpenERP"
|
||||
item.TooltipText = "Click to archive to OpenERP"
|
||||
item.Caption="Push to OpenERP"
|
||||
item.TooltipText = "Click to push to OpenERP"
|
||||
item.Enabled = True
|
||||
|
||||
toolbar = bars.Item("Standard")
|
||||
@@ -120,8 +146,8 @@ class OutlookAddin:
|
||||
item = toolbar.Controls.Add(Type=constants.msoControlButton, Temporary=True)
|
||||
# Hook events for the item
|
||||
item = self.toolbarButton = DispatchWithEvents(item, ArchiveEvent)
|
||||
item.Caption="Archive to OpenERP"
|
||||
item.TooltipText = "Click to archive to OpenERP"
|
||||
item.Caption="Push to OpenERP"
|
||||
item.TooltipText = "Click to push to OpenERP"
|
||||
item.Enabled = True
|
||||
|
||||
# Adding Menu in Menu Bar to the Web Menu of the Outlook
|
||||
@@ -196,9 +222,11 @@ if __name__ == '__main__':
|
||||
if "--unregister" in sys.argv:
|
||||
UnregisterAddin(OutlookAddin)
|
||||
UnregisterXMLConn(NewConn)
|
||||
print "\n \tPlug In Un-registered Successfully.\n\tThank You for Using PlugIn."
|
||||
else:
|
||||
RegisterAddin(OutlookAddin)
|
||||
RegisterXMLConn(NewConn)
|
||||
print "\n \tPlug In Registered Successfully.\n\tEnjoy Archiving with OpenERP.\n\tSee UserGuide for More. "
|
||||
|
||||
#mngr = manager.GetManager()
|
||||
#mngr.ShowManager("IDD_MANAGER")
|
||||
|
||||
@@ -218,6 +218,7 @@ class CkHtmlToXml(_object):
|
||||
__del__ = lambda self : None;
|
||||
def get_Utf8(self): return _chilkat.CkHtmlToXml_get_Utf8(self)
|
||||
def put_Utf8(self, *args): return _chilkat.CkHtmlToXml_put_Utf8(self, *args)
|
||||
def SetHtmlBytes(self, *args): return _chilkat.CkHtmlToXml_SetHtmlBytes(self, *args)
|
||||
def UnlockComponent(self, *args): return _chilkat.CkHtmlToXml_UnlockComponent(self, *args)
|
||||
def IsUnlocked(self): return _chilkat.CkHtmlToXml_IsUnlocked(self)
|
||||
def SaveLastError(self, *args): return _chilkat.CkHtmlToXml_SaveLastError(self, *args)
|
||||
@@ -630,6 +631,10 @@ class CkSocket(_object):
|
||||
def put_HttpProxyHostname(self, *args): return _chilkat.CkSocket_put_HttpProxyHostname(self, *args)
|
||||
def get_HttpProxyPort(self): return _chilkat.CkSocket_get_HttpProxyPort(self)
|
||||
def put_HttpProxyPort(self, *args): return _chilkat.CkSocket_put_HttpProxyPort(self, *args)
|
||||
def get_NumSslAcceptableClientCAs(self): return _chilkat.CkSocket_get_NumSslAcceptableClientCAs(self)
|
||||
def GetSslAcceptableClientCaDn(self, *args): return _chilkat.CkSocket_GetSslAcceptableClientCaDn(self, *args)
|
||||
def getSslAcceptableClientCaDn(self, *args): return _chilkat.CkSocket_getSslAcceptableClientCaDn(self, *args)
|
||||
def AddSslAcceptableClientCaDn(self, *args): return _chilkat.CkSocket_AddSslAcceptableClientCaDn(self, *args)
|
||||
def UnlockComponent(self, *args): return _chilkat.CkSocket_UnlockComponent(self, *args)
|
||||
def IsUnlocked(self): return _chilkat.CkSocket_IsUnlocked(self)
|
||||
def AsyncSendBytes(self, *args): return _chilkat.CkSocket_AsyncSendBytes(self, *args)
|
||||
@@ -1241,6 +1246,8 @@ class CkRsa(_object):
|
||||
def signHashENC(self, *args): return _chilkat.CkRsa_signHashENC(self, *args)
|
||||
def get_VerboseLogging(self): return _chilkat.CkRsa_get_VerboseLogging(self)
|
||||
def put_VerboseLogging(self, *args): return _chilkat.CkRsa_put_VerboseLogging(self, *args)
|
||||
def get_NoUnpad(self): return _chilkat.CkRsa_get_NoUnpad(self)
|
||||
def put_NoUnpad(self, *args): return _chilkat.CkRsa_put_NoUnpad(self, *args)
|
||||
def UnlockComponent(self, *args): return _chilkat.CkRsa_UnlockComponent(self, *args)
|
||||
def SaveLastError(self, *args): return _chilkat.CkRsa_SaveLastError(self, *args)
|
||||
def LastErrorXml(self, *args): return _chilkat.CkRsa_LastErrorXml(self, *args)
|
||||
@@ -1338,7 +1345,6 @@ class CkEmail(_object):
|
||||
def ComputeGlobalKey(self, *args): return _chilkat.CkEmail_ComputeGlobalKey(self, *args)
|
||||
def computeGlobalKey(self, *args): return _chilkat.CkEmail_computeGlobalKey(self, *args)
|
||||
def get_NumDaysOld(self): return _chilkat.CkEmail_get_NumDaysOld(self)
|
||||
def UnwrapSecurity(self): return _chilkat.CkEmail_UnwrapSecurity(self)
|
||||
def get_PreferredCharset(self, *args): return _chilkat.CkEmail_get_PreferredCharset(self, *args)
|
||||
def preferredCharset(self): return _chilkat.CkEmail_preferredCharset(self)
|
||||
def put_PreferredCharset(self, *args): return _chilkat.CkEmail_put_PreferredCharset(self, *args)
|
||||
@@ -1349,6 +1355,22 @@ class CkEmail(_object):
|
||||
def AddEncryptCert(self, *args): return _chilkat.CkEmail_AddEncryptCert(self, *args)
|
||||
def UnpackHtml(self, *args): return _chilkat.CkEmail_UnpackHtml(self, *args)
|
||||
def SetFromMimeBytes(self, *args): return _chilkat.CkEmail_SetFromMimeBytes(self, *args)
|
||||
def SetAttachmentDisposition(self, *args): return _chilkat.CkEmail_SetAttachmentDisposition(self, *args)
|
||||
def RemoveHtmlAlternative(self): return _chilkat.CkEmail_RemoveHtmlAlternative(self)
|
||||
def RemovePlainTextAlternative(self): return _chilkat.CkEmail_RemovePlainTextAlternative(self)
|
||||
def AddHeaderField2(self, *args): return _chilkat.CkEmail_AddHeaderField2(self, *args)
|
||||
def get_PrependHeaders(self): return _chilkat.CkEmail_get_PrependHeaders(self)
|
||||
def put_PrependHeaders(self, *args): return _chilkat.CkEmail_put_PrependHeaders(self, *args)
|
||||
def CreateDsn(self, *args): return _chilkat.CkEmail_CreateDsn(self, *args)
|
||||
def CreateMdn(self, *args): return _chilkat.CkEmail_CreateMdn(self, *args)
|
||||
def get_SigningHashAlg(self, *args): return _chilkat.CkEmail_get_SigningHashAlg(self, *args)
|
||||
def signingHashAlg(self): return _chilkat.CkEmail_signingHashAlg(self)
|
||||
def put_SigningHashAlg(self, *args): return _chilkat.CkEmail_put_SigningHashAlg(self, *args)
|
||||
def get_Pkcs7CryptAlg(self, *args): return _chilkat.CkEmail_get_Pkcs7CryptAlg(self, *args)
|
||||
def pkcs7CryptAlg(self): return _chilkat.CkEmail_pkcs7CryptAlg(self)
|
||||
def put_Pkcs7CryptAlg(self, *args): return _chilkat.CkEmail_put_Pkcs7CryptAlg(self, *args)
|
||||
def get_Pkcs7KeyLength(self): return _chilkat.CkEmail_get_Pkcs7KeyLength(self)
|
||||
def put_Pkcs7KeyLength(self, *args): return _chilkat.CkEmail_put_Pkcs7KeyLength(self, *args)
|
||||
def SetTextBody(self, *args): return _chilkat.CkEmail_SetTextBody(self, *args)
|
||||
def getRelatedStringCrLf(self, *args): return _chilkat.CkEmail_getRelatedStringCrLf(self, *args)
|
||||
def getRelatedContentID(self, *args): return _chilkat.CkEmail_getRelatedContentID(self, *args)
|
||||
@@ -1664,7 +1686,20 @@ class CkCert(_object):
|
||||
__del__ = lambda self : None;
|
||||
def CheckRevoked(self): return _chilkat.CkCert_CheckRevoked(self)
|
||||
def get_Sha1Thumbprint(self, *args): return _chilkat.CkCert_get_Sha1Thumbprint(self, *args)
|
||||
def TestCert(self): return _chilkat.CkCert_TestCert(self)
|
||||
def ExportCertXml(self, *args): return _chilkat.CkCert_ExportCertXml(self, *args)
|
||||
def exportCertXml(self): return _chilkat.CkCert_exportCertXml(self)
|
||||
def get_VerboseLogging(self): return _chilkat.CkCert_get_VerboseLogging(self)
|
||||
def put_VerboseLogging(self, *args): return _chilkat.CkCert_put_VerboseLogging(self, *args)
|
||||
def get_CertVersion(self): return _chilkat.CkCert_get_CertVersion(self)
|
||||
def SetPrivateKey(self, *args): return _chilkat.CkCert_SetPrivateKey(self, *args)
|
||||
def get_OcspUrl(self, *args): return _chilkat.CkCert_get_OcspUrl(self, *args)
|
||||
def ocspUrl(self): return _chilkat.CkCert_ocspUrl(self)
|
||||
def FindIssuer(self): return _chilkat.CkCert_FindIssuer(self)
|
||||
def LoadByIssuerAndSerialNumber(self, *args): return _chilkat.CkCert_LoadByIssuerAndSerialNumber(self, *args)
|
||||
def get_SelfSigned(self): return _chilkat.CkCert_get_SelfSigned(self)
|
||||
def SetPrivateKeyPem(self, *args): return _chilkat.CkCert_SetPrivateKeyPem(self, *args)
|
||||
def GetPrivateKeyPem(self, *args): return _chilkat.CkCert_GetPrivateKeyPem(self, *args)
|
||||
def getPrivateKeyPem(self): return _chilkat.CkCert_getPrivateKeyPem(self)
|
||||
def getEncoded(self): return _chilkat.CkCert_getEncoded(self)
|
||||
def issuerE(self): return _chilkat.CkCert_issuerE(self)
|
||||
def issuerC(self): return _chilkat.CkCert_issuerC(self)
|
||||
@@ -1781,6 +1816,8 @@ class CkCertStore(_object):
|
||||
def OpenOutlookStore(self, *args): return _chilkat.CkCertStore_OpenOutlookStore(self, *args)
|
||||
def OpenRegistryStore(self, *args): return _chilkat.CkCertStore_OpenRegistryStore(self, *args)
|
||||
def FindCertBySha1Thumbprint(self, *args): return _chilkat.CkCertStore_FindCertBySha1Thumbprint(self, *args)
|
||||
def get_VerboseLogging(self): return _chilkat.CkCertStore_get_VerboseLogging(self)
|
||||
def put_VerboseLogging(self, *args): return _chilkat.CkCertStore_put_VerboseLogging(self, *args)
|
||||
def lastErrorText(self): return _chilkat.CkCertStore_lastErrorText(self)
|
||||
def lastErrorXml(self): return _chilkat.CkCertStore_lastErrorXml(self)
|
||||
def lastErrorHtml(self): return _chilkat.CkCertStore_lastErrorHtml(self)
|
||||
@@ -1875,6 +1912,23 @@ class CkMime(_object):
|
||||
def AddContentLength(self): return _chilkat.CkMime_AddContentLength(self)
|
||||
def get_VerboseLogging(self): return _chilkat.CkMime_get_VerboseLogging(self)
|
||||
def put_VerboseLogging(self, *args): return _chilkat.CkMime_put_VerboseLogging(self, *args)
|
||||
def DecryptUsingPfxData(self, *args): return _chilkat.CkMime_DecryptUsingPfxData(self, *args)
|
||||
def DecryptUsingPfxFile(self, *args): return _chilkat.CkMime_DecryptUsingPfxFile(self, *args)
|
||||
def AddPfxSourceData(self, *args): return _chilkat.CkMime_AddPfxSourceData(self, *args)
|
||||
def AddPfxSourceFile(self, *args): return _chilkat.CkMime_AddPfxSourceFile(self, *args)
|
||||
def get_Pkcs7CryptAlg(self, *args): return _chilkat.CkMime_get_Pkcs7CryptAlg(self, *args)
|
||||
def pkcs7CryptAlg(self): return _chilkat.CkMime_pkcs7CryptAlg(self)
|
||||
def put_Pkcs7CryptAlg(self, *args): return _chilkat.CkMime_put_Pkcs7CryptAlg(self, *args)
|
||||
def get_Pkcs7KeyLength(self): return _chilkat.CkMime_get_Pkcs7KeyLength(self)
|
||||
def put_Pkcs7KeyLength(self, *args): return _chilkat.CkMime_put_Pkcs7KeyLength(self, *args)
|
||||
def get_SigningHashAlg(self, *args): return _chilkat.CkMime_get_SigningHashAlg(self, *args)
|
||||
def signingHashAlg(self): return _chilkat.CkMime_signingHashAlg(self)
|
||||
def put_SigningHashAlg(self, *args): return _chilkat.CkMime_put_SigningHashAlg(self, *args)
|
||||
def GetHeaderFieldAttribute(self, *args): return _chilkat.CkMime_GetHeaderFieldAttribute(self, *args)
|
||||
def getHeaderFieldAttribute(self, *args): return _chilkat.CkMime_getHeaderFieldAttribute(self, *args)
|
||||
def HasSignatureSigningTime(self, *args): return _chilkat.CkMime_HasSignatureSigningTime(self, *args)
|
||||
def GetSignatureSigningTime(self, *args): return _chilkat.CkMime_GetSignatureSigningTime(self, *args)
|
||||
def RemoveHeaderField(self, *args): return _chilkat.CkMime_RemoveHeaderField(self, *args)
|
||||
def entireHead(self): return _chilkat.CkMime_entireHead(self)
|
||||
def entireBody(self): return _chilkat.CkMime_entireBody(self)
|
||||
def xml(self): return _chilkat.CkMime_xml(self)
|
||||
@@ -2111,6 +2165,14 @@ class CkMailMan(_object):
|
||||
def put_HttpProxyPassword(self, *args): return _chilkat.CkMailMan_put_HttpProxyPassword(self, *args)
|
||||
def get_HttpProxyPort(self): return _chilkat.CkMailMan_get_HttpProxyPort(self)
|
||||
def put_HttpProxyPort(self, *args): return _chilkat.CkMailMan_put_HttpProxyPort(self, *args)
|
||||
def get_AutoFix(self): return _chilkat.CkMailMan_get_AutoFix(self)
|
||||
def put_AutoFix(self, *args): return _chilkat.CkMailMan_put_AutoFix(self, *args)
|
||||
def get_VerboseLogging(self): return _chilkat.CkMailMan_get_VerboseLogging(self)
|
||||
def put_VerboseLogging(self, *args): return _chilkat.CkMailMan_put_VerboseLogging(self, *args)
|
||||
def get_Pop3Stls(self): return _chilkat.CkMailMan_get_Pop3Stls(self)
|
||||
def put_Pop3Stls(self, *args): return _chilkat.CkMailMan_put_Pop3Stls(self, *args)
|
||||
def AddPfxSourceData(self, *args): return _chilkat.CkMailMan_AddPfxSourceData(self, *args)
|
||||
def AddPfxSourceFile(self, *args): return _chilkat.CkMailMan_AddPfxSourceFile(self, *args)
|
||||
def lastErrorText(self): return _chilkat.CkMailMan_lastErrorText(self)
|
||||
def lastErrorXml(self): return _chilkat.CkMailMan_lastErrorXml(self)
|
||||
def lastErrorHtml(self): return _chilkat.CkMailMan_lastErrorHtml(self)
|
||||
@@ -2183,8 +2245,6 @@ class CkMailMan(_object):
|
||||
def put_ReadTimeout(self, *args): return _chilkat.CkMailMan_put_ReadTimeout(self, *args)
|
||||
def get_ConnectTimeout(self): return _chilkat.CkMailMan_get_ConnectTimeout(self)
|
||||
def put_ConnectTimeout(self, *args): return _chilkat.CkMailMan_put_ConnectTimeout(self, *args)
|
||||
def get_AutoUnwrapSecurity(self): return _chilkat.CkMailMan_get_AutoUnwrapSecurity(self)
|
||||
def put_AutoUnwrapSecurity(self, *args): return _chilkat.CkMailMan_put_AutoUnwrapSecurity(self, *args)
|
||||
def get_ResetDateOnLoad(self): return _chilkat.CkMailMan_get_ResetDateOnLoad(self)
|
||||
def put_ResetDateOnLoad(self, *args): return _chilkat.CkMailMan_put_ResetDateOnLoad(self, *args)
|
||||
def get_OpaqueSigning(self): return _chilkat.CkMailMan_get_OpaqueSigning(self)
|
||||
@@ -2197,8 +2257,6 @@ class CkMailMan(_object):
|
||||
def put_StartTLS(self, *args): return _chilkat.CkMailMan_put_StartTLS(self, *args)
|
||||
def get_EmbedCertChain(self): return _chilkat.CkMailMan_get_EmbedCertChain(self)
|
||||
def put_EmbedCertChain(self, *args): return _chilkat.CkMailMan_put_EmbedCertChain(self, *args)
|
||||
def get_AutoSaveCerts(self): return _chilkat.CkMailMan_get_AutoSaveCerts(self)
|
||||
def put_AutoSaveCerts(self, *args): return _chilkat.CkMailMan_put_AutoSaveCerts(self, *args)
|
||||
def get_PopSsl(self): return _chilkat.CkMailMan_get_PopSsl(self)
|
||||
def put_PopSsl(self, *args): return _chilkat.CkMailMan_put_PopSsl(self, *args)
|
||||
def get_SmtpSsl(self): return _chilkat.CkMailMan_get_SmtpSsl(self)
|
||||
@@ -2320,6 +2378,8 @@ class CkGzip(_object):
|
||||
def xfdlToXml(self, *args): return _chilkat.CkGzip_xfdlToXml(self, *args)
|
||||
def Encode(self, *args): return _chilkat.CkGzip_Encode(self, *args)
|
||||
def encode(self, *args): return _chilkat.CkGzip_encode(self, *args)
|
||||
def get_VerboseLogging(self): return _chilkat.CkGzip_get_VerboseLogging(self)
|
||||
def put_VerboseLogging(self, *args): return _chilkat.CkGzip_put_VerboseLogging(self, *args)
|
||||
def lastErrorText(self): return _chilkat.CkGzip_lastErrorText(self)
|
||||
def lastErrorXml(self): return _chilkat.CkGzip_lastErrorXml(self)
|
||||
def lastErrorHtml(self): return _chilkat.CkGzip_lastErrorHtml(self)
|
||||
@@ -2471,6 +2531,11 @@ class CkCrypt2(_object):
|
||||
def put_UuFilename(self, *args): return _chilkat.CkCrypt2_put_UuFilename(self, *args)
|
||||
def get_VerboseLogging(self): return _chilkat.CkCrypt2_get_VerboseLogging(self)
|
||||
def put_VerboseLogging(self, *args): return _chilkat.CkCrypt2_put_VerboseLogging(self, *args)
|
||||
def AddPfxSourceData(self, *args): return _chilkat.CkCrypt2_AddPfxSourceData(self, *args)
|
||||
def AddPfxSourceFile(self, *args): return _chilkat.CkCrypt2_AddPfxSourceFile(self, *args)
|
||||
def get_Pkcs7CryptAlg(self, *args): return _chilkat.CkCrypt2_get_Pkcs7CryptAlg(self, *args)
|
||||
def pkcs7CryptAlg(self): return _chilkat.CkCrypt2_pkcs7CryptAlg(self)
|
||||
def put_Pkcs7CryptAlg(self, *args): return _chilkat.CkCrypt2_put_Pkcs7CryptAlg(self, *args)
|
||||
def get_FirstChunk(self): return _chilkat.CkCrypt2_get_FirstChunk(self)
|
||||
def put_FirstChunk(self, *args): return _chilkat.CkCrypt2_put_FirstChunk(self, *args)
|
||||
def get_LastChunk(self): return _chilkat.CkCrypt2_get_LastChunk(self)
|
||||
@@ -2847,6 +2912,16 @@ class CkFtp2(_object):
|
||||
def get_SslProtocol(self, *args): return _chilkat.CkFtp2_get_SslProtocol(self, *args)
|
||||
def sslProtocol(self): return _chilkat.CkFtp2_sslProtocol(self)
|
||||
def put_SslProtocol(self, *args): return _chilkat.CkFtp2_put_SslProtocol(self, *args)
|
||||
def get_AutoGetSizeForProgress(self): return _chilkat.CkFtp2_get_AutoGetSizeForProgress(self)
|
||||
def put_AutoGetSizeForProgress(self, *args): return _chilkat.CkFtp2_put_AutoGetSizeForProgress(self, *args)
|
||||
def get_SyncPreview(self, *args): return _chilkat.CkFtp2_get_SyncPreview(self, *args)
|
||||
def syncPreview(self): return _chilkat.CkFtp2_syncPreview(self)
|
||||
def SyncRemoteTree2(self, *args): return _chilkat.CkFtp2_SyncRemoteTree2(self, *args)
|
||||
def get_AutoFix(self): return _chilkat.CkFtp2_get_AutoFix(self)
|
||||
def put_AutoFix(self, *args): return _chilkat.CkFtp2_put_AutoFix(self, *args)
|
||||
def get_ClientIpAddress(self, *args): return _chilkat.CkFtp2_get_ClientIpAddress(self, *args)
|
||||
def clientIpAddress(self): return _chilkat.CkFtp2_clientIpAddress(self)
|
||||
def put_ClientIpAddress(self, *args): return _chilkat.CkFtp2_put_ClientIpAddress(self, *args)
|
||||
CkFtp2_swigregister = _chilkat.CkFtp2_swigregister
|
||||
CkFtp2_swigregister(CkFtp2)
|
||||
|
||||
@@ -3060,6 +3135,40 @@ class CkHttp(_object):
|
||||
def PostUrlEncoded(self, *args): return _chilkat.CkHttp_PostUrlEncoded(self, *args)
|
||||
def PostBinary(self, *args): return _chilkat.CkHttp_PostBinary(self, *args)
|
||||
def postBinary(self, *args): return _chilkat.CkHttp_postBinary(self, *args)
|
||||
def QuickGetObj(self, *args): return _chilkat.CkHttp_QuickGetObj(self, *args)
|
||||
def get_SessionLogFilename(self, *args): return _chilkat.CkHttp_get_SessionLogFilename(self, *args)
|
||||
def sessionLogFilename(self): return _chilkat.CkHttp_sessionLogFilename(self)
|
||||
def put_SessionLogFilename(self, *args): return _chilkat.CkHttp_put_SessionLogFilename(self, *args)
|
||||
def get_BgLastErrorText(self, *args): return _chilkat.CkHttp_get_BgLastErrorText(self, *args)
|
||||
def bgLastErrorText(self): return _chilkat.CkHttp_bgLastErrorText(self)
|
||||
def get_BgResultData(self, *args): return _chilkat.CkHttp_get_BgResultData(self, *args)
|
||||
def get_BgResultInt(self): return _chilkat.CkHttp_get_BgResultInt(self)
|
||||
def get_BgResultString(self, *args): return _chilkat.CkHttp_get_BgResultString(self, *args)
|
||||
def bgResultString(self): return _chilkat.CkHttp_bgResultString(self)
|
||||
def get_BgTaskFinished(self): return _chilkat.CkHttp_get_BgTaskFinished(self)
|
||||
def get_BgTaskRunning(self): return _chilkat.CkHttp_get_BgTaskRunning(self)
|
||||
def get_BgTaskSuccess(self): return _chilkat.CkHttp_get_BgTaskSuccess(self)
|
||||
def get_EventLogCount(self): return _chilkat.CkHttp_get_EventLogCount(self)
|
||||
def get_KeepEventLog(self): return _chilkat.CkHttp_get_KeepEventLog(self)
|
||||
def put_KeepEventLog(self, *args): return _chilkat.CkHttp_put_KeepEventLog(self, *args)
|
||||
def get_UseBgThread(self): return _chilkat.CkHttp_get_UseBgThread(self)
|
||||
def put_UseBgThread(self, *args): return _chilkat.CkHttp_put_UseBgThread(self, *args)
|
||||
def BgResponseObject(self): return _chilkat.CkHttp_BgResponseObject(self)
|
||||
def BgTaskAbort(self): return _chilkat.CkHttp_BgTaskAbort(self)
|
||||
def ClearEventLog(self): return _chilkat.CkHttp_ClearEventLog(self)
|
||||
def EventLogName(self, *args): return _chilkat.CkHttp_EventLogName(self, *args)
|
||||
def eventLogName(self, *args): return _chilkat.CkHttp_eventLogName(self, *args)
|
||||
def EventLogValue(self, *args): return _chilkat.CkHttp_EventLogValue(self, *args)
|
||||
def eventLogValue(self, *args): return _chilkat.CkHttp_eventLogValue(self, *args)
|
||||
def SleepMs(self, *args): return _chilkat.CkHttp_SleepMs(self, *args)
|
||||
def get_ClientIpAddress(self, *args): return _chilkat.CkHttp_get_ClientIpAddress(self, *args)
|
||||
def clientIpAddress(self): return _chilkat.CkHttp_clientIpAddress(self)
|
||||
def put_ClientIpAddress(self, *args): return _chilkat.CkHttp_put_ClientIpAddress(self, *args)
|
||||
def get_ProxyAuthMethod(self, *args): return _chilkat.CkHttp_get_ProxyAuthMethod(self, *args)
|
||||
def proxyAuthMethod(self): return _chilkat.CkHttp_proxyAuthMethod(self)
|
||||
def put_ProxyAuthMethod(self, *args): return _chilkat.CkHttp_put_ProxyAuthMethod(self, *args)
|
||||
def AddQuickHeader(self, *args): return _chilkat.CkHttp_AddQuickHeader(self, *args)
|
||||
def RemoveQuickHeader(self, *args): return _chilkat.CkHttp_RemoveQuickHeader(self, *args)
|
||||
def SetSslClientCert(self, *args): return _chilkat.CkHttp_SetSslClientCert(self, *args)
|
||||
def get_LastHeader(self, *args): return _chilkat.CkHttp_get_LastHeader(self, *args)
|
||||
def lastHeader(self): return _chilkat.CkHttp_lastHeader(self)
|
||||
@@ -3210,6 +3319,10 @@ class CkHttpRequest(_object):
|
||||
def UsePostMultipartForm(self): return _chilkat.CkHttpRequest_UsePostMultipartForm(self)
|
||||
def GetUrlEncodedParams(self, *args): return _chilkat.CkHttpRequest_GetUrlEncodedParams(self, *args)
|
||||
def getUrlEncodedParams(self): return _chilkat.CkHttpRequest_getUrlEncodedParams(self)
|
||||
def AddStringForUpload(self, *args): return _chilkat.CkHttpRequest_AddStringForUpload(self, *args)
|
||||
def AddFileForUpload2(self, *args): return _chilkat.CkHttpRequest_AddFileForUpload2(self, *args)
|
||||
def AddStringForUpload2(self, *args): return _chilkat.CkHttpRequest_AddStringForUpload2(self, *args)
|
||||
def AddBytesForUpload2(self, *args): return _chilkat.CkHttpRequest_AddBytesForUpload2(self, *args)
|
||||
def path(self): return _chilkat.CkHttpRequest_path(self)
|
||||
def charset(self): return _chilkat.CkHttpRequest_charset(self)
|
||||
def httpVersion(self): return _chilkat.CkHttpRequest_httpVersion(self)
|
||||
@@ -3290,6 +3403,7 @@ class CkHttpResponse(_object):
|
||||
def get_Header(self, *args): return _chilkat.CkHttpResponse_get_Header(self, *args)
|
||||
def get_Body(self, *args): return _chilkat.CkHttpResponse_get_Body(self, *args)
|
||||
def get_BodyStr(self, *args): return _chilkat.CkHttpResponse_get_BodyStr(self, *args)
|
||||
def get_BodyQP(self, *args): return _chilkat.CkHttpResponse_get_BodyQP(self, *args)
|
||||
def get_StatusLine(self, *args): return _chilkat.CkHttpResponse_get_StatusLine(self, *args)
|
||||
def get_StatusCode(self): return _chilkat.CkHttpResponse_get_StatusCode(self)
|
||||
def get_Charset(self, *args): return _chilkat.CkHttpResponse_get_Charset(self, *args)
|
||||
@@ -3386,6 +3500,11 @@ class CkImap(_object):
|
||||
def put_HttpProxyHostname(self, *args): return _chilkat.CkImap_put_HttpProxyHostname(self, *args)
|
||||
def get_HttpProxyPort(self): return _chilkat.CkImap_get_HttpProxyPort(self)
|
||||
def put_HttpProxyPort(self, *args): return _chilkat.CkImap_put_HttpProxyPort(self, *args)
|
||||
def get_UidNext(self): return _chilkat.CkImap_get_UidNext(self)
|
||||
def get_AutoFix(self): return _chilkat.CkImap_get_AutoFix(self)
|
||||
def put_AutoFix(self, *args): return _chilkat.CkImap_put_AutoFix(self, *args)
|
||||
def AddPfxSourceData(self, *args): return _chilkat.CkImap_AddPfxSourceData(self, *args)
|
||||
def AddPfxSourceFile(self, *args): return _chilkat.CkImap_AddPfxSourceFile(self, *args)
|
||||
def Connect(self, *args): return _chilkat.CkImap_Connect(self, *args)
|
||||
def Disconnect(self): return _chilkat.CkImap_Disconnect(self)
|
||||
def IsConnected(self): return _chilkat.CkImap_IsConnected(self)
|
||||
@@ -3447,8 +3566,6 @@ class CkImap(_object):
|
||||
def GetMailNumAttach(self, *args): return _chilkat.CkImap_GetMailNumAttach(self, *args)
|
||||
def GetMailAttachSize(self, *args): return _chilkat.CkImap_GetMailAttachSize(self, *args)
|
||||
def GetMailAttachFilename(self, *args): return _chilkat.CkImap_GetMailAttachFilename(self, *args)
|
||||
def get_AutoUnwrapSecurity(self): return _chilkat.CkImap_get_AutoUnwrapSecurity(self)
|
||||
def put_AutoUnwrapSecurity(self, *args): return _chilkat.CkImap_put_AutoUnwrapSecurity(self, *args)
|
||||
def get_PeekMode(self): return _chilkat.CkImap_get_PeekMode(self)
|
||||
def put_PeekMode(self, *args): return _chilkat.CkImap_put_PeekMode(self, *args)
|
||||
def get_SessionLog(self, *args): return _chilkat.CkImap_get_SessionLog(self, *args)
|
||||
@@ -4557,6 +4674,12 @@ class CkSFtp(_object):
|
||||
def get_HttpProxyUsername(self, *args): return _chilkat.CkSFtp_get_HttpProxyUsername(self, *args)
|
||||
def httpProxyUsername(self): return _chilkat.CkSFtp_httpProxyUsername(self)
|
||||
def put_HttpProxyUsername(self, *args): return _chilkat.CkSFtp_put_HttpProxyUsername(self, *args)
|
||||
def get_TcpNoDelay(self): return _chilkat.CkSFtp_get_TcpNoDelay(self)
|
||||
def put_TcpNoDelay(self, *args): return _chilkat.CkSFtp_put_TcpNoDelay(self, *args)
|
||||
def get_AccumulateBuffer(self, *args): return _chilkat.CkSFtp_get_AccumulateBuffer(self, *args)
|
||||
def ClearAccumulateBuffer(self): return _chilkat.CkSFtp_ClearAccumulateBuffer(self)
|
||||
def AccumulateBytes(self, *args): return _chilkat.CkSFtp_AccumulateBytes(self, *args)
|
||||
def AuthenticatePwPk(self, *args): return _chilkat.CkSFtp_AuthenticatePwPk(self, *args)
|
||||
CkSFtp_swigregister = _chilkat.CkSFtp_swigregister
|
||||
CkSFtp_swigregister(CkSFtp)
|
||||
|
||||
@@ -4683,6 +4806,8 @@ class CkSsh(_object):
|
||||
def httpProxyUsername(self): return _chilkat.CkSsh_httpProxyUsername(self)
|
||||
def put_HttpProxyUsername(self, *args): return _chilkat.CkSsh_put_HttpProxyUsername(self, *args)
|
||||
def ChannelReceiveUntilMatchN(self, *args): return _chilkat.CkSsh_ChannelReceiveUntilMatchN(self, *args)
|
||||
def ChannelReadAndPoll2(self, *args): return _chilkat.CkSsh_ChannelReadAndPoll2(self, *args)
|
||||
def AuthenticatePwPk(self, *args): return _chilkat.CkSsh_AuthenticatePwPk(self, *args)
|
||||
def SaveLastError(self, *args): return _chilkat.CkSsh_SaveLastError(self, *args)
|
||||
def LastErrorXml(self, *args): return _chilkat.CkSsh_LastErrorXml(self, *args)
|
||||
def LastErrorHtml(self, *args): return _chilkat.CkSsh_LastErrorHtml(self, *args)
|
||||
@@ -5271,6 +5396,7 @@ class CkSshTunnel(_object):
|
||||
def put_SocksVersion(self, *args): return _chilkat.CkSshTunnel_put_SocksVersion(self, *args)
|
||||
def get_ConnectTimeoutMs(self): return _chilkat.CkSshTunnel_get_ConnectTimeoutMs(self)
|
||||
def put_ConnectTimeoutMs(self, *args): return _chilkat.CkSshTunnel_put_ConnectTimeoutMs(self, *args)
|
||||
def get_ListenPort(self): return _chilkat.CkSshTunnel_get_ListenPort(self)
|
||||
CkSshTunnel_swigregister = _chilkat.CkSshTunnel_swigregister
|
||||
CkSshTunnel_swigregister(CkSshTunnel)
|
||||
|
||||
@@ -5352,6 +5478,7 @@ class CkNtlm(_object):
|
||||
def get_ServerChallenge(self, *args): return _chilkat.CkNtlm_get_ServerChallenge(self, *args)
|
||||
def serverChallenge(self): return _chilkat.CkNtlm_serverChallenge(self)
|
||||
def put_ServerChallenge(self, *args): return _chilkat.CkNtlm_put_ServerChallenge(self, *args)
|
||||
def LoadType3(self, *args): return _chilkat.CkNtlm_LoadType3(self, *args)
|
||||
CkNtlm_swigregister = _chilkat.CkNtlm_swigregister
|
||||
CkNtlm_swigregister(CkNtlm)
|
||||
|
||||
@@ -5415,6 +5542,8 @@ class CkDkim(_object):
|
||||
def NumDomainKeySignatures(self, *args): return _chilkat.CkDkim_NumDomainKeySignatures(self, *args)
|
||||
def AddDkimSignature(self, *args): return _chilkat.CkDkim_AddDkimSignature(self, *args)
|
||||
def AddDomainKeySignature(self, *args): return _chilkat.CkDkim_AddDomainKeySignature(self, *args)
|
||||
def LoadDkimPkBytes(self, *args): return _chilkat.CkDkim_LoadDkimPkBytes(self, *args)
|
||||
def LoadDomainKeyPkBytes(self, *args): return _chilkat.CkDkim_LoadDomainKeyPkBytes(self, *args)
|
||||
def SaveLastError(self, *args): return _chilkat.CkDkim_SaveLastError(self, *args)
|
||||
def LastErrorXml(self, *args): return _chilkat.CkDkim_LastErrorXml(self, *args)
|
||||
def LastErrorHtml(self, *args): return _chilkat.CkDkim_LastErrorHtml(self, *args)
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# This package defines dialog boxes used by the main
|
||||
|
||||
# This module is part of the spambayes project, which is Copyright 2003
|
||||
# The Python Software Foundation and is covered by the Python Software
|
||||
# Foundation license.
|
||||
import os, sys, stat
|
||||
#import dialog_map
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,10 @@
|
||||
# A core, data-driven dialog.
|
||||
# Driven completely by "Control Processor" objects.
|
||||
|
||||
# This module is part of the spambayes project, which is Copyright 2003
|
||||
# The Python Software Foundation and is covered by the Python Software
|
||||
# Foundation license.
|
||||
|
||||
import win32gui, win32api, win32con
|
||||
import commctrl
|
||||
import struct, array
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Generic utilities for dialog functions.
|
||||
|
||||
# This module is part of the spambayes project, which is Copyright 2003
|
||||
# The Python Software Foundation and is covered by the Python Software
|
||||
# Foundation license.
|
||||
|
||||
def MAKELONG(l,h):
|
||||
return ((h & 0xFFFF) << 16) | (l & 0xFFFF)
|
||||
|
||||
|
||||
@@ -2,18 +2,39 @@
|
||||
# These are extensions to basic Control Processors that are linked with
|
||||
# Outlook-Plugin options.
|
||||
|
||||
# This module is part of the spambayes project, which is Copyright 2003
|
||||
# The Python Software Foundation and is covered by the Python Software
|
||||
# Foundation license.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import win32gui, win32api, win32con, win32ui
|
||||
import commctrl
|
||||
import struct, array
|
||||
from dlgutils import *
|
||||
import xmlrpclib
|
||||
|
||||
import processors
|
||||
|
||||
verbose = 0 # set to 1 to see option values fetched and set.
|
||||
|
||||
# A ControlProcessor that is linked up with options. These get a bit smarter.
|
||||
|
||||
class OptionControlProcessor(processors.ControlProcessor):
|
||||
def __init__(self, window, control_ids):
|
||||
processors.ControlProcessor.__init__(self, window, control_ids)
|
||||
@@ -204,8 +225,8 @@ class CSComboProcessor(ComboProcessor):
|
||||
try:
|
||||
list=['CRM Lead']#, 'CRM Helpdesk', 'CRM Lead', 'CRM Meeting', 'CRM Opportunity', 'CRM Phonecall']
|
||||
objlist = conn.GetAllObjects()
|
||||
if 'crm.claim' in objlist:
|
||||
list.append('CRM Claim')
|
||||
# if 'crm.claim' in objlist:
|
||||
# list.append('CRM Claim')
|
||||
if 'crm.helpdesk' in objlist:
|
||||
list.append('CRM Helpdesk')
|
||||
if 'crm.fundraising' in objlist:
|
||||
@@ -284,4 +305,4 @@ class GroupProcessor(OptionControlProcessor):
|
||||
def UpdateControl_FromValue(self):
|
||||
pass
|
||||
def UpdateValue_FromControl(self):
|
||||
pass
|
||||
pass
|
||||
@@ -1,5 +1,30 @@
|
||||
# Control Processors for our dialog.
|
||||
|
||||
# This module is part of the spambayes project, which is Copyright 2003
|
||||
# The Python Software Foundation and is covered by the Python Software
|
||||
# Foundation license.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import win32gui, win32api, win32con
|
||||
import commctrl
|
||||
import struct, array
|
||||
@@ -87,21 +112,6 @@ class RadioButtonProcessor(ControlProcessor):
|
||||
conn.setitem('protocol', text)
|
||||
p=conn.getitem('protocol')
|
||||
|
||||
# def OnCommand(self, wparam, lparam):
|
||||
# win32ui.MessageBox("clicked===",'')
|
||||
# code = win32api.HIWORD(wparam)
|
||||
# id = win32api.LOWORD(wparam)
|
||||
# win32ui.MessageBox("clicked===",'')
|
||||
# if code == win32con.BN_CLICKED:
|
||||
# win32ui.MessageBox("clicked===",'')
|
||||
# import win32ui
|
||||
# conn = self.func()
|
||||
# win32ui.MessageBox("clicked===",'')
|
||||
# text=win32gui.GetDlgItemText(self.window.hwnd, self.control_id)
|
||||
# win32ui.MessageBox("clicked===",'')
|
||||
# conn.setitem('protocol', text)
|
||||
# win32ui.MessageBox("clicked==="+text,'')
|
||||
|
||||
class CloseButtonProcessor(ButtonProcessor):
|
||||
def OnClicked(self, id):
|
||||
win32gui.EndDialog(self.window.hwnd, id)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# This module is part of the spambayes project, which is Copyright 2003
|
||||
# The Python Software Foundation and is covered by the Python Software
|
||||
# Foundation license.
|
||||
|
||||
# Package that manages and defines dialog resources
|
||||
|
||||
def GetImageParamsFromBitmapID(rc_parser, bmpid):
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,7 +33,7 @@ STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME
|
||||
CAPTION "OpenERP Configuarion"
|
||||
FONT 8, "Tahoma", 1000, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Cancel",ID_DONE,400,239,50,14//,WS_VISIBLE //| WS_TABSTOP
|
||||
DEFPUSHBUTTON "Close",ID_DONE,400,239,50,14//,WS_VISIBLE //| WS_TABSTOP
|
||||
CONTROL "",IDC_TAB,"SysTabControl32",0x0,8,7,440,228
|
||||
CONTROL "",IDC_LIST,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL |
|
||||
LVS_SHOWSELALWAYS | LVS_REPORT | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES,0,0,0,0
|
||||
@@ -86,9 +86,9 @@ EXSTYLE WS_EX_CONTEXTHELP
|
||||
CAPTION "About"
|
||||
FONT 8, "Tahoma", 400, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "About OpenERP Outlook Plugin",IDC_STATIC,7,3,422,200
|
||||
GROUPBOX "About Plugin",IDC_STATIC,7,3,422,200
|
||||
CONTROL 1062,IDB_OPENERPLOGO,"Static",SS_BITMAP | SS_REALSIZEIMAGE,60,30,20,20
|
||||
LTEXT "",IDC_ABOUT,80,90,250,100
|
||||
LTEXT "",IDC_ABOUT,80,90,300,100
|
||||
END
|
||||
|
||||
IDD_SERVER_PORT_DIALOG DIALOGEX 0, 0, 160, 55
|
||||
@@ -108,7 +108,7 @@ END
|
||||
IDD_SYNC DIALOGEX 0, 0, 470, 320
|
||||
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_CONTEXTHELP
|
||||
CAPTION "Archive to OpenERP"
|
||||
CAPTION "Push to OpenERP"
|
||||
FONT 8, "Tahoma", 1000, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX " Link to an Existing Documents ", IDC_STATIC_GROUP, 8,5,250,290,WS_TABSTOP
|
||||
@@ -117,7 +117,7 @@ BEGIN
|
||||
PUSHBUTTON "Search",ID_SEARCH,187,15,40,14,WS_TABSTOP
|
||||
LTEXT "Documents : ",IDC_STATIC,15,140,100,14
|
||||
CONTROL "List1",IDC_NAME_LIST,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | LVS_SHOWSELALWAYS | LVS_REPORT | WS_TABSTOP, 15,150,234,110
|
||||
PUSHBUTTON "Archive to OpenERP",ID_MAKE_ATTACHMENT,160,270,85,14,WS_TABSTOP
|
||||
PUSHBUTTON "Push",ID_MAKE_ATTACHMENT,160,270,85,14,WS_TABSTOP
|
||||
|
||||
GROUPBOX " Create a Document ", IDC_STATIC_GROUP, 263,5,202,100,WS_TABSTOP
|
||||
LTEXT "Type of Document : ",IDC_STATIC,266,25,100,12
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
#!/usr/bin/python
|
||||
#-*- encoding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import chilkat
|
||||
import os
|
||||
@@ -10,31 +33,20 @@ def generateEML(mail):
|
||||
body = mail.Body.encode("utf-8")
|
||||
recipients = mail.Recipients
|
||||
sender_email = mail.SenderEmailAddress
|
||||
sender_name = mail.SenderName
|
||||
sender_name = mail.SenderEmailAddress
|
||||
attachments=mail.Attachments
|
||||
# to = mail.To
|
||||
# cc = mail.CC
|
||||
# rec_date = mail.ReceivedTime
|
||||
|
||||
email = chilkat.CkEmail()
|
||||
email.put_Subject (ustr(sub).encode('iso-8859-1'))
|
||||
email.put_Body (ustr(body).encode('utf-8'))
|
||||
email.put_FromAddress (ustr(sender_email).encode('iso-8859-1'))
|
||||
email.put_From (ustr(sender_name).encode('iso-8859-1'))
|
||||
email.put_From (ustr(sender_email).encode('iso-8859-1'))
|
||||
|
||||
for i in xrange(1, recipients.Count+1):
|
||||
name = ustr(recipients.Item(i).Name).encode('iso-8859-1')
|
||||
address = ustr(recipients.Item(i).Address).encode('iso-8859-1')
|
||||
email.AddTo(name,address)
|
||||
|
||||
# email.AddMultipleTo(to)
|
||||
# email.AddMultipleCC(cc)
|
||||
# win32ui.MessageBox("cccc---"+str(dir(cc)),'')
|
||||
# for i in xrange(1, cc.Count+1):
|
||||
# name = ustr(recipients.Item(i).Name).encode('iso-8859-1')
|
||||
# address = ustr(recipients.Item(i).Address).encode('iso-8859-1')
|
||||
# email.AddCC(name,address)
|
||||
|
||||
eml_name= ustr(sub).encode('iso-8859-1')+'-'+str(mail.EntryID)[-9:]
|
||||
ls = ['*', '/', '\\', '<', '>', ':', '?', '"', '|', '\t', '\n']
|
||||
mails_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\mails\\")
|
||||
@@ -79,5 +91,4 @@ def generateEML(mail):
|
||||
sys.exit()
|
||||
|
||||
print "Saved EML!",eml_path
|
||||
return eml_path
|
||||
|
||||
return eml_path
|
||||
@@ -1,3 +1,28 @@
|
||||
# This module is part of the spambayes project, which is Copyright 2003
|
||||
# The Python Software Foundation and is covered by the Python Software
|
||||
# Foundation license.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import win32api, win32con
|
||||
@@ -83,6 +108,7 @@ class OpenERPManager:
|
||||
('Account Invoices','account.invoice',''), ('Accounts','account.account',''), \
|
||||
('Projects', 'project.project',''),('Sale Orders','sale.order',''), \
|
||||
('Project Tasks','project.task',''), ('Products', 'product.product', '')]
|
||||
|
||||
self.config=self.LoadConfig()
|
||||
|
||||
def WorkerThreadStarting(self):
|
||||
|
||||
@@ -1,376 +1,389 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import xmlrpclib
|
||||
import sys
|
||||
import socket
|
||||
import os
|
||||
import pythoncom
|
||||
import time
|
||||
from manager import ustr
|
||||
|
||||
import smtplib
|
||||
from email.mime.text import MIMEText
|
||||
from email.parser import*
|
||||
import email
|
||||
|
||||
waittime = 10
|
||||
wait_count = 0
|
||||
wait_limit = 12
|
||||
import binascii
|
||||
import base64
|
||||
def execute(connector, method, *args):
|
||||
global wait_count
|
||||
res = False
|
||||
try:
|
||||
res = getattr(connector,method)(*args)
|
||||
except socket.error,e:
|
||||
if e.args[0] == 111:
|
||||
if wait_count > wait_limit:
|
||||
print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit)
|
||||
clean()
|
||||
sys.exit(1)
|
||||
print 'Please wait %d sec to start server....'%(waittime)
|
||||
wait_count += 1
|
||||
time.sleep(waittime)
|
||||
res = execute(connector, method, *args)
|
||||
else:
|
||||
return res
|
||||
wait_count = 0
|
||||
return res
|
||||
|
||||
class XMLRpcConn(object):
|
||||
__name__ = 'XMLRpcConn'
|
||||
_com_interfaces_ = ['_IDTExtensibility2']
|
||||
_public_methods_ = ['GetDBList', 'login', 'GetAllObjects', 'GetObjList', 'InsertObj', 'DeleteObject', \
|
||||
'ArchiveToOpenERP', 'IsCRMInstalled', 'GetPartners', 'GetObjectItems', \
|
||||
'CreateCase', 'MakeAttachment', 'CreateContact', 'CreatePartner', 'getitem', 'setitem', \
|
||||
'SearchPartnerDetail', 'WritePartnerValues', 'GetAllState', 'GetAllCountry' ]
|
||||
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
|
||||
_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'):
|
||||
self._server=server
|
||||
self._port=port
|
||||
self._uri=uri
|
||||
self._obj_list=[]
|
||||
self._dbname=''
|
||||
self._uname='admin'
|
||||
self._pwd='a'
|
||||
self._login=False
|
||||
self._running=False
|
||||
self._uid=False
|
||||
self._iscrm=True
|
||||
self.partner_id_list=None
|
||||
self.protocol=None
|
||||
def getitem(self, attrib):
|
||||
v=self.__getattribute__(attrib)
|
||||
return str(v)
|
||||
|
||||
def setitem(self, attrib, value):
|
||||
return self.__setattr__(attrib, value)
|
||||
|
||||
def GetDBList(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/db')
|
||||
try:
|
||||
db_list = execute(conn, 'list')
|
||||
if db_list == False:
|
||||
self._running=False
|
||||
return []
|
||||
else:
|
||||
self._running=True
|
||||
except:
|
||||
db_list=-1
|
||||
self._running=True
|
||||
return db_list
|
||||
|
||||
def login(self,dbname, user, pwd):
|
||||
self._dbname = dbname
|
||||
self._uname = user
|
||||
self._pwd = pwd
|
||||
conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common')
|
||||
uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))
|
||||
return uid
|
||||
|
||||
def GetAllObjects(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[])
|
||||
objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',ids,['model'])
|
||||
obj_list = [item['model'] for item in objects]
|
||||
return obj_list
|
||||
|
||||
def GetObjList(self):
|
||||
self._obj_list=list(self._obj_list)
|
||||
self._obj_list.sort(reverse=True)
|
||||
return self._obj_list
|
||||
|
||||
def InsertObj(self, obj_title,obj_name,image_path):
|
||||
self._obj_list=list(self._obj_list)
|
||||
self._obj_list.append((obj_title,obj_name,ustr(image_path)))
|
||||
self._obj_list.sort(reverse=True)
|
||||
|
||||
def DeleteObject(self,sel_text):
|
||||
self._obj_list=list(self._obj_list)
|
||||
for obj in self._obj_list:
|
||||
if obj[0] == sel_text:
|
||||
self._obj_list.remove(obj)
|
||||
break
|
||||
|
||||
def ArchiveToOpenERP(self, recs, mail):
|
||||
import win32ui, win32con
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object')
|
||||
import eml
|
||||
new_msg = files = ext_msg =""
|
||||
eml_path=eml.generateEML(mail)
|
||||
att_name = ustr(eml_path.split('\\')[-1])
|
||||
flag=False
|
||||
attachments=mail.Attachments
|
||||
|
||||
try:
|
||||
fp = open(eml_path, 'rb')
|
||||
msg =fp.read()
|
||||
fp.close()
|
||||
new_mail = email.message_from_string(str(msg))
|
||||
except Exception,e:
|
||||
win32ui.MessageBox(str(e),"Reading Error Mail")
|
||||
|
||||
for rec in recs: #[('res.partner', 3, 'Agrolait')]
|
||||
model = rec[0]
|
||||
res_id = rec[1]
|
||||
object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',model)])
|
||||
object_name = execute( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',object_ids,['name'])[0]['name']
|
||||
|
||||
#Reading the Object ir.model Name
|
||||
|
||||
ext_ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'mailgate.message','search',[('message_id','=',mail.EntryID),('model','=',model),('res_id','=',res_id)])
|
||||
if ext_ids:
|
||||
name = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,model,'read',res_id,['name'])['name']
|
||||
ext_msg += """This mail is already archived to {1} '{2}'.
|
||||
""".format(object_name,name)
|
||||
continue
|
||||
|
||||
msg = {
|
||||
'subject':mail.Subject,
|
||||
'date':str(mail.ReceivedTime),
|
||||
'body':mail.Body,
|
||||
'cc':mail.CC,
|
||||
'from':mail.SenderEmailAddress,
|
||||
'to':mail.To,
|
||||
'message-id':str(new_mail.get('Message-Id')),
|
||||
'references':str(new_mail.get('References')),
|
||||
}
|
||||
result = {}
|
||||
if attachments:
|
||||
result = self.MakeAttachment([rec], mail)
|
||||
|
||||
attachment_ids = result.get(model, {}).get(res_id, [])
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','history',model, res_id, msg, attachment_ids)
|
||||
|
||||
new_msg += """- {0} : {1}\n""".format(object_name,str(rec[2]))
|
||||
flag = True
|
||||
|
||||
if flag:
|
||||
t = ext_msg
|
||||
t += """Mail archived Successfully with attachments.\n"""+new_msg
|
||||
win32ui.MessageBox(t,"Archived to OpenERP",win32con.MB_ICONINFORMATION)
|
||||
return flag
|
||||
|
||||
def IsCRMInstalled(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','crm.lead')])
|
||||
return id
|
||||
|
||||
def GetPartners(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids=[]
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[])
|
||||
ids.sort()
|
||||
obj_list=[]
|
||||
obj_list.append((-999, ustr('')))
|
||||
for id in ids:
|
||||
object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','read',[id],['id','name'])[0]
|
||||
obj_list.append((object['id'], ustr(object['name'])))
|
||||
return obj_list
|
||||
|
||||
def GetObjectItems(self, search_list=[], search_text=''):
|
||||
import win32ui
|
||||
res = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
for obj in search_list:
|
||||
object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',obj)])
|
||||
object_name = execute( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',object_ids,['name'])[0]['name']
|
||||
if obj == "res.partner.address":
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',['|',('name','ilike',ustr(search_text)),('email','ilike',ustr(search_text))])
|
||||
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name','street','city'])
|
||||
for rec in recs:
|
||||
name = ustr(rec['name'])
|
||||
if rec['street']:
|
||||
name += ', ' + ustr(rec['street'])
|
||||
if rec['city']:
|
||||
name += ', ' + ustr(rec['city'])
|
||||
res.append((obj,rec['id'],name,object_name))
|
||||
else:
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',[('name','ilike',ustr(search_text))])
|
||||
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name'])
|
||||
for rec in recs:
|
||||
name = ustr(rec['name'])
|
||||
res.append((obj,rec['id'],name,object_name))
|
||||
return res
|
||||
|
||||
def CreateCase(self, section, mail, partner_ids, with_attachments=True):
|
||||
res={}
|
||||
import win32ui
|
||||
import eml
|
||||
section=str(section)
|
||||
partner_ids=eval(str(partner_ids))
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
try:
|
||||
eml_path=eml.generateEML(mail)
|
||||
fp = open(eml_path, 'rb')
|
||||
msg =fp.read()
|
||||
fp.close()
|
||||
new_mail = email.message_from_string(str(msg))
|
||||
except Exception,e:
|
||||
win32ui.MessageBox(str(e),"Mail Reading Error")
|
||||
execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','process_email',section, str(new_mail))
|
||||
|
||||
def MakeAttachment(self, recs, mail):
|
||||
attachments = mail.Attachments
|
||||
result = {}
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
att_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\mails\\attachments\\")
|
||||
if not os.path.exists(att_folder_path):
|
||||
os.makedirs(att_folder_path)
|
||||
for rec in recs: #[('res.partner', 3, 'Agrolait')]
|
||||
|
||||
obj = rec[0]
|
||||
obj_id = rec[1]
|
||||
res={}
|
||||
res['res_model'] = obj
|
||||
attachment_ids = []
|
||||
if obj not in result:
|
||||
result[obj] = {}
|
||||
for i in xrange(1, attachments.Count+1):
|
||||
fn = ustr(attachments[i].FileName)
|
||||
if len(fn) > 64:
|
||||
l = 64 - len(fn)
|
||||
f = fn.split('.')
|
||||
fn = f[0][0:l] + '.' + f[-1]
|
||||
att_path = os.path.join(att_folder_path,fn)
|
||||
attachments[i].SaveAsFile(att_path)
|
||||
f=open(att_path,"rb")
|
||||
content = "".join(f.readlines()).encode('base64')
|
||||
f.close()
|
||||
res['name'] = ustr(attachments[i].DisplayName)
|
||||
res['datas_fname'] = ustr(fn)
|
||||
res['datas'] = content
|
||||
res['res_id'] = obj_id
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.attachment','create',res)
|
||||
attachment_ids.append(id)
|
||||
result[obj].update({obj_id: attachment_ids})
|
||||
return result
|
||||
|
||||
def CreateContact(self, sel=None, res=None):
|
||||
res=eval(str(res))
|
||||
|
||||
self.partner_id_list=eval(str(self.partner_id_list))
|
||||
if self.partner_id_list.get(sel,-999) != -999:
|
||||
res['partner_id'] = self.partner_id_list[sel]
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner.address','create',res)
|
||||
return id
|
||||
|
||||
def CreatePartner(self, res):
|
||||
res=eval(str(res))
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','=',res['name'])])
|
||||
if ids:
|
||||
return False
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','create',res)
|
||||
return id
|
||||
|
||||
def SearchPartnerDetail(self, search_email_id):
|
||||
import win32ui
|
||||
res_vals = []
|
||||
address = {}
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
address_id = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','ilike',ustr(search_email_id))])
|
||||
if not address_id :
|
||||
return
|
||||
address = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','name','street','street2','city','state_id','country_id','phone','mobile','email','fax','zip'])
|
||||
for key, vals in address.items():
|
||||
res_vals.append([key,vals])
|
||||
return res_vals
|
||||
|
||||
def WritePartnerValues(self, new_vals):
|
||||
import win32ui
|
||||
flag = -1
|
||||
new_dict = dict(new_vals)
|
||||
email=new_dict['email']
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
address_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(email))])
|
||||
if not address_id:
|
||||
return flag
|
||||
address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','state_id','country_id'])
|
||||
vals_res_address={ 'name' : new_dict['name'],
|
||||
'street':new_dict['street'],
|
||||
'street2' : new_dict['street2'],
|
||||
'city' : new_dict['city'],
|
||||
'phone' : new_dict['phone'],
|
||||
'mobile' : new_dict['mobile'],
|
||||
'fax' : new_dict['fax'],
|
||||
'zip' : new_dict['zip'],
|
||||
}
|
||||
if new_dict['partner_id'] != -1:
|
||||
vals_res_address['partner_id'] = new_dict['partner_id']
|
||||
if new_dict['state_id'] != -1:
|
||||
vals_res_address['state_id'] = new_dict['state_id']
|
||||
if new_dict['country_id'] != -1:
|
||||
vals_res_address['country_id'] = new_dict['country_id']
|
||||
temp = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'write', address_id, vals_res_address)
|
||||
if temp:
|
||||
flag=1
|
||||
else:
|
||||
flag=0
|
||||
return flag
|
||||
|
||||
def GetAllState(self):
|
||||
import win32ui
|
||||
state_list = []
|
||||
state_ids = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
state_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', [])
|
||||
for state_id in state_ids:
|
||||
obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'read', [state_id],['id','name'])[0]
|
||||
state_list.append((obj['id'], ustr(obj['name'])))
|
||||
return state_list
|
||||
|
||||
def GetAllCountry(self):
|
||||
import win32ui
|
||||
country_list = []
|
||||
country_ids = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
country_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', [])
|
||||
for country_id in country_ids:
|
||||
obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country','read', [country_id], ['id','name'])[0]
|
||||
country_list.append((obj['id'], ustr(obj['name'])))
|
||||
return country_list
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import xmlrpclib
|
||||
import sys
|
||||
import socket
|
||||
import os
|
||||
import pythoncom
|
||||
import time
|
||||
from manager import ustr
|
||||
import email
|
||||
|
||||
waittime = 10
|
||||
wait_count = 0
|
||||
wait_limit = 12
|
||||
|
||||
def execute(connector, method, *args):
|
||||
global wait_count
|
||||
res = False
|
||||
try:
|
||||
res = getattr(connector,method)(*args)
|
||||
except socket.error,e:
|
||||
if e.args[0] == 111:
|
||||
if wait_count > wait_limit:
|
||||
print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit)
|
||||
clean()
|
||||
sys.exit(1)
|
||||
print 'Please wait %d sec to start server....'%(waittime)
|
||||
wait_count += 1
|
||||
time.sleep(waittime)
|
||||
res = execute(connector, method, *args)
|
||||
else:
|
||||
return res
|
||||
wait_count = 0
|
||||
return res
|
||||
|
||||
class XMLRpcConn(object):
|
||||
__name__ = 'XMLRpcConn'
|
||||
_com_interfaces_ = ['_IDTExtensibility2']
|
||||
_public_methods_ = ['GetDBList', 'login', 'GetAllObjects', 'GetObjList', 'InsertObj', 'DeleteObject', 'GetCSList', \
|
||||
'ArchiveToOpenERP', 'IsCRMInstalled', 'GetPartners', 'GetObjectItems', \
|
||||
'CreateCase', 'MakeAttachment', 'CreateContact', 'CreatePartner', 'getitem', 'setitem', \
|
||||
'SearchPartnerDetail', 'WritePartnerValues', 'GetAllState', 'GetAllCountry' ]
|
||||
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
|
||||
_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'):
|
||||
self._server=server
|
||||
self._port=port
|
||||
self._uri=uri
|
||||
self._obj_list=[]
|
||||
self._dbname=''
|
||||
self._uname='admin'
|
||||
self._pwd='a'
|
||||
self._login=False
|
||||
self._running=False
|
||||
self._uid=False
|
||||
self._iscrm=True
|
||||
self.partner_id_list=None
|
||||
self.protocol=None
|
||||
|
||||
def getitem(self, attrib):
|
||||
v=self.__getattribute__(attrib)
|
||||
return str(v)
|
||||
|
||||
def setitem(self, attrib, value):
|
||||
return self.__setattr__(attrib, value)
|
||||
|
||||
def GetDBList(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/db')
|
||||
try:
|
||||
db_list = execute(conn, 'list')
|
||||
if db_list == False:
|
||||
self._running=False
|
||||
return []
|
||||
else:
|
||||
self._running=True
|
||||
except:
|
||||
db_list=-1
|
||||
self._running=True
|
||||
return db_list
|
||||
|
||||
def login(self,dbname, user, pwd):
|
||||
self._dbname = dbname
|
||||
self._uname = user
|
||||
self._pwd = pwd
|
||||
conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common')
|
||||
uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))
|
||||
return uid
|
||||
|
||||
def GetAllObjects(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[])
|
||||
objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',ids,['model'])
|
||||
obj_list = [item['model'] for item in objects]
|
||||
return obj_list
|
||||
|
||||
def GetObjList(self):
|
||||
self._obj_list=list(self._obj_list)
|
||||
self._obj_list.sort(reverse=True)
|
||||
return self._obj_list
|
||||
|
||||
def InsertObj(self, obj_title,obj_name,image_path):
|
||||
self._obj_list=list(self._obj_list)
|
||||
self._obj_list.append((obj_title,obj_name,ustr(image_path)))
|
||||
self._obj_list.sort(reverse=True)
|
||||
|
||||
def DeleteObject(self,sel_text):
|
||||
self._obj_list=list(self._obj_list)
|
||||
for obj in self._obj_list:
|
||||
if obj[0] == sel_text:
|
||||
self._obj_list.remove(obj)
|
||||
break
|
||||
|
||||
def ArchiveToOpenERP(self, recs, mail):
|
||||
import win32ui, win32con
|
||||
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object')
|
||||
import eml
|
||||
new_msg = files = ext_msg =""
|
||||
eml_path=eml.generateEML(mail)
|
||||
att_name = ustr(eml_path.split('\\')[-1])
|
||||
flag=False
|
||||
attachments=mail.Attachments
|
||||
|
||||
try:
|
||||
fp = open(eml_path, 'rb')
|
||||
msg =fp.read()
|
||||
fp.close()
|
||||
new_mail = email.message_from_string(str(msg))
|
||||
except Exception,e:
|
||||
win32ui.MessageBox(str(e),"Reading Error Mail")
|
||||
|
||||
for rec in recs: #[('res.partner', 3, 'Agrolait')]
|
||||
model = rec[0]
|
||||
res_id = rec[1]
|
||||
|
||||
#Check if mailgate installed
|
||||
object_id = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','mailgate.message')])
|
||||
if not object_id:
|
||||
win32ui.MessageBox("Mailgate is not installed on your configured database '%s' !!\n\nPlease install it to archive the mail."%(self._dbname),"Mailgate not installed",win32con.MB_ICONERROR)
|
||||
return
|
||||
|
||||
object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',model)])
|
||||
object_name = execute( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',object_ids,['name'])[0]['name']
|
||||
|
||||
#Reading the Object ir.model Name
|
||||
|
||||
ext_ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'mailgate.message','search',[('message_id','=',mail.EntryID),('model','=',model),('res_id','=',res_id)])
|
||||
if ext_ids:
|
||||
name = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,model,'read',res_id,['name'])['name']
|
||||
ext_msg += """This mail is already archived to {1} '{2}'.
|
||||
""".format(object_name,name)
|
||||
continue
|
||||
|
||||
msg = {
|
||||
'subject':mail.Subject,
|
||||
'date':str(mail.ReceivedTime),
|
||||
'body':mail.Body,
|
||||
'cc':mail.CC,
|
||||
'from':mail.SenderEmailAddress,
|
||||
'to':mail.To,
|
||||
'message-id':str(new_mail.get('Message-Id')),
|
||||
'references':str(new_mail.get('References')),
|
||||
}
|
||||
result = {}
|
||||
if attachments:
|
||||
result = self.MakeAttachment([rec], mail)
|
||||
|
||||
attachment_ids = result.get(model, {}).get(res_id, [])
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','history',model, res_id, msg, attachment_ids)
|
||||
|
||||
new_msg += """- {0} : {1}\n""".format(object_name,str(rec[2]))
|
||||
flag = True
|
||||
|
||||
if flag:
|
||||
t = ext_msg
|
||||
t += """Mail archived Successfully with attachments.\n"""+new_msg
|
||||
win32ui.MessageBox(t,"Archived to OpenERP",win32con.MB_ICONINFORMATION)
|
||||
return flag
|
||||
|
||||
def IsCRMInstalled(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','crm.lead')])
|
||||
return id
|
||||
|
||||
def GetCSList(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(int(self._uid)),self._pwd,'crm.case.section','search',[])
|
||||
objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'crm.case.section','read',ids,['name'])
|
||||
obj_list = [ustr(item['name']).encode('iso-8859-1') for item in objects]
|
||||
return obj_list
|
||||
|
||||
def GetPartners(self):
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids=[]
|
||||
obj_list=[]
|
||||
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[])
|
||||
if ids:
|
||||
ids.sort()
|
||||
obj_list.append((-999, ustr('')))
|
||||
for id in ids:
|
||||
object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','read',[id],['id','name'])[0]
|
||||
obj_list.append((object['id'], ustr(object['name'])))
|
||||
obj_list.sort(lambda x, y: cmp(x[1],y[1]))
|
||||
return obj_list
|
||||
|
||||
def GetObjectItems(self, search_list=[], search_text=''):
|
||||
import win32ui
|
||||
res = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
for obj in search_list:
|
||||
object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',obj)])
|
||||
object_name = execute( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',object_ids,['name'])[0]['name']
|
||||
if obj == "res.partner.address":
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',['|',('name','ilike',ustr(search_text)),('email','ilike',ustr(search_text))])
|
||||
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name','street','city'])
|
||||
for rec in recs:
|
||||
name = ustr(rec['name'])
|
||||
if rec['street']:
|
||||
name += ', ' + ustr(rec['street'])
|
||||
if rec['city']:
|
||||
name += ', ' + ustr(rec['city'])
|
||||
res.append((obj,rec['id'],name,object_name))
|
||||
else:
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',[('name','ilike',ustr(search_text))])
|
||||
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name'])
|
||||
for rec in recs:
|
||||
name = ustr(rec['name'])
|
||||
res.append((obj,rec['id'],name,object_name))
|
||||
return res
|
||||
|
||||
def CreateCase(self, section, mail, partner_ids, with_attachments=True):
|
||||
res={}
|
||||
import win32ui
|
||||
import eml
|
||||
section=str(section)
|
||||
partner_ids=eval(str(partner_ids))
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
try:
|
||||
eml_path=eml.generateEML(mail)
|
||||
fp = open(eml_path, 'rb')
|
||||
msg =fp.read()
|
||||
fp.close()
|
||||
new_mail = email.message_from_string(str(msg))
|
||||
except Exception,e:
|
||||
win32ui.MessageBox(str(e),"Mail Reading Error")
|
||||
execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'email.server.tools','process_email',section, str(new_mail))
|
||||
|
||||
def MakeAttachment(self, recs, mail):
|
||||
attachments = mail.Attachments
|
||||
result = {}
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
att_folder_path = os.path.abspath(os.path.dirname(__file__)+"\\dialogs\\resources\\mails\\attachments\\")
|
||||
if not os.path.exists(att_folder_path):
|
||||
os.makedirs(att_folder_path)
|
||||
for rec in recs: #[('res.partner', 3, 'Agrolait')]
|
||||
|
||||
obj = rec[0]
|
||||
obj_id = rec[1]
|
||||
res={}
|
||||
res['res_model'] = obj
|
||||
attachment_ids = []
|
||||
if obj not in result:
|
||||
result[obj] = {}
|
||||
for i in xrange(1, attachments.Count+1):
|
||||
fn = ustr(attachments[i].FileName)
|
||||
if len(fn) > 64:
|
||||
l = 64 - len(fn)
|
||||
f = fn.split('.')
|
||||
fn = f[0][0:l] + '.' + f[-1]
|
||||
att_path = os.path.join(att_folder_path,fn)
|
||||
attachments[i].SaveAsFile(att_path)
|
||||
f=open(att_path,"rb")
|
||||
content = "".join(f.readlines()).encode('base64')
|
||||
f.close()
|
||||
res['name'] = ustr(attachments[i].DisplayName)
|
||||
res['datas_fname'] = ustr(fn)
|
||||
res['datas'] = content
|
||||
res['res_id'] = obj_id
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.attachment','create',res)
|
||||
attachment_ids.append(id)
|
||||
result[obj].update({obj_id: attachment_ids})
|
||||
return result
|
||||
|
||||
def CreateContact(self, sel=None, res=None):
|
||||
res=eval(str(res))
|
||||
|
||||
self.partner_id_list=eval(str(self.partner_id_list))
|
||||
if self.partner_id_list.get(sel,-999) != -999:
|
||||
res['partner_id'] = self.partner_id_list[sel]
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner.address','create',res)
|
||||
return id
|
||||
|
||||
def CreatePartner(self, res):
|
||||
res=eval(str(res))
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','=',res['name'])])
|
||||
if ids:
|
||||
return False
|
||||
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','create',res)
|
||||
return id
|
||||
|
||||
def SearchPartnerDetail(self, search_email_id):
|
||||
import win32ui
|
||||
res_vals = []
|
||||
address = {}
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
address_id = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','ilike',ustr(search_email_id))])
|
||||
if not address_id :
|
||||
return
|
||||
address = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','name','street','street2','city','state_id','country_id','phone','mobile','email','fax','zip'])
|
||||
for key, vals in address.items():
|
||||
res_vals.append([key,vals])
|
||||
return res_vals
|
||||
|
||||
def WritePartnerValues(self, new_vals):
|
||||
import win32ui
|
||||
flag = -1
|
||||
new_dict = dict(new_vals)
|
||||
email=new_dict['email']
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
address_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(email))])
|
||||
if not address_id:
|
||||
return flag
|
||||
address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','state_id','country_id'])
|
||||
vals_res_address={ 'name' : new_dict['name'],
|
||||
'street':new_dict['street'],
|
||||
'street2' : new_dict['street2'],
|
||||
'city' : new_dict['city'],
|
||||
'phone' : new_dict['phone'],
|
||||
'mobile' : new_dict['mobile'],
|
||||
'fax' : new_dict['fax'],
|
||||
'zip' : new_dict['zip'],
|
||||
}
|
||||
if new_dict['partner_id'] != -1:
|
||||
vals_res_address['partner_id'] = new_dict['partner_id']
|
||||
if new_dict['state_id'] != -1:
|
||||
vals_res_address['state_id'] = new_dict['state_id']
|
||||
if new_dict['country_id'] != -1:
|
||||
vals_res_address['country_id'] = new_dict['country_id']
|
||||
temp = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'write', address_id, vals_res_address)
|
||||
if temp:
|
||||
flag=1
|
||||
else:
|
||||
flag=0
|
||||
return flag
|
||||
|
||||
def GetAllState(self):
|
||||
import win32ui
|
||||
state_list = []
|
||||
state_ids = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
state_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', [])
|
||||
for state_id in state_ids:
|
||||
obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'read', [state_id],['id','name'])[0]
|
||||
state_list.append((obj['id'], ustr(obj['name'])))
|
||||
return state_list
|
||||
|
||||
def GetAllCountry(self):
|
||||
import win32ui
|
||||
country_list = []
|
||||
country_ids = []
|
||||
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
|
||||
country_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', [])
|
||||
for country_id in country_ids:
|
||||
obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country','read', [country_id], ['id','name'])[0]
|
||||
country_list.append((obj['id'], ustr(obj['name'])))
|
||||
return country_list
|
||||
|
||||
@@ -463,18 +463,17 @@
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Restaurant Expenses</field>
|
||||
<field eval="1" name="hr_expense_ok"/>
|
||||
<field name="categ_id" ref="product_category_otherproducts0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_worker0" model="product.product">
|
||||
<field name="default_code">WORK</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="type">service</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="default_code">WORK</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="type">service</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field eval="1" name="purchase_ok"/>
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Worker</field>
|
||||
@@ -486,15 +485,12 @@
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">10.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE100</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE100</field>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_rearpanelarm1" model="product.product">
|
||||
<field name="default_code">RPAN200</field>
|
||||
@@ -504,9 +500,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE200</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
@@ -519,9 +512,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Side Panel</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
@@ -534,9 +524,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rack 100cm</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="8" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
@@ -549,9 +536,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rack 200cm</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="8" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
@@ -576,9 +560,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Wood Lintel 4m</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="10" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
@@ -590,9 +571,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Metal Cleats</field>
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field eval="20" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
@@ -607,7 +585,6 @@ Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Hotel Expenses</field>
|
||||
<field eval="1" name="hr_expense_ok"/>
|
||||
<field name="categ_id" ref="product_category_otherproducts0"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
import netsvc, tools, os
|
||||
data_dict = {'model': 'product.price_list'}
|
||||
data_dict = {'model': 'product.product'}
|
||||
data_dict['form'] = {
|
||||
'qty1': 1,
|
||||
'qty2': 5,
|
||||
|
||||
@@ -193,6 +193,48 @@
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_rearpanelarm0" model="product.product">
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_rearpanelarm1" model="product.product">
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_sidepanel0" model="product.product">
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_shelf0" model="product.product">
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_shelf1" model="product.product">
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_woodlintelm0" model="product.product">
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_metalcleats0" model="product.product">
|
||||
<field eval="'Public Pricelist (0.00) : 1.00
|
||||
One-shot customers (0.00) : 1.00
|
||||
Returning customers (0.00) : 0.99'" name="pricelist_sale"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1450,7 +1450,7 @@ class stock_move(osv.osv):
|
||||
'date': fields.datetime('Creation Date', select=True),
|
||||
'date_planned': fields.datetime('Date', required=True, help="Scheduled date for the movement of the products or real date if the move is done."),
|
||||
'date_expected': fields.datetime('Date Expected', readonly=True,required=True, help="Scheduled date for the movement of the products"),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')]),
|
||||
|
||||
'product_qty': fields.float('Quantity', required=True),
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True),
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+1
-1
@@ -13,7 +13,7 @@
|
||||
<hbox>
|
||||
<description>&name.value;</description>
|
||||
<spacer width="50"/>
|
||||
<textbox id="txtname" align="right" />
|
||||
<textbox id="txtselectpartner" align="right" />
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<description></description>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<toolbarbutton id="GA-button"
|
||||
class="toolbarbutton-1"
|
||||
image="&menuicon.value;"
|
||||
label= "Archive To OpenERP"
|
||||
label= "Push To OpenERP"
|
||||
oncommand="searchmail();" />
|
||||
</toolbarpalette>
|
||||
|
||||
|
||||
@@ -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="600" width="1000">
|
||||
title="&title.label;" onload="myPrefObserver.loaddata()" height="650" width="1000">
|
||||
|
||||
<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,17 +12,22 @@
|
||||
<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">
|
||||
<vbox width="50%" style="padding:12px;">
|
||||
<caption label="&gptinyobj.label;" />
|
||||
<groupbox height="375" id="existsobjectgroup" width="100%" style="border:1px solid black">
|
||||
<separator class="groove-thin" orient="horizontal" width="1000"/>
|
||||
<hbox>
|
||||
<hbox id="root" height="10" width="800" style="padding:12px;border:1px solid black">
|
||||
|
||||
<caption label="&title.label;" />
|
||||
</hbox>
|
||||
<hbox id="root1" height="380" width="800" style="padding:12px;border:1px solid black">
|
||||
<vbox>
|
||||
<caption label="&gptinyobj.label;" />
|
||||
<groupbox id="existsobjectgroup" width="400" style="border:1px solid black">
|
||||
|
||||
<separator class="groove-thin" orient="horizontal" width="400"/>
|
||||
<hbox>
|
||||
<label id="lblsearch" control="txtvalueobj" value="&search.label;"/>
|
||||
<textbox id="txtvalueobj" size="30"/>
|
||||
<button label="&bsearch.label;" oncommand="searchCheckbox()" image="&imagesearch.value;" accesskey="s"/>
|
||||
</hbox>
|
||||
<vbox align="left" id="checkbox-dynamic" >
|
||||
<vbox align="left" id="checkbox-dynamic" >
|
||||
</vbox>
|
||||
<hbox align="left">
|
||||
<image src='chrome://openerp_plugin/skin/perform.gif'/>
|
||||
@@ -30,12 +35,11 @@
|
||||
|
||||
</hbox>
|
||||
<hbox>
|
||||
<description>Documents</description>
|
||||
<caption label="&document.label;" />
|
||||
</hbox>
|
||||
<vbox>
|
||||
<hbox height="250" width="100%">
|
||||
|
||||
<listbox height="250" width="480" id="listSearchBox" seltype="multiple">
|
||||
<listbox height="250" width="100%" id="listSearchBox" style="border:1px solid red" seltype="multiple">
|
||||
<listhead>
|
||||
<listheader label="&listSearchBox.header;"/>
|
||||
</listhead>
|
||||
@@ -43,21 +47,21 @@
|
||||
<listcol flex="1"/>
|
||||
</listcols>
|
||||
</listbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<separator class="groove-thin" orient="horizontal" width="1000"/>
|
||||
<hbox align="right">
|
||||
<hbox align="right" width="480">
|
||||
<button label="&attach.label;" accesskey="u" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('upload');"/>
|
||||
</hbox>
|
||||
<separator class="groove-thin" orient="horizontal" width="1000"/>
|
||||
<separator class="groove-thin" orient="horizontal" width="480"/>
|
||||
</groupbox>
|
||||
|
||||
</vbox>
|
||||
<vbox width="50%" align="left" style="padding:12px;" >
|
||||
<caption label="&newobject.label;" />
|
||||
<groupbox id="newobjectgroup" align="left" width="100%" height="440" style="border:1px solid black;">
|
||||
<separator class="groove-thin" orient="horizontal" width="1000"/>
|
||||
<hbox align="left">
|
||||
|
||||
<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>
|
||||
@@ -82,14 +86,14 @@
|
||||
<vbox>
|
||||
<button label="&create.label;" image="&imagecreate.value;" oncommand="Create.onMenuItemCommand(event);"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
</hbox>
|
||||
<separator class="groove-thin" orient="horizontal" width="480"/>
|
||||
</groupbox>
|
||||
<separator class="groove-thin" orient="horizontal" width="1000"/>
|
||||
<hbox align="right" width="1000">
|
||||
<button label="&close.label;" accesskey="l" image="&imagecancel.value;" oncommand="win_close();"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
||||
|
||||
</hbox>
|
||||
|
||||
<hbox height="60" align="right" width="800">
|
||||
<button label="&close.label;" accesskey="l" image="&imagecancel.value;" oncommand="win_close();"/>
|
||||
</hbox>
|
||||
</window>
|
||||
|
||||
+8
-5
@@ -1329,9 +1329,7 @@ var listPartnerHandler = {
|
||||
listItem.value = arrPartnerList[i][0];
|
||||
cmdPartnerList.appendChild(listItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
onFault: function (client, ctxt, fault) {
|
||||
|
||||
@@ -1873,7 +1871,10 @@ var listCreatePartnerHandler = {
|
||||
onResult: function(client, context, result) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||
var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
|
||||
setPartnerId(createId);
|
||||
txtselectpartner = document.getElementById('txtselectpartner')
|
||||
if(typeof(createId.data) == 'number' && createId!=0){
|
||||
window.opener.document.getElementById('txtselectpartner').setAttribute('value',txtselectpartner.value);
|
||||
window.close();
|
||||
}
|
||||
if(createId == 0){
|
||||
@@ -1891,6 +1892,7 @@ var listCreatePartnerHandler = {
|
||||
//function to create the tiny partner object
|
||||
function createPartner(){
|
||||
var branchobj = getPref();
|
||||
txtselectpartner = document.getElementById('txtselectpartner')
|
||||
setServerService('xmlrpc/object');
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||
var xmlRpcClient = getXmlRpc();
|
||||
@@ -1904,12 +1906,13 @@ function createPartner(){
|
||||
strmethod.data = 'create_partner';
|
||||
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strobj.data = 'thunderbird.partner';
|
||||
if(document.getElementById('txtname').value ==''){
|
||||
if(document.getElementById('txtselectpartner').value ==''){
|
||||
alert("You Must Enter Partner Name.");
|
||||
return false;
|
||||
}
|
||||
var a = ['name'];
|
||||
var b = [document.getElementById('txtname').value];
|
||||
setPartnerId(txtselectpartner.value)
|
||||
var a = ['partner_id','name'];
|
||||
var b = [getPartnerId(),txtselectpartner.value];
|
||||
var arrofarr = dictcontact(a,b);
|
||||
xmlRpcClient.asyncCall(listCreatePartnerHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<!ENTITY tinyplugin "OpenERP Configuration">
|
||||
<!ENTITY tinypluginconfig "Archieve To OpenERP">
|
||||
<!ENTITY tinyarchive "Archive to OpenERP">
|
||||
<!ENTITY tinypluginconfig "Push To OpenERP">
|
||||
<!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.png">
|
||||
|
||||
+3
-2
@@ -1,9 +1,10 @@
|
||||
<!ENTITY title.label "Archive To OpenERP">
|
||||
<!ENTITY title.label "Push To OpenERP">
|
||||
<!ENTITY gptinyobj.label "Link to an Existing Document">
|
||||
<!ENTITY newobject.label "New Documents">
|
||||
<!ENTITY document.label "Documents">
|
||||
<!ENTITY bsearch.label "Search">
|
||||
<!ENTITY close.label "Close">
|
||||
<!ENTITY attach.label "Archive to OpenERP">
|
||||
<!ENTITY attach.label "Push">
|
||||
<!ENTITY create.label "New Contact">
|
||||
<!ENTITY archive.label "Create">
|
||||
<!ENTITY attach.label "Attach">
|
||||
|
||||
Reference in New Issue
Block a user