[14.0][IMP] added default operation on rma group, easy setup before rma lines created (#452)

* [14.0][IMP] added default operation on rma group, easy setup before rma lines created

* [IMP] added fields for default route created by wizard on rma group

* fix: get right price after create rma order line
This commit is contained in:
ChrisOForgeFlow
2023-10-27 07:41:54 -05:00
committed by AaronHForgeFlow
parent efc2681881
commit 608f2910dc
5 changed files with 162 additions and 48 deletions

View File

@@ -739,13 +739,25 @@ class RmaOrderLine(models.Model):
return result
self.receipt_policy = self.operation_id.receipt_policy
self.delivery_policy = self.operation_id.delivery_policy
self.in_warehouse_id = self.operation_id.in_warehouse_id
self.out_warehouse_id = self.operation_id.out_warehouse_id
self.location_id = (
self.operation_id.location_id or self.in_warehouse_id.lot_rma_id
self.customer_to_supplier = (
self.rma_id.customer_to_supplier or self.operation_id.customer_to_supplier
)
self.customer_to_supplier = self.operation_id.customer_to_supplier
self.supplier_to_customer = self.operation_id.supplier_to_customer
self.supplier_to_customer = (
self.rma_id.supplier_to_customer or self.operation_id.supplier_to_customer
)
self.in_warehouse_id = (
self.rma_id.in_warehouse_id or self.operation_id.in_warehouse_id
)
self.out_warehouse_id = (
self.rma_id.out_warehouse_id or self.operation_id.out_warehouse_id
)
self.location_id = (
self.rma_id.location_id
or self.operation_id.location_id
or self.in_warehouse_id.lot_rma_id
)
self.in_route_id = self.rma_id.in_route_id or self.operation_id.in_route_id
self.out_route_id = self.rma_id.out_route_id or self.operation_id.out_route_id
return result
@api.depends("operation_id")