diff --git a/addons/google_drive/models/google_drive.py b/addons/google_drive/models/google_drive.py index b1eda64b842..f0e494c8405 100644 --- a/addons/google_drive/models/google_drive.py +++ b/addons/google_drive/models/google_drive.py @@ -160,7 +160,7 @@ class GoogleDrive(models.Model): # check if a model is configured with a template configs = self.search([('model_id', '=', res_model)]) config_values = [] - for config in configs: + for config in configs.sudo(): if config.filter_id: if config.filter_id.user_id and config.filter_id.user_id.id != self.env.user.id: #Private diff --git a/addons/mrp/wizard/change_production_qty.py b/addons/mrp/wizard/change_production_qty.py index eebf8d29962..463c30c0a7c 100644 --- a/addons/mrp/wizard/change_production_qty.py +++ b/addons/mrp/wizard/change_production_qty.py @@ -22,7 +22,7 @@ class ChangeProductionQty(models.TransientModel): if 'mo_id' in fields and not res.get('mo_id') and self._context.get('active_model') == 'mrp.production' and self._context.get('active_id'): res['mo_id'] = self._context['active_id'] if 'product_qty' in fields and not res.get('product_qty') and res.get('mo_id'): - res['product_qty'] = self.env['mrp.production'].browse(res.get['mo_id']).product_qty + res['product_qty'] = self.env['mrp.production'].browse(res['mo_id']).product_qty return res @api.model diff --git a/addons/mrp/wizard/change_production_qty_views.xml b/addons/mrp/wizard/change_production_qty_views.xml index 0ba2fc8488e..f731d2cecc1 100644 --- a/addons/mrp/wizard/change_production_qty_views.xml +++ b/addons/mrp/wizard/change_production_qty_views.xml @@ -10,6 +10,7 @@