[MERGE] Forward-port of latest 7.0 bugfixes, up to aeaa826
authorOlivier Dony <odo@openerp.com>
Tue, 27 May 2014 14:50:02 +0000 (16:50 +0200)
committerOlivier Dony <odo@openerp.com>
Tue, 27 May 2014 14:50:02 +0000 (16:50 +0200)
1  2 
addons/account/account_invoice_view.xml
addons/delivery/delivery.py
addons/hr_recruitment/hr_recruitment.py
addons/purchase/edi/purchase_order_action_data.xml
addons/purchase/purchase.py
addons/web/static/src/js/view_form.js

@@@ -191,14 -192,15 +191,15 @@@ class delivery_grid(osv.osv)
          total = 0
          weight = 0
          volume = 0
+         product_uom_obj = self.pool.get('product.uom')
          for line in order.order_line:
 -            if not line.product_id:
 +            if not line.product_id or line.is_delivery:
                  continue
-             weight += (line.product_id.weight or 0.0) * line.product_uom_qty
-             volume += (line.product_id.volume or 0.0) * line.product_uom_qty
+             q = product_uom_obj._compute_qty(cr, uid, line.product_uom.id, line.product_uos_qty, line.product_id.uom_id.id)
 -            total += line.price_subtotal or 0.0
+             weight += (line.product_id.weight or 0.0) * q
+             volume += (line.product_id.volume or 0.0) * q
 +        total = order.amount_total or 0.0
  
          return self.get_price_from_picking(cr, uid, id, total,weight, volume, context=context)
  
      def get_price_from_picking(self, cr, uid, id, total, weight, volume, context=None):
@@@ -230,11 -250,11 +239,11 @@@ class hr_applicant(osv.Model)
      _defaults = {
          'active': lambda *a: 1,
          'user_id': lambda s, cr, uid, c: uid,
 -        'email_from': lambda s, cr, uid, c: s._get_default_email(cr, uid, c),
          'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
          'department_id': lambda s, cr, uid, c: s._get_default_department_id(cr, uid, c),
-         'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'hr.applicant', context=c),
+         'company_id': lambda s, cr, uid, c: s._get_default_company_id(cr, uid, s._get_default_department_id(cr, uid, c), c),
          'color': 0,
 +        'date_last_stage_update': fields.datetime.now,
      }
  
      _group_by_full = {
Simple merge
Simple merge