diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index ff6321e599f..f31f10c4060 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -363,7 +363,12 @@ the rule to mark CC(mail to any other person defined in actions)."),
'user' : self.pool.get('res.users').browse(cr, uid, uid, context=context),
'obj' : obj,
})
- self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_from)
+ def to_email(text):
+ return re.findall(r'([^ ,<@]+@[^> ,]+)', text or '')
+ emails = to_email(','.join(filter(None, emails)))
+ email_froms = to_email(email_from)
+ if email_froms:
+ self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_froms[0])
return True
def _action(self, cr, uid, ids, objects, scrit=None, context=None):
diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py
index 1a1b48e75ee..350c9f70092 100644
--- a/addons/mail_gateway/mail_gateway.py
+++ b/addons/mail_gateway/mail_gateway.py
@@ -122,10 +122,14 @@ class mailgate_thread(osv.osv):
obj = self.pool.get('mailgate.message')
for case in cases:
+ partner_id = hasattr(case, 'partner_id') and (case.partner_id and case.partner_id.id or False) or False
+ if not partner_id and case._name == 'res.partner':
+ partner_id = case.id
data = {
'name': keyword,
'user_id': uid,
'model' : case._name,
+ 'partner_id': partner_id,
'res_id': case.id,
'date': time.strftime('%Y-%m-%d %H:%M:%S'),
'message_id': message_id,
@@ -153,7 +157,7 @@ class mailgate_thread(osv.osv):
case.user_id.address_id.email),
'email_cc': email_cc,
'email_bcc': email_bcc,
- 'partner_id': hasattr(case, 'partner_id') and (case.partner_id and case.partner_id.id or False) or False,
+ 'partner_id': partner_id,
'references': references,
'message_id': message_id,
'attachment_ids': [(6, 0, attachments)]
@@ -255,11 +259,16 @@ class mailgate_tool(osv.osv_memory):
msg_pool = self.pool.get('mailgate.message')
for res_id in res_ids:
+ case = self.pool.get(model).browse(cr, uid, res_id, context=context)
+ partner_id = hasattr(case, 'partner_id') and (case.partner_id and case.partner_id.id or False) or False
+ if not partner_id and model == 'res.partner':
+ partner_id = res_id
msg_data = {
'name': msg.get('subject', 'No subject'),
'date': msg.get('date'),
'description': msg.get('body', msg.get('from')),
'history': True,
+ 'partner_id': partner_id,
'res_model': model,
'email_cc': msg.get('cc'),
'email_from': msg.get('from'),
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index def60b7d458..8b616c3d7ac 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -467,9 +467,8 @@ class mrp_production(osv.osv):
'state': fields.selection([('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'State', readonly=True,
help='When the production order is created the state is set to \'Draft\'.\n If the order is confirmed the state is set to \'Waiting Goods\'.\n If any exceptions are there, the state is set to \'Picking Exception\'.\
\nIf the stock is available then the state is set to \'Ready to Produce\'.\n When the production gets started then the state is set to \'In Production\'.\n When the production is over, the state is set to \'Done\'.'),
- 'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder'),
- 'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder'),
-
+ 'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder', store=True),
+ 'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder', store=True),
'company_id': fields.many2one('res.company','Company',required=True),
}
_defaults = {
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 6b59287f3ce..4186a6e8722 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -615,7 +615,7 @@
-
+
-
+
= 2
- move_lines[0].product_id.id <> move_lines[1].product_id.id
- move_lines[0].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))
- move_lines[1].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))
diff --git a/addons/mrp/test/mrp_phantom_bom.yml b/addons/mrp/test/mrp_phantom_bom.yml
index 71a04fc79d7..46b1d19244a 100644
--- a/addons/mrp/test/mrp_phantom_bom.yml
+++ b/addons/mrp/test/mrp_phantom_bom.yml
@@ -200,7 +200,7 @@
-
!python {model: procurement.order}: |
from tools.translate import _
- proc_ids = self.search(cr, uid, [('state','=','confirmed')])
+ proc_ids = self.search(cr, uid, [('product_id','in',[ref('product_product_orange0'),ref('product_product_sugar0'),ref('product_product_water0')])])
assert proc_ids, _('No Procurements!')
-
The scheduler runs.
diff --git a/addons/mrp/test/mrp_production_order.yml b/addons/mrp/test/mrp_production_order.yml
index 476d79f7fab..94613a3ac93 100644
--- a/addons/mrp/test/mrp_production_order.yml
+++ b/addons/mrp/test/mrp_production_order.yml
@@ -5,113 +5,61 @@
-
I am creating one manufacturing order.
-
- !record {model: mrp.production, id: mrp_production_mo0}:
- bom_id: mrp.mrp_bom_9
- routing_id: mrp.mrp_routing_0
+ !record {model: mrp.production, id: mrp_production_mo1}:
company_id: base.main_company
date_planned: '2010-05-06 14:55:52'
location_dest_id: stock.stock_location_stock
location_src_id: stock.stock_location_stock
- name: MO/00004
product_id: product.product_product_pc1
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
--
- I create a record for Workcenter line.
--
- !record {model: mrp.production.workcenter.line, id: mrp_production_workcenter_line_assemblyline0}:
- cycle: 5.0
- hour: 10.0
- name: Assembly Line 1
- production_id: mrp_production_mo0
- sequence: 0.0
- workcenter_id: mrp.mrp_workcenter_0
--
- I create second record for Workcenter line.
--
- !record {model: mrp.production.product.line, id: mrp_production_product_line_regularprocessorconfig0}:
- name: Regular processor config
- product_id: product.product_product_cpu_gen
- product_qty: 5.0
- product_uom: product.product_uom_unit
- product_uos_qty: 0.0
- production_id: mrp_production_mo0
--
- I create third record for Workcenter line.
--
- !record {model: mrp.production.product.line, id: mrp_production_product_line_hddseagategb0}:
- name: HDD Seagate 7200.8 80GB
- product_id: product.product_product_hdd1
- product_qty: 5.0
- product_uom: product.product_uom_unit
- product_uos_qty: 0.0
- production_id: mrp_production_mo0
--
- I create fourth record for Workcenter line.
--
- !record {model: mrp.production.product.line, id: mrp_production_product_line_atxmidsizetower0}:
- name: ATX Mid-size Tower
- product_id: product.product_product_tow1
- product_qty: 5.0
- product_uom: product.product_uom_unit
- product_uos_qty: 0.0
- production_id: mrp_production_mo0
--
- I create a record for production line.
--
- !record {model: mrp.production.product.line, id: mrp_production_product_line_mouse0}:
- name: Mouse
- product_id: product.product_product_25
- product_qty: 5.0
- product_uom: product.product_uom_unit
- product_uos_qty: 0.0
- production_id: mrp_production_mo0
--
- I create second record for production line.
--
- !record {model: mrp.production.product.line, id: mrp_production_product_line_keyboard0}:
- name: Keyboard
- product_id: product.product_product_24
- product_qty: 5.0
- product_uom: product.product_uom_unit
- product_uos_qty: 0.0
- production_id: mrp_production_mo0
+-
+ I compute the data.
+-
+ !python {model: mrp.production}: |
+ self.action_compute(cr, uid, [ref("mrp_production_mo1")], {"lang": "en_US", "tz":
+ False, "search_default_current": 1, "active_model": "ir.ui.menu", "active_ids":
+ [ref("mrp.menu_mrp_production_action")], "active_id": ref("mrp.menu_mrp_production_action"),
+ })
-
I confirm the order.
-
- !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0}
+ !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1}
-
I am checking Procurement orders.
-
!python {model: procurement.order}: |
from tools.translate import _
- proc_ids = self.search(cr, uid, [('state','=','confirmed')])
+ production_obj = self.pool.get('mrp.production')
+ production = production_obj.browse(cr, uid, ref('mrp_production_mo1'))
+ product_ids = map(lambda x:x.product_id.id, production.move_lines)
+ proc_ids = self.search(cr, uid, [('product_id','in',product_ids)])
assert proc_ids, _('No Procurements!')
-
The scheduler runs.
-
!function {model: procurement.order, name: run_scheduler}:
- model: procurement.order
- search: "[('state','=','confirmed')]"
+ search: "[]"
-
I am checking Internal picking.
-
!python {model: stock.picking}: |
from tools.translate import _
- pick_ids = self.search(cr, uid, [('state','!=','done'),('type','=','internal')])
+ pick_ids = self.search(cr, uid, [('type','=','internal')])
assert pick_ids, _('No Internal Pickings!')
-
I see that there is a manufacturing order for the sub product of PC1 with ready state.
-
!python {model: mrp.production}: |
from tools.translate import _
- order_ids = self.search(cr, uid, [('state','=','confirmed')])
- assert order_ids, _('No manufacturing order!')
+ order_ids = self.search(cr, uid, [('state','=','ready')])
+ assert order_ids, _('No manufacturing order in Ready state!')
-
I start producing that product first. So I marked it as started.
-
- !workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo0}
+ !workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo1}
-
I create record for producing products with quantity 5.00.
-
@@ -124,19 +72,25 @@
!python {model: mrp.product.produce}: |
prod_obj = self.pool.get('mrp.production')
prod_ids = prod_obj.search(cr, uid, [('state','=','confirmed')])
- self.do_produce(cr, uid, [1], context={'active_ids': prod_ids})
+ self.do_produce(cr, uid, [ref('mrp_product_produce0')], context={'active_ids': prod_ids})
-
Now the manufacturing order for subproduct CPU_GEN is done and manufacturing
order for PC1 is in ready state.
-
!python {model: mrp.production}: |
from tools.translate import _
- prod_ids = self.search(cr, uid, [('state','!=','done')])
+ prod_ids = self.search(cr, uid, [('state','=','done')])
assert prod_ids, _('Manufacturing order is yet not done!')
-
I start producing the product PC1.
-
- !workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo0}
+ !workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo1}
+-
+ I create record for producing products with quantity 5.00.
+-
+ !record {model: mrp.product.produce, id: mrp_product_produce1}:
+ product_qty: 5.00
+ mode: 'consume_produce'
-
Finally my production order is done.
-
@@ -144,4 +98,4 @@
from tools.translate import _
prod_obj = self.pool.get('mrp.production')
prod_ids = prod_obj.search(cr, uid, [('product_id.default_code','=','PC1')])
- self.do_produce(cr, uid, [1], context={'active_ids': prod_ids})
+ self.do_produce(cr, uid, [ref('mrp_product_produce1')], context={'active_ids': prod_ids})
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index d0a669590e2..ab936e78daf 100644
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -75,7 +75,7 @@ class mrp_production_workcenter_line(osv.osv):
_order = "sequence, date_planned"
_columns = {
- 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'State', readonly=True,
+ 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'State', readonly=True,
help="* When a work order is created it is set in 'Draft' state.\n" \
"* When user sets work order in start mode that time it will be set in 'In Progress' state.\n" \
"* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pause' state.\n" \
@@ -93,7 +93,7 @@ class mrp_production_workcenter_line(osv.osv):
string='Production State', readonly=True),
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product',
readonly=True),
- 'qty':fields.related('production_id','product_qty',type='float',string='Qty',readonly=True),
+ 'qty':fields.related('production_id','product_qty',type='float',string='Qty',readonly=True, store=True),
'uom':fields.related('production_id','product_uom',type='many2one',relation='product.uom',string='UOM',readonly=True),
}
@@ -263,7 +263,7 @@ class mrp_production(osv.osv):
dt = dt_end
if context.get('__last_update'):
del context['__last_update']
- if (wc.date_planned
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/addons/project/installer.py b/addons/project/installer.py
index 53a94dd7039..ef2c2b5e8c8 100644
--- a/addons/project/installer.py
+++ b/addons/project/installer.py
@@ -47,7 +47,7 @@ class project_installer(osv.osv_memory):
'project_crm': fields.boolean('Issues Tracker',
help="Automatically synchronizes project tasks and crm cases."),
# Methodologies
- 'scrum': fields.boolean('SCRUM',
+ 'project_scrum': fields.boolean('SCRUM',
help="Implements and tracks the concepts and task types defined "
"in the SCRUM methodology."),
'project_gtd': fields.boolean('Getting Things Done',
@@ -61,4 +61,4 @@ class project_installer(osv.osv_memory):
project_installer()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml
index 56064158683..d19c8467de2 100644
--- a/addons/project/project_installer.xml
+++ b/addons/project/project_installer.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/addons/sale_crm/sale_crm.py b/addons/sale_crm/sale_crm.py
index 03521356f64..f1828d27b03 100644
--- a/addons/sale_crm/sale_crm.py
+++ b/addons/sale_crm/sale_crm.py
@@ -26,7 +26,38 @@ class sale_order(osv.osv):
_columns = {
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
-
+ def action_cancel(self, cr, uid, ids, context=None):
+ res = super(sale_order, self).action_cancel(cr, uid, ids, context=context)
+ case_pool = self.pool.get('crm.lead')
+ data_pool = self.pool.get('ir.model.data')
+ data = data_pool._get_id(cr, uid, 'crm', 'stage_lead6')
+ res_data = data_pool.read(cr, uid, data, ['res_id'])
+ lost_stage_id = False
+ if res_data and res_data.get('res_id'):
+ lost_stage_id = res_data.get('res_id', False)
+ if not lost_stage_id:
+ return res
+ # After sale cancel, lead also lost
+ for sale_id in ids:
+ lead_ids = case_pool.search(cr, uid, [('ref','=','sale.order,%s'%(sale_id))])
+ case_pool.write(cr, uid, lead_ids, {'stage_id': lost_stage_id})
+ return res
+ def action_ship_create(self, cr, uid, ids, *args):
+ res = super(sale_order, self).action_ship_create(cr, uid, ids, *args)
+ case_pool = self.pool.get('crm.lead')
+ data_pool = self.pool.get('ir.model.data')
+ data = data_pool._get_id(cr, uid, 'crm', 'stage_lead5')
+ res_data = data_pool.read(cr, uid, data, ['res_id'])
+ win_stage_id = False
+ if res_data and res_data.get('res_id'):
+ win_stage_id = res_data.get('res_id', False)
+ if not win_stage_id:
+ return res
+ # After sale confimed, lead also win
+ for sale_id in ids:
+ lead_ids = case_pool.search(cr, uid, [('ref','=','sale.order,%s'%(sale_id))])
+ case_pool.write(cr, uid, lead_ids, {'stage_id': win_stage_id})
+ return res
def _get_section(self, cr, uid, context=None):
return context.get('context_section_id', False)
@@ -36,4 +67,4 @@ class sale_order(osv.osv):
sale_order()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index 7d9e4086f52..9d20b0dea4a 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -147,7 +147,9 @@ class crm_make_sale(osv.osv_memory):
value['discount']=line.discount
value['notes']=line.notes
sale_line_obj.create(cr, uid, value)
- case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
+ stage_data = mod_obj._get_id(cr, uid, 'crm', 'stage_lead3')
+ stage_data = mod_obj.read(cr, uid, stage_data, ['res_id'])
+ case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id, 'stage_id': stage_data['res_id']})
new_ids.append(new_id)
message = _('Opportunity ') + " '" + case.name + "' "+ _("is converted to Sales Quotation.")
self.log(cr, uid, case.id, message)
@@ -244,4 +246,4 @@ class sale_order_make_line(osv.osv_memory):
sale_order_make_line()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_location/test/stock_location.yml b/addons/stock_location/test/stock_location.yml
index 8b79eb5f63c..c5360ce67c5 100644
--- a/addons/stock_location/test/stock_location.yml
+++ b/addons/stock_location/test/stock_location.yml
@@ -171,7 +171,6 @@
Creating a stock.location record
-
!record {model: stock.location, id: stock_location_suppiler0}:
- allocation_method: fifo
chained_auto_packing: auto
chained_delay: 15
chained_location_type: none
@@ -212,7 +211,6 @@
-
!record {model: stock.location, id: stock_location_suppiler0}:
address_id: res_partner_address_0
- allocation_method: fifo
chained_auto_packing: manual
chained_delay: 20
chained_location_type: none
diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi
index c911856cd3d..f9e11ba939c 100644
Binary files a/addons/thunderbird/plugin/openerp_plugin.xpi and b/addons/thunderbird/plugin/openerp_plugin.xpi differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar
index b48a4be3827..de506007d3a 100644
Binary files a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar and b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/address.xul b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/address.xul
index c6caf6e63c5..58514f39cbd 100644
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/address.xul
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/address.xul
@@ -3,7 +3,7 @@
+ title="&title.label;" onload="myPrefObserver.createContactAddress();" height="480" width="764">
@@ -23,9 +23,10 @@
-
+
+
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/loaddata.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/loaddata.js
index 93d21f56f5c..4bf92728a06 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/loaddata.js
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/loaddata.js
@@ -92,7 +92,7 @@ var myPrefObserver =
createContactAddress: function()
{
- document.getElementById("txtname").value = getPartnerName();
+ document.getElementById("txtselectpartner").value = getPartnerName();
document.getElementById("txtcontactname").value = getSenderName();
document.getElementById("txtstreet").value = getStreet();
document.getElementById("txtstreet2").value = getStreet2();
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.js
index 7d7c9098bce..3bf24a79e0c 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.js
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.js
@@ -177,6 +177,7 @@ function searchmail()
}
}
+
function open_contact()
{
setTimeout("createConnection()",5000)
@@ -222,8 +223,8 @@ function open_contact()
}
//set the initial information for the selected email
- setSenderEmail(senderemail);
- setSenderName(sendername);
+ setSenderEmail(senderemail);
+ setSenderName(sendername);
setPartnerName("");
setStreet("");
setStreet2("");
@@ -238,10 +239,10 @@ function open_contact()
alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
return false
}
- window.open("chrome://openerp_plugin/content/address.xul", "", "chrome, resizable=yes");
}
+
//function to open the configuration window
var Config = {
onLoad: function() {
@@ -286,7 +287,7 @@ var Address = {
onMenuItemCommand: function(){
open_contact();
- searchContact();
+ searchContact();
}
};
@@ -297,9 +298,10 @@ var Select = {
this.initialized=true;
},
- onMenuItemCommand: function(){
- window.open("chrome://openerp_plugin/content/selectpartner.xul", "", "chrome");
- }
+ onMenuItemCommand: function(){
+ //document.getElementById("txtselectpartner").value="";
+ window.open("chrome://openerp_plugin/content/selectpartner.xul", "", "chrome");
+ }
};
var CreatePartner = {
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
index 0ff795c1f3f..cc3d26e7e84 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
@@ -985,8 +985,13 @@ var listSearchContactHandler = {
if(strlSearchResult=="email" && strlSearchResultValue!=''){
setSenderEmail(strlSearchResultValue);
- var t = getSenderEmail();}
+ var t = getSenderEmail();
+ window.open("chrome://openerp_plugin/content/address.xul", "", "chrome, resizable=yes");}
+ if(strlSearchResult=="email" && strlSearchResultValue==''){
+ alert("Contact is not available.");
+ }
+
if(strlSearchResult=="res_id"){
setResourceId(strlSearchResultValue);
var t = getResourceId();}
@@ -1014,11 +1019,11 @@ var listSearchContactdetailHandler = {
var strlSearchResultValue = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
if(strlSearchResult=="email" && strlSearchResultValue=='')
{
- alert("Contact is not Available")
+ alert("Contact is not Available.")
document.getElementById("txtemail").value = sendername;
}
if(strlSearchResult=="partner_name"){
- document.getElementById("txtname").value =strlSearchResultValue;}
+ document.getElementById("txtselectpartner").value =strlSearchResultValue;}
if(strlSearchResult=="contactname"){
document.getElementById("txtcontactname").value =strlSearchResultValue;}
@@ -1043,7 +1048,7 @@ var listSearchContactdetailHandler = {
document.getElementById("txtmobile").value =strlSearchResultValue;}
if(strlSearchResult=="email"&& strlSearchResultValue!=''){
- document.getElementById("txtemail").value =strlSearchResultValue;}
+ document.getElementById("txtemail").value =strlSearchResultValue;}
if(strlSearchResult=="res_id"){
setResourceId(strlSearchResultValue);
@@ -1080,7 +1085,7 @@ function searchContactdetail()
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strmethod.data = 'search_contact';
var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strname.data =document.getElementById("txtemail").value;
+ strname.data = document.getElementById("txtemail").value;
xmlRpcClient.asyncCall(listSearchContactdetailHandler,cmbSearchList,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
}
@@ -1259,7 +1264,7 @@ function searchContact()
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strmethod.data = 'search_contact';
var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strname.data =getSenderEmail();
+ strname.data = getSenderEmail();
xmlRpcClient.asyncCall(listSearchContactHandler,cmbSearchList,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
}
@@ -1335,6 +1340,8 @@ function getPartnerList(){
strvalue.data = document.getElementById('txtselectpartner').value;
xmlRpcClient.asyncCall(listPartnerHandler,cmdPartnerList,'execute',[ strDbName,struid,strpass,strobj,strmethod,strvalue ],6);
}
+
+
//function to create the xmlrpc supported variables for xmlrpc request
function dictcontact(a,b){
var temp = xmlRpcClient.createType(xmlRpcClient.ARRAY,{});
@@ -1527,7 +1534,7 @@ function createContact(){
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strobj.data = 'thunderbird.partner';
var a = ['partner_id','name','street','street2','zip','city','country_id','state_id','phone','fax','mobile','email'];
- var b = [getPartnerId(),getSenderName(),document.getElementById("txtstreet").value,document.getElementById("txtstreet2").value,document.getElementById("txtzip").value, document.getElementById("txtcity").value,document.getElementById("country").value,document.getElementById("state").value,document.getElementById("txtoffice").value,document.getElementById("txtfax").value,document.getElementById("txtmobile").value,document.getElementById("txtemail").value];
+ var b = [getPartnerId(),document.getElementById("txtname").value,document.getElementById("txtstreet").value,document.getElementById("txtstreet2").value,document.getElementById("txtzip").value, document.getElementById("txtcity").value,document.getElementById("country").value,document.getElementById("state").value,document.getElementById("txtoffice").value,document.getElementById("txtfax").value,document.getElementById("txtmobile").value,document.getElementById("txtemail").value];
var arrofarr = dictcontact(a,b);
xmlRpcClient.asyncCall(listCreateContactHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
}
@@ -1548,7 +1555,7 @@ function UpdateContact(){
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strobj.data = 'thunderbird.partner';
var a = ['res_id','partner_id','name','street','street2','zip','city','country_id','state_id','phone','fax','mobile','email'];
- var b = [getResourceId(),getPartnerName(),document.getElementById("txtcontactname").value,document.getElementById("txtstreet").value,document.getElementById("txtstreet2").value,document.getElementById("txtzip").value, document.getElementById("txtcity").value,document.getElementById("country").value,document.getElementById("state").value,document.getElementById("txtoffice").value,document.getElementById("txtfax").value,document.getElementById("txtmobile").value,document.getElementById("txtemail").value];
+ var b = [getResourceId(),document.getElementById("txtselectpartner").value,document.getElementById("txtcontactname").value,document.getElementById("txtstreet").value,document.getElementById("txtstreet2").value,document.getElementById("txtzip").value, document.getElementById("txtcity").value,document.getElementById("country").value,document.getElementById("state").value,document.getElementById("txtoffice").value,document.getElementById("txtfax").value,document.getElementById("txtmobile").value,document.getElementById("txtemail").value];
var arrofarr = dictcontact(a,b);
xmlRpcClient.asyncCall(listUpdateContactHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
}
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd
index a2345f0aaaf..4d49c4bc4b0 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd
@@ -3,7 +3,7 @@
-
+
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/skin/partner.png b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/skin/partner.png
deleted file mode 100644
index 37b29e13382..00000000000
Binary files a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/skin/partner.png and /dev/null differ