diff --git a/addons/event_sale/views/sale_order.xml b/addons/event_sale/views/sale_order.xml index 7a1371de035..4950c5597de 100644 --- a/addons/event_sale/views/sale_order.xml +++ b/addons/event_sale/views/sale_order.xml @@ -8,7 +8,7 @@ - diff --git a/addons/mrp/wizard/change_production_qty.py b/addons/mrp/wizard/change_production_qty.py index 81a8145ffb2..487116c7990 100644 --- a/addons/mrp/wizard/change_production_qty.py +++ b/addons/mrp/wizard/change_production_qty.py @@ -52,6 +52,7 @@ class change_production_qty(osv.osv_memory): prod_obj = self.pool.get('mrp.production') bom_obj = self.pool.get('mrp.bom') move_obj = self.pool.get('stock.move') + uom_obj = self.pool.get('product.uom') for wiz_qty in self.browse(cr, uid, ids, context=context): prod = prod_obj.browse(cr, uid, record_id, context=context) prod_obj.write(cr, uid, [prod.id], {'product_qty': wiz_qty.product_qty}) @@ -70,7 +71,7 @@ class change_production_qty(osv.osv_memory): if not bom_id: raise UserError(_("Cannot find bill of material for this product.")) - factor = prod.product_qty * prod.product_uom.factor / bom_point.product_uom.factor + factor = uom_obj._compute_qty(cr, uid, prod.product_uom.id, prod.product_qty, bom_point.product_uom.id) product_details, workcenter_details = \ bom_obj._bom_explode(cr, uid, bom_point, prod.product_id, factor / bom_point.product_qty, [], context=context) for r in product_details: diff --git a/addons/website/models/website.py b/addons/website/models/website.py index 91b9511d682..a1427997ee1 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -47,13 +47,13 @@ def url_for(path_or_uri, lang=None): if ps[1] in langs: # Replace the language only if we explicitly provide a language to url_for if force_lang: - ps[1] = lang + ps[1] = lang.encode('utf-8') # Remove the default language unless it's explicitly provided elif ps[1] == request.website.default_lang_code: ps.pop(1) # Insert the context language or the provided language elif lang != request.website.default_lang_code or force_lang: - ps.insert(1, lang) + ps.insert(1, lang.encode('utf-8')) location = '/'.join(ps) return location.decode('utf-8') diff --git a/addons/website/static/src/js/website.snippets.animation.js b/addons/website/static/src/js/website.snippets.animation.js index 5b70c6115c8..fa61feb7ec9 100644 --- a/addons/website/static/src/js/website.snippets.animation.js +++ b/addons/website/static/src/js/website.snippets.animation.js @@ -124,7 +124,7 @@ animation.registry.share = animation.Class.extend({ animation.registry.media_video = animation.Class.extend({ selector: ".media_iframe_video", start: function () { - if (!this.$target.has('.media_iframe_video_size')) { + if (!this.$target.has('.media_iframe_video_size').length) { var editor = '
 
'; var size = '
 
'; this.$target.html(editor+size+'');