[MERGE] forward port branch 8.0 up to e3232c85b9

This commit is contained in:
Christophe Simonis
2017-02-01 18:04:47 +01:00
4 changed files with 7 additions and 4 deletions
-1
View File
@@ -105,7 +105,6 @@ class mrp_production(osv.osv):
'product_uom': sub_product.product_uom.id,
'location_id': source,
'location_dest_id': production.location_dest_id.id,
'move_dest_id': production.move_prod_id.id,
'production_id': production.id
}
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):
if location_id:
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:
qty_wh = qty[product_id]['qty_available']
return { 'value': { 'new_quantity': qty_wh } }
@@ -234,7 +234,7 @@ $('.oe_website_sale').each(function () {
var product_id = false;
for (var k in variant_ids) {
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]));
$default_price.html(price_to_str(variant_ids[k][3]));
});
+5 -1
View File
@@ -628,9 +628,13 @@ class configmanager(object):
@property
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):
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
os.makedirs(d, 0500)
except OSError: