[MERGE] forward port branch 8.0 up to e3232c85b9
This commit is contained in:
@@ -105,7 +105,6 @@ class mrp_production(osv.osv):
|
|||||||
'product_uom': sub_product.product_uom.id,
|
'product_uom': sub_product.product_uom.id,
|
||||||
'location_id': source,
|
'location_id': source,
|
||||||
'location_dest_id': production.location_dest_id.id,
|
'location_dest_id': production.location_dest_id.id,
|
||||||
'move_dest_id': production.move_prod_id.id,
|
|
||||||
'production_id': production.id
|
'production_id': production.id
|
||||||
}
|
}
|
||||||
move_id = move_obj.create(cr, uid, data, context=context)
|
move_id = move_obj.create(cr, uid, data, context=context)
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class stock_change_product_qty(osv.osv_memory):
|
|||||||
def onchange_location_id(self, cr, uid, ids, location_id, product_id, context=None):
|
def onchange_location_id(self, cr, uid, ids, location_id, product_id, context=None):
|
||||||
if location_id:
|
if location_id:
|
||||||
qty_wh = 0.0
|
qty_wh = 0.0
|
||||||
qty = self.pool.get('product.product')._product_available(cr, uid, [product_id], context=dict(context or {}, location=location_id))
|
qty = self.pool.get('product.product')._product_available(cr, uid, [product_id], context=dict(context or {}, location=location_id, compute_child=False))
|
||||||
if product_id in qty:
|
if product_id in qty:
|
||||||
qty_wh = qty[product_id]['qty_available']
|
qty_wh = qty[product_id]['qty_available']
|
||||||
return { 'value': { 'new_quantity': qty_wh } }
|
return { 'value': { 'new_quantity': qty_wh } }
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ $('.oe_website_sale').each(function () {
|
|||||||
var product_id = false;
|
var product_id = false;
|
||||||
for (var k in variant_ids) {
|
for (var k in variant_ids) {
|
||||||
if (_.isEmpty(_.difference(variant_ids[k][1], values))) {
|
if (_.isEmpty(_.difference(variant_ids[k][1], values))) {
|
||||||
openerp.website.ready(function() {
|
openerp.website.ready().then(function() {
|
||||||
$price.html(price_to_str(variant_ids[k][2]));
|
$price.html(price_to_str(variant_ids[k][2]));
|
||||||
$default_price.html(price_to_str(variant_ids[k][3]));
|
$default_price.html(price_to_str(variant_ids[k][3]));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -628,9 +628,13 @@ class configmanager(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def addons_data_dir(self):
|
def addons_data_dir(self):
|
||||||
d = os.path.join(self['data_dir'], 'addons', release.series)
|
add_dir = os.path.join(self['data_dir'], 'addons')
|
||||||
|
d = os.path.join(add_dir, release.series)
|
||||||
if not os.path.exists(d):
|
if not os.path.exists(d):
|
||||||
try:
|
try:
|
||||||
|
# bootstrap parent dir +rwx
|
||||||
|
if not os.path.exists(add_dir):
|
||||||
|
os.makedirs(add_dir, 0700)
|
||||||
# try to make +rx placeholder dir, will need manual +w to activate it
|
# try to make +rx placeholder dir, will need manual +w to activate it
|
||||||
os.makedirs(d, 0500)
|
os.makedirs(d, 0500)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|||||||
Reference in New Issue
Block a user