diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index 3c847ade42a..9e1109e0440 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -62,7 +62,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
for id in ids:
tomerge.add(id)
if email:
- ids = lead_obj.search(cr, uid, [('email_from', 'ilike', email[0]), ('state', '!=', 'done')])
+ ids = lead_obj.search(cr, uid, [('email_from', '=ilike', email[0]), ('state', '!=', 'done')])
for id in ids:
tomerge.add(id)
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 33251b1c4c7..fb25fed9bc2 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -292,8 +292,10 @@ class mrp_bom(osv.osv):
"""
if properties is None:
properties = []
- cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,))
- ids = map(lambda x: x[0], cr.fetchall())
+ domain = [('product_id', '=', product_id), ('bom_id', '=', False),
+ '|', ('date_start', '=', False), ('date_start', '<=', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)),
+ '|', ('date_stop', '=', False), ('date_stop', '>=', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT))]
+ ids = self.search(cr, uid, domain)
max_prop = 0
result = False
for bom in self.pool.get('mrp.bom').browse(cr, uid, ids):
diff --git a/addons/point_of_sale/report/pos_details.py b/addons/point_of_sale/report/pos_details.py
index 439371c0a05..56778b06e0a 100644
--- a/addons/point_of_sale/report/pos_details.py
+++ b/addons/point_of_sale/report/pos_details.py
@@ -162,7 +162,7 @@ class pos_details(report_sxw.rml_parse):
for tax in line_taxes['taxes']:
taxes.setdefault(tax['id'], {'name': tax['name'], 'amount':0.0})
taxes[tax['id']]['amount'] += tax['amount']
- return [value for value in taxes.values()] or False
+ return [value for value in taxes.values()] or []
def _get_user_names(self, user_ids):
user_obj = self.pool.get('res.users')
diff --git a/addons/portal_crm/contact_view.xml b/addons/portal_crm/contact_view.xml
index 06ca0dbe8e2..76223cee59e 100644
--- a/addons/portal_crm/contact_view.xml
+++ b/addons/portal_crm/contact_view.xml
@@ -92,6 +92,7 @@
form
inline
+ {'default_type': 'lead'}
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index 478b34f5af6..cf561105b63 100644
--- a/addons/share/wizard/share_wizard.py
+++ b/addons/share/wizard/share_wizard.py
@@ -151,9 +151,9 @@ class share_wizard(osv.TransientModel):
result = dict.fromkeys(ids, '')
for this in self.browse(cr, uid, ids, context=context):
if this.result_line_ids:
- ctx = dict(context, share_url_template_hash_arguments=['action_id'])
+ ctx = dict(context, share_url_template_hash_arguments=['action'])
user = this.result_line_ids[0]
- data = dict(dbname=cr.dbname, login=user.login, password=user.password, action_id=this.action_id.id)
+ data = dict(dbname=cr.dbname, login=user.login, password=user.password, action=this.action_id.id)
result[this.id] = this.share_url_template(context=ctx) % data
return result