[IMP] change claim_count in claim_count_out (addon claim_from_delivery)
also, simplify the implementation. The empty method _claim_count in stock_picking_out is due to the weird way inheritance works in openerp, and the fact that stock.picking.out only call the method in its parent bzr revid: ged@openerp.com-20140508075957-lyqvng5i155b28cy
This commit is contained in:
parent
b73e2e95ec
commit
131f91db15
|
@ -18,7 +18,7 @@
|
|||
<div class="oe_right oe_button_box">
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
name="%(action_claim_from_delivery)d" icon="fa-comments" >
|
||||
<field string="Claims" name="claim_count" widget="statinfo"/>
|
||||
<field string="Claims" name="claim_count_out" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
</xpath>
|
||||
|
|
|
@ -12,15 +12,15 @@ class stock_picking(osv.osv):
|
|||
}
|
||||
|
||||
_columns = {
|
||||
'claim_count': fields.function(_claim_count, string='Claims', type='integer'),
|
||||
'claim_count_out': 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)
|
||||
pass
|
||||
|
||||
_columns = {
|
||||
'claim_count': fields.function(_claim_count, string='Claims', type='integer'),
|
||||
'claim_count_out': fields.function(_claim_count, string='Claims', type='integer'),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue