[IMP] views bugfixes

bzr revid: fp@tinyerp.com-20120522145433-ajupwx0tpgyp5il4
This commit is contained in:
Fabien Pinckaers 2012-05-22 16:54:33 +02:00
parent eb694a09ec
commit 8d588acf49
3 changed files with 5 additions and 4 deletions

View File

@ -37,9 +37,9 @@ class res_partner(osv.osv):
_columns = {
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
'Leads and Opportunities', domain="[('state','in', ('draft','open','pending'))]"),
'Leads and Opportunities', domain=[('state','in', ('draft','open','pending'))]),
'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
'Meetings', domain="[('date','>=', time.strftime('%Y-%m-%d 00:00:00'))]"),
'Meetings'),
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
'Phonecalls'),
'opportunity_count': fields.function(_opportunity_meeting_count, string="Opportunity", type='integer', multi='opp_meet'),

View File

@ -33,5 +33,6 @@ class res_partner(osv.osv):
_columns = {
'sale_order_count': fields.function(_sale_order_count, string='# of Sales Order', type='integer'),
'sale_order_ids': fields.one2many('sale.order','partner_id','Sales Order')
}

View File

@ -36,7 +36,7 @@ class product_product(osv.osv):
], ['product_id'], ['product_id'])
for move in moves:
product_id = move['product_id'][0]
res[product_id][reception_count] = move['product_id_count']
res[product_id]['reception_count'] = move['product_id_count']
moves = move_pool.read_group(cr, uid, [
('product_id', 'in', ids),
('picking_id.type', '=', 'out'),
@ -44,7 +44,7 @@ class product_product(osv.osv):
], ['product_id'], ['product_id'])
for move in moves:
product_id = move['product_id'][0]
res[product_id][reception_count] = move['product_id_count']
res[product_id]['reception_count'] = move['product_id_count']
return res
def get_product_accounts(self, cr, uid, product_id, context=None):