diff options
| author | Denis Ledoux <dle@openerp.com> | 2013-09-30 17:08:04 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2013-09-30 17:08:04 +0200 |
| commit | a9158e59933ece66923ac5a6dde66a6e2ccc8bb0 (patch) | |
| tree | 09e0b9914664f5c0e762df929251d47f632715b2 | |
| parent | 861c9b9e7095d82cbd65e75ee438573783bf707e (diff) | |
| parent | 5be6edcec8e8b0d10537596147f06383d806ba5c (diff) | |
[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
| -rw-r--r-- | addons/crm/wizard/crm_lead_to_opportunity.py | 2 | ||||
| -rw-r--r-- | addons/mrp/mrp.py | 6 | ||||
| -rw-r--r-- | addons/point_of_sale/report/pos_details.py | 2 | ||||
| -rw-r--r-- | addons/portal_crm/contact_view.xml | 1 | ||||
| -rw-r--r-- | addons/share/wizard/share_wizard.py | 4 |
5 files changed, 9 insertions, 6 deletions
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 @@ <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 --> 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 |
