mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-10-26 16:00:05 -05:00
Merge branch 'bugfix/orders_to_invoice_delivery_only' into 'master'
[FIX] Get search domain for orders to invoice in separate method, in order to... See merge request flectra-hq/flectra!306
This commit is contained in:
commit
a1bee30ff0
1 file changed
+3
-3
@@ -54,9 +54,9 @@ class SaleOrder(models.Model):
|
||||
for possible refunds created directly from existing invoices. This is necessary since such a
|
||||
refund is not directly linked to the SO.
|
||||
"""
|
||||
# Ignore the status of the deposit product
|
||||
deposit_product_id = self.env['sale.advance.payment.inv']._default_product_id()
|
||||
line_invoice_status_all = [(d['order_id'][0], d['invoice_status']) for d in self.env['sale.order.line'].read_group([('order_id', 'in', self.ids), ('product_id', '!=', deposit_product_id.id)], ['order_id', 'invoice_status'], ['order_id', 'invoice_status'], lazy=False)]
|
||||
line_domain = self._get_domain_for_invoice_status()
|
||||
line_invoice_status_all = [(d['order_id'][0], d['invoice_status']) for d in self.env['sale.order.line'].read_group(
|
||||
line_domain, ['order_id', 'invoice_status'], ['order_id', 'invoice_status'], lazy=False)]
|
||||
for order in self:
|
||||
invoice_ids = order.order_line.mapped('invoice_lines').mapped('invoice_id').filtered(lambda r: r.type in ['out_invoice', 'out_refund'])
|
||||
# Search for invoices which have been 'cancelled' (filter_refund = 'modify' in
|
||||
|
||||
Reference in new issue
Block a user