diff --git a/rma_account/demo/rma_operation.xml b/rma_account/demo/rma_operation.xml index a312d6db..be6fd118 100644 --- a/rma_account/demo/rma_operation.xml +++ b/rma_account/demo/rma_operation.xml @@ -17,6 +17,7 @@ no customer + @@ -26,6 +27,7 @@ no no supplier + diff --git a/rma_account/models/rma_order_line.py b/rma_account/models/rma_order_line.py index 3230c1a7..81789c18 100644 --- a/rma_account/models/rma_order_line.py +++ b/rma_account/models/rma_order_line.py @@ -177,9 +177,8 @@ class RmaOrderLine(models.Model): @api.onchange('operation_id') def _onchange_operation_id(self): result = super(RmaOrderLine, self)._onchange_operation_id() - if not self.operation_id: - return result - self.refund_policy = self.operation_id.refund_policy + if self.operation_id: + self.refund_policy = self.operation_id.refund_policy or 'no' return result @api.multi diff --git a/rma_account/views/rma_order_line_view.xml b/rma_account/views/rma_order_line_view.xml index 50b1b344..166b9c16 100644 --- a/rma_account/views/rma_order_line_view.xml +++ b/rma_account/views/rma_order_line_view.xml @@ -49,13 +49,18 @@ + +