[FIX] purchase: supplier invoice and purchase order count
Value of purchase_order_count and supplier_invoice_count should be coherant with the behaviour of the button on partner form: count records for the contact of the company as well. Fixes #4224
This commit is contained in:
parent
e2ea82506e
commit
a9b4c56343
|
@ -30,8 +30,8 @@ class res_partner(osv.osv):
|
||||||
Invoice = self.pool['account.invoice']
|
Invoice = self.pool['account.invoice']
|
||||||
return {
|
return {
|
||||||
partner_id: {
|
partner_id: {
|
||||||
'purchase_order_count': PurchaseOrder.search_count(cr,uid, [('partner_id', '=', partner_id)], context=context),
|
'purchase_order_count': PurchaseOrder.search_count(cr,uid, [('partner_id', 'child_of', partner_id)], context=context),
|
||||||
'supplier_invoice_count': Invoice.search_count(cr,uid, [('partner_id', '=', partner_id), ('type','=','in_invoice')], context=context)
|
'supplier_invoice_count': Invoice.search_count(cr,uid, [('partner_id', 'child_of', partner_id), ('type','=','in_invoice')], context=context)
|
||||||
}
|
}
|
||||||
for partner_id in ids
|
for partner_id in ids
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue