'company_id': fields.many2one('res.company', 'Company', readonly=True),
'user_id': fields.many2one('res.users', 'Salesman', readonly=True),
'price_total': fields.float('Total Without Tax', readonly=True),
- 'price_total_tax': fields.float('Total With Tax', readonly=True),
'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),
'currency_rate': fields.float('Currency Rate', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
ail.price_subtotal
end) / cr.rate as price_total,
- sum(case when ai.type in ('out_refund','in_invoice') then
- -ai.amount_total
- else
- ai.amount_total
- end) / (CASE WHEN
- (select count(l.id) from account_invoice_line as l
- left join account_invoice as a ON (a.id=l.invoice_id)
- where a.id=ai.id) <> 0
- THEN
- (select count(l.id) from account_invoice_line as l
- left join account_invoice as a ON (a.id=l.invoice_id)
- where a.id=ai.id)
- ELSE 1
- END) / cr.rate as price_total_tax,
-
(case when ai.type in ('out_refund','in_invoice') then
sum(-ail.price_subtotal)
else
<field name="product_qty" sum="Qty"/>
<!-- <field name="reconciled" sum="# Reconciled"/> -->
<field name="price_total" sum="Total Without Tax"/>
- <field name="price_total_tax" sum="Total With Tax"/>
<field name="residual" sum="Total Residual" invisible="context.get('residual_invisible',False)"/>
<field name="due_delay" sum="Avg. Due Delay" invisible="context.get('residual_invisible',False)"/>
<field name="delay_to_pay" sum="Avg. Delay To Pay" invisible="context.get('residual_invisible',False)"/>