|
|
@ -38,11 +38,14 @@ class ContractContract(models.Model): |
|
|
|
|
|
|
|
# Check Invoice and If It's Not Created then Updated Qty |
|
|
|
for order_id in order_ids: |
|
|
|
invoice_ids = order_id.order_line.mapped('invoice_lines') |
|
|
|
invoice_ids =\ |
|
|
|
order_id.order_line.mapped('invoice_lines') |
|
|
|
if not invoice_ids: |
|
|
|
for line in order_id.order_line: |
|
|
|
if line.product_id.id == invoice_line_values.get('product_id', False): |
|
|
|
invoice_line_values['quantity'] += line.product_uom_qty |
|
|
|
if line.product_id.id == invoice_line_values.\ |
|
|
|
get('product_id', False): |
|
|
|
invoice_line_values['quantity' |
|
|
|
] += line.product_uom_qty |
|
|
|
|
|
|
|
invoice_values['invoice_line_ids'].append( |
|
|
|
(0, 0, invoice_line_values) |
|
|
|