[MERGE] forward port of branch 7.0 up to 39f3e40
authorChristophe Simonis <chs@odoo.com>
Wed, 30 Jul 2014 16:55:31 +0000 (18:55 +0200)
committerChristophe Simonis <chs@odoo.com>
Wed, 30 Jul 2014 16:55:31 +0000 (18:55 +0200)
1  2 
addons/account_voucher/account_voucher.py
addons/mail/mail_message.py
addons/project_long_term/project_long_term.py
addons/sale/res_config.py
addons/sale/sale.py
addons/stock/stock.py
openerp/tools/translate.py

Simple merge
@@@ -120,9 -85,13 +120,10 @@@ Example: 10% for retailers, promotion o
              user = self.pool.get('res.users').browse(cr, uid, uid, context)
              res['time_unit'] = user.company_id.project_time_mode_id.id
          else:
 -            try:
 -                product = ir_model_data.get_object(cr, uid, 'product', 'product_product_consultant')
 +            product = ir_model_data.xmlid_to_object(cr, uid, 'product.product_product_consultant')
 +            if product and product.exists():
                  res['time_unit'] = product.uom_id.id
 -            except ValueError:
 -                # keep default value in that case
 -                _logger.warning("Product with xml_id 'product.product_product_consultant' not found")
+         res['timesheet'] = res.get('module_account_analytic_analysis')
          return res
  
      def _get_default_time_unit(self, cr, uid, context=None):
Simple merge
@@@ -1353,14 -1361,13 +1354,13 @@@ class stock_picking(osv.osv)
                  # Then we finish the good picking
                  self.write(cr, uid, [pick.id], {'backorder_id': new_picking})
                  self.action_move(cr, uid, [new_picking], context=context)
 -                wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_done', cr)
 -                wf_service.trg_write(uid, 'stock.picking', pick.id, cr)
 +                self.signal_button_done(cr, uid, [new_picking])
 +                workflow.trg_write(uid, 'stock.picking', pick.id, cr)
-                 delivered_pack_id = pick.id
-                 back_order_name = self.browse(cr, uid, delivered_pack_id, context=context).name
-                 self.message_post(cr, uid, new_picking, body=_("Back order <em>%s</em> has been <b>created</b>.") % (back_order_name), context=context)
+                 delivered_pack_id = new_picking
+                 self.message_post(cr, uid, new_picking, body=_("Back order <em>%s</em> has been <b>created</b>.") % (pick.name), context=context)
              else:
                  self.action_move(cr, uid, [pick.id], context=context)
 -                wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_done', cr)
 +                self.signal_button_done(cr, uid, [pick.id])
                  delivered_pack_id = pick.id
  
              delivered_pack = self.browse(cr, uid, delivered_pack_id, context=context)
Simple merge