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)