Skip to content
Snippets Groups Projects
Commit 97da3b99 authored by Quentin De Paoli's avatar Quentin De Paoli
Browse files

Revert "[FIX] purchase: fix dropship use case in anglo saxon with perpetual valuation."

This reverts commit a57b10db. 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
parent a57b10db
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment