Skip to content

Commit ce7a7f5

Browse files
author
Quentin (OpenERP)
committed
[MeRGE] merged with trunk up to revision 9427.
bzr revid: [email protected]
2 parents 70eb74a + 319ed3d commit ce7a7f5

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

addons/calendar/i18n/zh_CN.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ msgstr ""
1414
"MIME-Version: 1.0\n"
1515
"Content-Type: text/plain; charset=UTF-8\n"
1616
"Content-Transfer-Encoding: 8bit\n"
17-
"X-Launchpad-Export-Date: 2014-05-07 06:27+0000\n"
17+
"X-Launchpad-Export-Date: 2014-05-08 05:38+0000\n"
1818
"X-Generator: Launchpad (build 16996)\n"
1919
"Language: zh_CN\n"
2020

addons/claim_from_delivery/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#
1919
##############################################################################
2020

21+
import stock_picking
2122

2223
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2324

addons/claim_from_delivery/claim_delivery_view.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<div class="oe_right oe_button_box">
1919
<button class="oe_inline oe_stat_button" type="action" attrs="{'invisible': [('picking_type_id.code', '!=', 'outgoing')]}"
2020
name="%(action_claim_from_delivery)d" icon="fa-comments" >
21-
<field string="Claims" name="claim_count" widget="statinfo"/>
21+
<field string="Claims" name="claim_count_out" widget="statinfo"/>
2222
</button>
2323
</div>
2424
</xpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from openerp.osv import fields, osv
2+
3+
4+
class stock_picking(osv.osv):
5+
_inherit = 'stock.picking'
6+
7+
def _claim_count_out(self, cr, uid, ids, field_name, arg, context=None):
8+
Claim = self.pool['crm.claim']
9+
return {
10+
id: Claim.search_count(cr, uid, [('ref', '=',('stock.picking,' + str(ids[0])))], context=context)
11+
for id in ids
12+
}
13+
14+
_columns = {
15+
'claim_count_out': fields.function(_claim_count_out, string='Claims', type='integer'),
16+
}
17+

0 commit comments

Comments
 (0)