[MeRGE] merged with trunk up to revision 9427.

bzr revid: qdp-launchpad@openerp.com-20140508100622-v90tn9bhzdgic6cd
This commit is contained in:
Quentin (OpenERP) 2014-05-08 12:06:22 +02:00
commit ce7a7f570a
4 changed files with 20 additions and 2 deletions

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\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"
"Language: zh_CN\n"

View File

@ -18,6 +18,7 @@
#
##############################################################################
import stock_picking
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -18,7 +18,7 @@
<div class="oe_right oe_button_box">
<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" >
<field string="Claims" name="claim_count" widget="statinfo"/>
<field string="Claims" name="claim_count_out" widget="statinfo"/>
</button>
</div>
</xpath>

View File

@ -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'),
}