mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[FIX] include anglo-saxon price unit calculation in refunds.
Otherwise the anglo saxon entries won't be correct. For example, the Interim (Delivered) account should balance after receiving and triggering a refund on a customer rma.
This commit is contained in:
committed by
Carlos Vallés Fuster
parent
b688c7faae
commit
4f59aea9e3
@@ -58,6 +58,18 @@ class RmaOrderLine(models.Model):
|
||||
pickings |= move.picking_id
|
||||
return pickings
|
||||
|
||||
@api.model
|
||||
def _get_in_moves(self):
|
||||
moves = self.env["stock.move"]
|
||||
for move in self.move_ids:
|
||||
first_usage = move._get_first_usage()
|
||||
last_usage = move._get_last_usage()
|
||||
if last_usage == "internal" and first_usage != "internal":
|
||||
moves |= move
|
||||
elif last_usage == "supplier" and first_usage == "customer":
|
||||
moves |= moves
|
||||
return moves
|
||||
|
||||
@api.model
|
||||
def _get_out_pickings(self):
|
||||
pickings = self.env["stock.picking"]
|
||||
|
||||
Reference in New Issue
Block a user