From e0cb763b87c043a7e02d43c2d890d256762bea05 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 2 Jan 2023 10:54:00 +0100 Subject: [PATCH] [IMP] rma: add description to rma order and copy it over to new lines --- rma/models/rma_order.py | 1 + rma/views/rma_order_view.xml | 23 ++++++++++++------- rma/wizards/rma_add_serial.py | 1 + rma/wizards/rma_add_stock_move.py | 1 + .../rma_order_line_make_supplier_rma.py | 1 + 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/rma/models/rma_order.py b/rma/models/rma_order.py index 4dfccad2..a3352230 100644 --- a/rma/models/rma_order.py +++ b/rma/models/rma_order.py @@ -84,6 +84,7 @@ class RmaOrder(models.Model): reference = fields.Char( string="Partner Reference", help="The partner reference of this RMA order." ) + description = fields.Text() comment = fields.Text("Additional Information") date_rma = fields.Datetime( string="Order Date", index=True, default=lambda self: self._default_date_rma() diff --git a/rma/views/rma_order_view.xml b/rma/views/rma_order_view.xml index d951b8c6..6ba95013 100644 --- a/rma/views/rma_order_view.xml +++ b/rma/views/rma_order_view.xml @@ -91,6 +91,7 @@ + - - - + + + + @@ -134,13 +139,15 @@ - - + + - diff --git a/rma/wizards/rma_add_serial.py b/rma/wizards/rma_add_serial.py index 41362be3..d802ea31 100644 --- a/rma/wizards/rma_add_serial.py +++ b/rma/wizards/rma_add_serial.py @@ -102,6 +102,7 @@ class RmaAddSerialWiz(models.TransientModel): vals = { "partner_id": self.partner_id.id, + "description": self.rma_id.description, "product_id": lot.product_id.id, "lot_id": lot.id, "uom_id": lot.product_id.uom_id.id, diff --git a/rma/wizards/rma_add_stock_move.py b/rma/wizards/rma_add_stock_move.py index 40911194..cfc8fadd 100644 --- a/rma/wizards/rma_add_stock_move.py +++ b/rma/wizards/rma_add_stock_move.py @@ -120,6 +120,7 @@ class RmaAddStockMove(models.TransientModel): ) data = { "partner_id": self.partner_id.id, + "description": self.rma_id.description, "reference_move_id": sm.id, "product_id": sm.product_id.id, "lot_id": lot and lot.id or False, diff --git a/rma/wizards/rma_order_line_make_supplier_rma.py b/rma/wizards/rma_order_line_make_supplier_rma.py index 57e27786..0fcc544d 100644 --- a/rma/wizards/rma_order_line_make_supplier_rma.py +++ b/rma/wizards/rma_order_line_make_supplier_rma.py @@ -113,6 +113,7 @@ class RmaLineMakeSupplierRma(models.TransientModel): ) data = { "partner_id": self.partner_id.id, + "description": self.supplier_rma_id.description, "type": "supplier", "origin": item.line_id.rma_id.name, "customer_address_id": item.line_id.delivery_address_id.id