[FIX] stock

bzr revid: hmo@tinyerp.com-20100707090522-xthwqspg9vh4e46j
This commit is contained in:
UCO(OpenERP) 2010-07-07 14:35:22 +05:30 committed by Harry (OpenERP)
parent 2572e7d062
commit bfc4a3a021
7 changed files with 10 additions and 8 deletions

View File

@ -170,8 +170,8 @@ class product_product(osv.osv):
context = {}
res = super(product_product, self).view_header_get(cr, user, view_id, view_type, context)
if res: return res
if (context.get('location', False)):
return _('Products: ')+self.pool.get('stock.location').browse(cr, user, context['location'], context).name
if (context.get('active_id', False)) and (context.get('active_model') == 'stock.location'):
return _('Products: ')+self.pool.get('stock.location').browse(cr, user, context['active_id'], context).name
return res
def get_product_available(self, cr, uid, ids, context=None):

View File

@ -208,7 +208,7 @@
<para style="terp_default_Centre_8">[[ formatLang(picking.min_date,date_time = True) ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ picking.weight or '']] </para>
<para style="terp_default_Centre_8">[[ 'weight' in picking._columns.keys() and picking.weight or '']] </para>
</td>
</tr>
</blockTable>

View File

@ -72,6 +72,7 @@ class report_stock_picking(osv.osv):
sp.address_id as partner_id,
to_date(to_char(sp.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY') as date,
count(sm.id) as nbr,
count(sp.id) as nbp,
sum(sm.product_qty*u.factor) as product_qty,
sum(sm.product_uos_qty) as product_uos_qty,
sm.product_id as product_id,

View File

@ -22,3 +22,4 @@
"access_report_delivery_products_planned","report.delivery.products.planned","model_report_delivery_products_planned","stock.group_stock_user",1,1,1,1
"access_report_stock_move","report.stock.move","model_report_stock_move","stock.group_stock_user",1,1,1,1
"access_report_stock_inventory","report.stock.inventory","model_report_stock_inventory","stock.group_stock_user",1,1,1,1
"access_report_stock_picking","report.stock.picking","model_report_stock_picking","stock.group_stock_user",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
22 access_report_delivery_products_planned report.delivery.products.planned model_report_delivery_products_planned stock.group_stock_user 1 1 1 1
23 access_report_stock_move report.stock.move model_report_stock_move stock.group_stock_user 1 1 1 1
24 access_report_stock_inventory report.stock.inventory model_report_stock_inventory stock.group_stock_user 1 1 1 1
25 access_report_stock_picking report.stock.picking model_report_stock_picking stock.group_stock_user 1 1 1 1

View File

@ -1008,6 +1008,9 @@ class stock_picking(osv.osv):
return res
def test_done(self, cr, uid, ids, context=None):
""" Test whether the move lines are done or not.
@return: True or False
"""
ok = False
for pick in self.browse(cr, uid, ids, context=context):
if not pick.move_lines:

View File

@ -1630,9 +1630,6 @@
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<label/>
<button name="%(track_line)d" string="Split in production lots"
groups="base.group_extended"
type="action" icon="terp-stock_effects-object-colorize"/>
<separator colspan="4" string="Move State"/>
<field name="state"/>
<group col="5" colspan="2">

View File

@ -44,8 +44,8 @@ class stock_inventory_line_split(osv.osv_memory):
@return: A dictionary which of fields with values.
"""
record_id = context and context.get('active_id',False)
res = super(stock_inventory_line_split, self).default_get(cr, uid, fields, context=context)
line= self.pool.get('stock.inventory.line').browse(cr, uid, record_id)
res = {}
line = self.pool.get('stock.inventory.line').browse(cr, uid, record_id)
if 'product_id' in fields:
res.update({'product_id':line.product_id.id})
return res