[MERGE] forward port of branch saas-6 up to 0a1362a
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='order_line']//form//field[@name='product_id']" position="after">
|
||||
<field name="event_id" domain="['|', ('event_type_id','=', False),('event_type_id', '=', event_type_id),('date_end','>=',time.strftime('%Y-%m-%d 00:00:00'))]" attrs="{'invisible': [('event_ok', '=', False)],'required': [('event_ok', '!=', False)]}"/>
|
||||
<field name="event_ticket_id" domain="[('event_id', '=', event_id), ('seats_available', '>', 0)]" attrs="{'invisible': [('event_id', '=', False)], 'required': [('event_id', '!=', False)]}"
|
||||
<field name="event_ticket_id" domain="[('event_id', '=', event_id), '|', ('seats_available', '>', 0), ('seats_availability', '=', 'unlimited')]" attrs="{'invisible': [('event_id', '=', False)], 'required': [('event_id', '!=', False)]}"
|
||||
on_change="onchange_event_ticket_id(event_ticket_id, context)"/>
|
||||
<field name="event_type_id" invisible="1"/>
|
||||
<field name="event_ok" invisible="1"/>
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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 = '<div class="css_editable_mode_display"> </div>';
|
||||
var size = '<div class="media_iframe_video_size"> </div>';
|
||||
this.$target.html(editor+size+'<iframe src="'+_.escape(this.$target.data("src"))+'" frameborder="0" allowfullscreen="allowfullscreen"></iframe>');
|
||||
|
||||
Reference in New Issue
Block a user