diff --git a/addons/point_of_sale/security/point_of_sale_security.xml b/addons/point_of_sale/security/point_of_sale_security.xml
index 54572ee3eb9..5e98bcba49e 100644
--- a/addons/point_of_sale/security/point_of_sale_security.xml
+++ b/addons/point_of_sale/security/point_of_sale_security.xml
@@ -19,5 +19,11 @@
[('company_id', '=', user.company_id.id)]
+
+ Point Of Sale Config
+
+
+ [('warehouse_id.company_id','child_of',[user.company_id.id])]
+
diff --git a/addons/point_of_sale/wizard/pos_session_opening.xml b/addons/point_of_sale/wizard/pos_session_opening.xml
index 5aa3f8d4764..2f3f244c318 100644
--- a/addons/point_of_sale/wizard/pos_session_opening.xml
+++ b/addons/point_of_sale/wizard/pos_session_opening.xml
@@ -10,7 +10,7 @@
diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py
index 01ed6f2409a..cf4099ac3ba 100644
--- a/addons/stock/wizard/stock_change_product_qty.py
+++ b/addons/stock/wizard/stock_change_product_qty.py
@@ -33,6 +33,10 @@ class stock_change_product_qty(osv.osv_memory):
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
'location_id': fields.many2one('stock.location', 'Location', required=True, domain="[('usage', '=', 'internal')]"),
}
+ _defaults = {
+ 'new_quantity': 1,
+ 'product_id': lambda self, cr, uid, ctx: ctx and ctx.get('active_id', False) or False
+ }
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if context is None: context = {}
@@ -54,20 +58,22 @@ class stock_change_product_qty(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
- product_id = context and context.get('active_id', False) or False
+
res = super(stock_change_product_qty, self).default_get(cr, uid, fields, context=context)
- if 'new_quantity' in fields:
- res.update({'new_quantity': 1})
- if 'product_id' in fields:
- res.update({'product_id': product_id})
if 'location_id' in fields:
- try:
- model, location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock')
- self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context)
- except (orm.except_orm, ValueError):
- location_id = False
- res.update({'location_id': location_id})
+ location_id = res.get('location_id', False)
+ if not location_id:
+ try:
+ model, location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock')
+ except (orm.except_orm, ValueError):
+ pass
+ if location_id:
+ try:
+ self.pool.get('stock.location').check_access_rule(cr, uid, [location_id], 'read', context=context)
+ except (orm.except_orm, ValueError):
+ pass
+ res['location_id'] = location_id
return res
def change_product_qty(self, cr, uid, ids, context=None):
diff --git a/addons/stock/wizard/stock_move_view.xml b/addons/stock/wizard/stock_move_view.xml
index 5dc0d0d824c..f2bc40d9a3f 100644
--- a/addons/stock/wizard/stock_move_view.xml
+++ b/addons/stock/wizard/stock_move_view.xml
@@ -67,6 +67,7 @@
form
form
new
+ {'form_view_ref': False}
@@ -124,6 +125,7 @@
form
form
new
+ {'form_view_ref': False}
diff --git a/addons/subscription/__openerp__.py b/addons/subscription/__openerp__.py
index b301525eb42..5f8a1d1338b 100644
--- a/addons/subscription/__openerp__.py
+++ b/addons/subscription/__openerp__.py
@@ -37,7 +37,7 @@ e.g. To have an invoice generated automatically periodically:
above. Specify the interval information and partner to be invoice.
""",
'author': 'OpenERP SA',
- 'depends': [],
+ 'depends': ['base'],
'data': ['security/subcription_security.xml', 'security/ir.model.access.csv', 'subscription_view.xml'],
'demo': ['subscription_demo.xml',],
'installable': True,
diff --git a/addons/survey/wizard/survey_send_invitation.py b/addons/survey/wizard/survey_send_invitation.py
index 44d3bec7f6e..452288d5ac0 100644
--- a/addons/survey/wizard/survey_send_invitation.py
+++ b/addons/survey/wizard/survey_send_invitation.py
@@ -128,17 +128,8 @@ Thanks,''') % (name, self.pool.get('ir.config_parameter').get_param(cr, uid, 'we
for use in exist_user:
new_user.append(use.id)
for id in survey_ref.browse(cr, uid, survey_ids):
- report = self.create_report(cr, uid, [id.id], 'report.survey.form', id.title)
- file = open(get_module_resource('survey', 'report') + id.title +".pdf")
- file_data = ""
- while 1:
- line = file.readline()
- file_data += line
- if not line:
- break
- file.close()
- attachments[id.title +".pdf"] = file_data
- os.remove(get_module_resource('survey', 'report') + id.title +".pdf")
+ result, format = openerp.report.render_report(cr, uid, [id.id], 'survey.form', {}, {})
+ attachments[id.title +".pdf"] = result
for partner in self.pool.get('res.partner').browse(cr, uid, partner_ids):
if not partner.email:
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 5f85b581cea..b2bd33b393a 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -1407,7 +1407,7 @@ instance.web.View = instance.web.Widget.extend({
// Wrong group_by values will simply fail and forbid rendering of the destination view
var ncontext = new instance.web.CompoundContext(
_.object(_.reject(_.pairs(dataset.get_context().eval()), function(pair) {
- return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
+ return pair[0].match('^(?:(?:default_|search_default_).+|.+_view_ref|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
}))
);
ncontext.add(action_data.context || {});