[FIX] add missing claim_count field to stock.picking.out
The claim_count field was incorrectly added into addon stock instead of addon claim_from_delivery. The commit adding the claim_count field in stock.py was reverted, but claim_count is still needed in claim_delivery_view.xml. bzr revid: ged@openerp.com-20140508072741-sr3a9ishpqtkczlq
This commit is contained in:
parent
80aa26963e
commit
b73e2e95ec
|
@ -18,6 +18,7 @@
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
import stock_picking
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
from openerp.osv import fields, osv
|
||||||
|
|
||||||
|
|
||||||
|
class stock_picking(osv.osv):
|
||||||
|
_inherit = 'stock.picking'
|
||||||
|
|
||||||
|
def _claim_count(self, cr, uid, ids, field_name, arg, context=None):
|
||||||
|
Claim = self.pool['crm.claim']
|
||||||
|
return {
|
||||||
|
id: Claim.search_count(cr, uid, [('ref', '=',('stock.picking.out,' + str(ids[0])))], context=context)
|
||||||
|
for id in ids
|
||||||
|
}
|
||||||
|
|
||||||
|
_columns = {
|
||||||
|
'claim_count': fields.function(_claim_count, string='Claims', type='integer'),
|
||||||
|
}
|
||||||
|
|
||||||
|
class stock_picking_out(osv.osv):
|
||||||
|
_inherit = 'stock.picking.out'
|
||||||
|
|
||||||
|
def _claim_count(self, cr, uid, ids, field_name, arg, context=None):
|
||||||
|
return super(stock_picking_out, self)._claim_count(cr, uid, ids, field_name, arg, context=context)
|
||||||
|
|
||||||
|
_columns = {
|
||||||
|
'claim_count': fields.function(_claim_count, string='Claims', type='integer'),
|
||||||
|
}
|
Loading…
Reference in New Issue