mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[MIG] rma_repair: Migration to 14.0
This commit is contained in:
committed by
JasminSForgeFlow
parent
2463db943b
commit
f9f251fdd5
@@ -102,16 +102,14 @@ class RmaOrderLine(models.Model):
|
||||
)
|
||||
def _compute_qty_to_pay(self):
|
||||
for rec in self:
|
||||
qty_to_pay = 0.0
|
||||
if rec.delivery_policy == "repair":
|
||||
qty_to_pay = 0.0
|
||||
for repair in rec.repair_ids.filtered(
|
||||
lambda r: r.invoice_method != "none"
|
||||
and r.invoice_status != "posted"
|
||||
):
|
||||
qty_to_pay += repair.product_qty
|
||||
rec.qty_to_pay = qty_to_pay
|
||||
else:
|
||||
rec.qty_to_pay = 0.0
|
||||
rec.qty_to_pay = qty_to_pay
|
||||
|
||||
def action_view_repair_order(self):
|
||||
action = self.env.ref("repair.action_repair_order_tree")
|
||||
|
||||
@@ -55,6 +55,7 @@ class RmaLineMakeRepair(models.TransientModel):
|
||||
return res
|
||||
|
||||
def make_repair_order(self):
|
||||
self.ensure_one()
|
||||
res = []
|
||||
repair_obj = self.env["repair.order"]
|
||||
for item in self.item_ids:
|
||||
@@ -142,8 +143,8 @@ class RmaLineMakeRepairItem(models.TransientModel):
|
||||
"invoice for this repair order.",
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _prepare_repair_order(self, rma_line):
|
||||
self.ensure_one()
|
||||
location_dest = (
|
||||
self.location_dest_id
|
||||
if not self.to_refurbish
|
||||
|
||||
Reference in New Issue
Block a user