[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9487 rev-id: dle@openerp.com-20130930141202-ghnujem348kydd2m

bzr revid: dle@openerp.com-20130930150804-b4j080uy06t4n7f1
This commit is contained in:
Denis Ledoux
2013-09-30 17:08:04 +02:00
5 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -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)
+4 -2
View File
@@ -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):
+1 -1
View File
@@ -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')
+1
View File
@@ -92,6 +92,7 @@
<field name="view_mode">form</field>
<field name="view_id" ref="contact_form_view"/>
<field name="target">inline</field>
<field name="context">{'default_type': 'lead'}</field>
</record>
<!-- attach it to the portal menu -->
+2 -2
View File
@@ -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