mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[FIX] rma_scrap: various fixes
This commit is contained in:
committed by
SergiCForgeFlow
parent
70289bdadd
commit
0f59a8048f
@@ -8,12 +8,8 @@ class RmaOrder(models.Model):
|
||||
|
||||
def _compute_scrap_count(self):
|
||||
for order in self:
|
||||
moves = (
|
||||
order.mapped("rma_line_ids.move_ids")
|
||||
.filtered(lambda m: m.is_rma_scrap)
|
||||
.move_line_ids
|
||||
)
|
||||
order.scrap_count = len(moves)
|
||||
scraps = order.mapped("rma_line_ids.scrap_ids")
|
||||
order.scrap_count = len(scraps)
|
||||
|
||||
scrap_count = fields.Integer(compute="_compute_scrap_count", string="# Scrap")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user