From 5a77ff6f305203abe8a8551f71b2662cc64a021e Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Thu, 3 Nov 2016 19:55:23 +0100 Subject: [PATCH] [FIX] stock_dropshipping: fix dropship accounting entries to avoid interim account never cleared. This effectively reverts the patch 7bdd4de that was made on 8.0 then reverted by 001610e (in 8.0 too) but each of them manually forward ported to 9.0, except that the forward port of the last one forgot to remove the faulty commit. --- addons/stock_dropshipping/__init__.py | 1 - addons/stock_dropshipping/models/__init__.py | 4 ---- .../models/stock_dropshipping.py | 19 ------------------- 3 files changed, 24 deletions(-) delete mode 100644 addons/stock_dropshipping/models/__init__.py delete mode 100644 addons/stock_dropshipping/models/stock_dropshipping.py diff --git a/addons/stock_dropshipping/__init__.py b/addons/stock_dropshipping/__init__.py index d7156f09070..67dee8c60db 100644 --- a/addons/stock_dropshipping/__init__.py +++ b/addons/stock_dropshipping/__init__.py @@ -1,3 +1,2 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -import models # noqa diff --git a/addons/stock_dropshipping/models/__init__.py b/addons/stock_dropshipping/models/__init__.py deleted file mode 100644 index 16c708eba5a..00000000000 --- a/addons/stock_dropshipping/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -import stock_dropshipping # noqa diff --git a/addons/stock_dropshipping/models/stock_dropshipping.py b/addons/stock_dropshipping/models/stock_dropshipping.py deleted file mode 100644 index 0c2e2424fa0..00000000000 --- a/addons/stock_dropshipping/models/stock_dropshipping.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding: utf-8 -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from openerp import models, api - -class AccountInvoice(models.Model): - _inherit = 'account.invoice' - - @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)