[MERGE] forward port of branch 7.0 up to 7530d28

This commit is contained in:
Denis Ledoux 2015-01-15 13:37:30 +01:00
commit 8c150c609e
2 changed files with 6 additions and 0 deletions

View File

@ -804,6 +804,7 @@ class mrp_production(osv.osv):
continue
raw_product[0].action_consume(qty, raw_product[0].location_id.id, context=context)
production.refresh()
if production_mode == 'consume_produce':
# To produce remaining qty of final product
@ -829,6 +830,7 @@ class mrp_production(osv.osv):
raise osv.except_osv(_('Warning!'), _('You are going to produce total %s quantities of "%s".\nBut you can only produce up to total %s quantities.') % ((subproduct_factor * production_qty), prod_name, rest_qty))
if rest_qty > 0 :
stock_mov_obj.action_consume(cr, uid, [produce_product.id], (subproduct_factor * production_qty), context=context)
production.refresh()
for raw_product in production.move_lines2:
new_parent_ids = []

View File

@ -712,6 +712,10 @@ class groups_view(osv.osv):
# and introduces the reified group fields
# we have to try-catch this, because at first init the view does not exist
# but we are already creating some basic groups
if not context or context.get('install_mode'):
# use installation/admin language for translatable names in the view
context = dict(context or {})
context.update(self.pool['res.users'].context_get(cr, uid))
view = self.pool['ir.model.data'].xmlid_to_object(cr, SUPERUSER_ID, 'base.user_groups_view', context=context)
if view and view.exists() and view._table_name == 'ir.ui.view':
xml1, xml2 = [], []