|
@@ -112,8 +112,7 @@ def get_account_invoice_line_out_invoice(): #analisis de venta
|
|
|
template.product_brand_id,
|
|
|
brand.name,
|
|
|
line.discount,
|
|
|
- line.name,
|
|
|
- sales_partner.name
|
|
|
+ line.name
|
|
|
FROM account_invoice AS invoice
|
|
|
LEFT JOIN account_invoice_line AS line
|
|
|
ON line.invoice_id = invoice.id
|
|
@@ -138,10 +137,6 @@ def get_account_invoice_line_out_invoice(): #analisis de venta
|
|
|
ON partner.id = invoice.partner_id
|
|
|
LEFT JOIN product_brand AS brand
|
|
|
ON brand.id = template.product_brand_id
|
|
|
- LEFT JOIN res_users AS sales_user
|
|
|
- ON sales_user.id = invoice.user_id
|
|
|
- LEFT JOIN res_partner AS sales_partner
|
|
|
- ON sales_partner.id = sales_user.partner_id
|
|
|
WHERE invoice.state NOT IN ('draft', 'cancel')
|
|
|
AND invoice.type = 'out_invoice'
|
|
|
GROUP BY
|
|
@@ -164,8 +159,7 @@ def get_account_invoice_line_out_invoice(): #analisis de venta
|
|
|
invoice.journal_id,
|
|
|
template.product_brand_id,
|
|
|
brand.name,
|
|
|
- line.name,
|
|
|
- sales_partner.name
|
|
|
+ line.name
|
|
|
'''
|
|
|
|
|
|
query_without_brand = '''
|
|
@@ -197,8 +191,7 @@ def get_account_invoice_line_out_invoice(): #analisis de venta
|
|
|
(array_agg(attr_value.name)) AS attr_value,
|
|
|
(array_agg(attr.id)) AS attr,
|
|
|
line.discount,
|
|
|
- line.name,
|
|
|
- sales_partner.name
|
|
|
+ line.name
|
|
|
FROM account_invoice AS invoice
|
|
|
LEFT JOIN account_invoice_line AS line
|
|
|
ON line.invoice_id = invoice.id
|
|
@@ -219,8 +212,6 @@ def get_account_invoice_line_out_invoice(): #analisis de venta
|
|
|
ON history.product_template_id = product.product_tmpl_id
|
|
|
LEFT JOIN res_currency_rate AS rate
|
|
|
ON rate.currency_id = invoice.currency_id
|
|
|
- LEFT JOIN res_partner AS partner
|
|
|
- ON partner.id = invoice.partner_id
|
|
|
WHERE invoice.state NOT IN ('draft', 'cancel')
|
|
|
AND invoice.type = 'out_invoice'
|
|
|
GROUP BY
|
|
@@ -241,8 +232,7 @@ def get_account_invoice_line_out_invoice(): #analisis de venta
|
|
|
product.id,
|
|
|
invoice.company_id,
|
|
|
invoice.journal_id,
|
|
|
- line.name,
|
|
|
- sales_partner.name
|
|
|
+ line.name
|
|
|
'''
|
|
|
|
|
|
r.cr.execute(validate_brand)
|
|
@@ -279,7 +269,6 @@ def get_account_invoice_line_out_invoice(): #analisis de venta
|
|
|
'brand_name': j[23],
|
|
|
'discount': j[24],
|
|
|
'name': j[25],
|
|
|
- 'vendor_name': j[26],
|
|
|
} for j in r.cr.fetchall()
|
|
|
]
|
|
|
else:
|
|
@@ -310,7 +299,6 @@ def get_account_invoice_line_out_invoice(): #analisis de venta
|
|
|
'attribute_ids': j[21],
|
|
|
'discount': j[22],
|
|
|
'name': j[23],
|
|
|
- 'vendor_name': j[24],
|
|
|
} for j in r.cr.fetchall()
|
|
|
]
|
|
|
|