From 97da3b99b7eaa7eae9207f23b3c7b181ff358754 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Fri, 2 Sep 2016 11:36:44 +0200 Subject: [PATCH] Revert "[FIX] purchase: fix dropship use case in anglo saxon with perpetual valuation." This reverts commit a57b10dbd534c9a2e4a691783d74902a68abfbd8. This has to be fixed in 8.0, and moreover it uses fields defined in sale only so the fix must be done in stock_dropshipping module --- addons/purchase/invoice.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/addons/purchase/invoice.py b/addons/purchase/invoice.py index 91472da8653..6b8b278edda 100644 --- a/addons/purchase/invoice.py +++ b/addons/purchase/invoice.py @@ -113,15 +113,6 @@ class AccountInvoice(models.Model): res.extend(self._anglo_saxon_purchase_move_lines(i_line, res)) return res - @api.model - def _anglo_saxon_sale_move_lines(self, i_line): - for sale_line in i_line.sale_line_ids: - for proc in sale_line.procurement_ids: - if proc.purchase_line_id: - #if the invoice line is related to sale order lines having one of its procurement_ids with a purchase_line_id set, it means that it is a confirmed dropship and in that case we mustn't create the cost of sale line (because the product won't enter the stock) - return [] - return super(AccountInvoice, self)._anglo_saxon_sale_move_lines(i_line) - @api.model def _anglo_saxon_purchase_move_lines(self, i_line, res): """Return the additional move lines for purchase invoices and refunds.