diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py
index b3da6d36..da495e85 100644
--- a/rma_sale/__manifest__.py
+++ b/rma_sale/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "RMA Sale",
- "version": "15.0.1.0.1",
+ "version": "16.0.1.0.0",
"license": "LGPL-3",
"category": "RMA",
"summary": "Links RMA with Sales Orders",
diff --git a/rma_sale/models/rma_order_line.py b/rma_sale/models/rma_order_line.py
index feff0161..9dac20ae 100644
--- a/rma_sale/models/rma_order_line.py
+++ b/rma_sale/models/rma_order_line.py
@@ -201,7 +201,7 @@ class RmaOrderLine(models.Model):
return result
def action_view_origin_sale_order(self):
- action = self.env.ref("sale.action_orders_salesteams")
+ action = self.env.ref("sale.action_orders")
result = action.sudo().read()[0]
order_ids = self.sale_id.ids
result["domain"] = [("id", "in", order_ids)]
diff --git a/rma_sale/tests/test_rma_stock_account_sale.py b/rma_sale/tests/test_rma_stock_account_sale.py
index 3df53471..8562719f 100644
--- a/rma_sale/tests/test_rma_stock_account_sale.py
+++ b/rma_sale/tests/test_rma_stock_account_sale.py
@@ -40,7 +40,7 @@ class TestRmaStockAccountSale(TestRmaStockAccount):
)
cls.so1.action_confirm()
for ml in cls.so1.picking_ids.move_line_ids:
- ml.qty_done = ml.product_uom_qty
+ ml.qty_done = ml.reserved_uom_qty
cls.so1.picking_ids.button_validate()
def test_01_cost_from_so_move(self):
@@ -65,13 +65,13 @@ class TestRmaStockAccountSale(TestRmaStockAccount):
picking = self._receive_rma(rma_line)
# The price is not the standard price, is the value of the outgoing layer
# of the SO
- rma_move_value = picking.move_lines.stock_valuation_layer_ids.value
+ rma_move_value = picking.move_ids.stock_valuation_layer_ids.value
so_move_value = self.so1.picking_ids.mapped(
- "move_lines.stock_valuation_layer_ids"
+ "move_ids.stock_valuation_layer_ids"
)[-1].value
self.assertEqual(rma_move_value, -so_move_value)
# Test the accounts used
- account_move = picking.move_lines.stock_valuation_layer_ids.account_move_id
+ account_move = picking.move_ids.stock_valuation_layer_ids.account_move_id
self.check_accounts_used(
account_move, debit_account="inventory", credit_account="gdni"
)
diff --git a/rma_sale/views/rma_order_line_view.xml b/rma_sale/views/rma_order_line_view.xml
index 4d0f3322..03c5c239 100644
--- a/rma_sale/views/rma_order_line_view.xml
+++ b/rma_sale/views/rma_order_line_view.xml
@@ -71,13 +71,13 @@
name="%(action_rma_order_line_make_sale_order)d"
string="Create Sales Quotation"
class="oe_highlight"
- attrs="{'invisible':['|', '|', ('qty_to_sell', '=', 0), ('state', '!=', 'approved'), ('sale_policy', '=', 'no')]}"
+ attrs="{'invisible':['|', '|', '|', ('qty_to_sell', '=', 0), ('qty_to_sell', '<', 0), ('state', '!=', 'approved'), ('sale_policy', '=', 'no')]}"
type="action"
/>
diff --git a/rma_sale/wizards/rma_add_sale.py b/rma_sale/wizards/rma_add_sale.py
index b44af4a5..d9f3ec4d 100644
--- a/rma_sale/wizards/rma_add_sale.py
+++ b/rma_sale/wizards/rma_add_sale.py
@@ -46,7 +46,7 @@ class RmaAddSale(models.TransientModel):
compute="_compute_lot_domain",
)
lot_domain_ids = fields.Many2many(
- comodel_name="stock.production.lot",
+ comodel_name="stock.lot",
string="Lots Domain",
compute="_compute_lot_domain",
)
@@ -64,7 +64,7 @@ class RmaAddSale(models.TransientModel):
)
rec.show_lot_filter = bool(rec.lot_domain_ids)
- lot_ids = fields.Many2many(comodel_name="stock.production.lot", string="Lots/Serials selected")
+ lot_ids = fields.Many2many(comodel_name="stock.lot", string="Lots/Serials selected")
def select_all(self):
self.ensure_one()
diff --git a/rma_sale/wizards/rma_order_line_make_sale_order_view.xml b/rma_sale/wizards/rma_order_line_make_sale_order_view.xml
index 047b338b..8709ec84 100644
--- a/rma_sale/wizards/rma_order_line_make_sale_order_view.xml
+++ b/rma_sale/wizards/rma_order_line_make_sale_order_view.xml
@@ -14,7 +14,7 @@