[MeRGE] merged with trunk up to revision 9427.
bzr revid: qdp-launchpad@openerp.com-20140508100622-v90tn9bhzdgic6cd
This commit is contained in:
commit
ce7a7f570a
|
@ -14,7 +14,7 @@ msgstr ""
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2014-05-07 06:27+0000\n"
|
"X-Launchpad-Export-Date: 2014-05-08 05:38+0000\n"
|
||||||
"X-Generator: Launchpad (build 16996)\n"
|
"X-Generator: Launchpad (build 16996)\n"
|
||||||
"Language: zh_CN\n"
|
"Language: zh_CN\n"
|
||||||
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div class="oe_right oe_button_box">
|
<div class="oe_right oe_button_box">
|
||||||
<button class="oe_inline oe_stat_button" type="action" attrs="{'invisible': [('picking_type_id.code', '!=', 'outgoing')]}"
|
<button class="oe_inline oe_stat_button" type="action" attrs="{'invisible': [('picking_type_id.code', '!=', 'outgoing')]}"
|
||||||
name="%(action_claim_from_delivery)d" icon="fa-comments" >
|
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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
from openerp.osv import fields, osv
|
||||||
|
|
||||||
|
|
||||||
|
class stock_picking(osv.osv):
|
||||||
|
_inherit = 'stock.picking'
|
||||||
|
|
||||||
|
def _claim_count_out(self, cr, uid, ids, field_name, arg, context=None):
|
||||||
|
Claim = self.pool['crm.claim']
|
||||||
|
return {
|
||||||
|
id: Claim.search_count(cr, uid, [('ref', '=',('stock.picking,' + str(ids[0])))], context=context)
|
||||||
|
for id in ids
|
||||||
|
}
|
||||||
|
|
||||||
|
_columns = {
|
||||||
|
'claim_count_out': fields.function(_claim_count_out, string='Claims', type='integer'),
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue