mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'fix/15.0/rma_sale__use_union_operator' into '15.0'
fix/15.0/rma_sale__use_union_operator into 15.0 See merge request hibou-io/hibou-odoo/suite!1245
This commit is contained in:
@@ -181,12 +181,12 @@ class RMA(models.Model):
|
|||||||
else:
|
else:
|
||||||
qty_remaining = 0
|
qty_remaining = 0
|
||||||
sale_line.with_context(rma_done=True).write({'product_uom_qty': sale_line_qty})
|
sale_line.with_context(rma_done=True).write({'product_uom_qty': sale_line_qty})
|
||||||
sale_orders += sale_line.order_id
|
sale_orders |= sale_line.order_id
|
||||||
if qty_remaining:
|
if qty_remaining:
|
||||||
warnings.append((rma, rma.sale_order_id, rma_line, qty_remaining))
|
warnings.append((rma, rma.sale_order_id, rma_line, qty_remaining))
|
||||||
# Try to invoice if we don't already have an invoice (e.g. from resetting to draft)
|
# Try to invoice if we don't already have an invoice (e.g. from resetting to draft)
|
||||||
if sale_orders and rma.template_id.invoice_done and not rma.invoice_ids:
|
if sale_orders and rma.template_id.invoice_done and not rma.invoice_ids:
|
||||||
rma.invoice_ids += rma._sale_invoice_done(sale_orders)
|
rma.invoice_ids |= rma._sale_invoice_done(sale_orders)
|
||||||
if warnings:
|
if warnings:
|
||||||
return {'warning': _('Could not reduce all ordered qty:\n %s' % '\n'.join(
|
return {'warning': _('Could not reduce all ordered qty:\n %s' % '\n'.join(
|
||||||
['%s %s %s : %s' % (w[0].name, w[1].name, w[2].product_id.display_name, w[3]) for w in warnings]))}
|
['%s %s %s : %s' % (w[0].name, w[1].name, w[2].product_id.display_name, w[3]) for w in warnings]))}
|
||||||
|
|||||||
Reference in New Issue
Block a user