[IMP] Not necessary from merge
authorJosse Colpaert <jco@odoo.com>
Fri, 22 Aug 2014 12:55:20 +0000 (14:55 +0200)
committerJosse Colpaert <jco@odoo.com>
Wed, 3 Sep 2014 17:18:16 +0000 (19:18 +0200)
addons/purchase/stock.py

index 12a1898..508b9a0 100644 (file)
@@ -82,14 +82,6 @@ class stock_move(osv.osv):
 
 class stock_picking(osv.osv):
     _inherit = 'stock.picking'
-
-    def _get_partner_to_invoice(self, cr, uid, picking, context=None):
-        """ Inherit the original function of the 'stock' module
-            We select the partner of the purchase order as the partner of the invoice
-        """
-        if picking.move_lines and picking.move_lines[0] and picking.move_lines[0].purchase_line_id:
-            return picking.move_lines[0].purchase_line_id.order_id.partner_id and picking.move_lines[0].purchase_line_id.order_id.partner_id.id
-        return super(stock_picking, self)._get_partner_to_invoice(cr, uid, picking, context=context)
     
     def _get_to_invoice(self, cr, uid, ids, name, args, context=None):
         res = {}