[15.0][FIX] rma_sale: fixup of procurement

This commit is contained in:
DavidJForgeFlow
2022-07-11 10:17:38 +02:00
committed by Florian da Costa
parent 60a9d6decb
commit 284891c09b
2 changed files with 6 additions and 3 deletions

View File

@@ -1055,7 +1055,7 @@ class TestRma(common.TransactionCase):
rma_lines.write({"receipt_policy": "delivered"})
self.assertEqual(sum(rma_lines.mapped("qty_to_receive")), 0)
wizard = self.rma_make_picking.with_context(
{
**{
"active_ids": rma_lines.ids,
"active_model": "rma.order.line",
"picking_type": "incoming",

View File

@@ -150,8 +150,11 @@ class RmaMakePicking(models.TransientModel):
product = item.line_id.product_id
if float_compare(qty, 0, product.uom_id.rounding) != 1:
raise ValidationError(
_("No quantity to transfer on %s shipment of product %s.")
% (_(picking_type), product.default_code or product.name)
_(
"No quantity to transfer on %(arg1)s shipment of product %(arg2)s.",
arg1=_(picking_type),
arg2=product.default_code or product.name,
)
)
# create picking
procurements = []