[MERGE] forward port of branch 7.0 up to 9fe040e
This commit is contained in:
commit
d73eeab5ba
|
@ -154,17 +154,8 @@ class account_invoice_report(osv.osv):
|
||||||
WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text])
|
WHEN ai.type::text = ANY (ARRAY['out_refund'::character varying::text, 'in_invoice'::character varying::text])
|
||||||
THEN - ai.residual
|
THEN - ai.residual
|
||||||
ELSE ai.residual
|
ELSE ai.residual
|
||||||
END / CASE
|
END / (SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id) *
|
||||||
WHEN (( SELECT count(l.id) AS count
|
count(*) AS residual,
|
||||||
FROM account_invoice_line l
|
|
||||||
LEFT JOIN account_invoice a ON a.id = l.invoice_id
|
|
||||||
WHERE a.id = ai.id)) <> 0
|
|
||||||
THEN ( SELECT count(l.id) AS count
|
|
||||||
FROM account_invoice_line l
|
|
||||||
LEFT JOIN account_invoice a ON a.id = l.invoice_id
|
|
||||||
WHERE a.id = ai.id)
|
|
||||||
ELSE 1::bigint
|
|
||||||
END::numeric AS residual,
|
|
||||||
ai.commercial_partner_id as commercial_partner_id,
|
ai.commercial_partner_id as commercial_partner_id,
|
||||||
partner.country_id
|
partner.country_id
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -649,7 +649,7 @@
|
||||||
var form = this.editor.form;
|
var form = this.editor.form;
|
||||||
var last_field = _(form.fields_order).chain()
|
var last_field = _(form.fields_order).chain()
|
||||||
.map(function (name) { return form.fields[name]; })
|
.map(function (name) { return form.fields[name]; })
|
||||||
.filter(function (field) { return field.$el.is(':visible'); })
|
.filter(function (field) { return field.$el.is(':visible') && !field.get('effective_readonly'); })
|
||||||
.last()
|
.last()
|
||||||
.value();
|
.value();
|
||||||
// tabbed from last field in form
|
// tabbed from last field in form
|
||||||
|
|
Loading…
Reference in New Issue