[FIX] Stock : Wizard improvements from Lionel
lp bug: https://launchpad.net/bugs/474340 fixed bzr revid: jvo@tinyerp.com-20091120150156-g3384ajf55082yxk
This commit is contained in:
@@ -1048,7 +1048,7 @@ class stock_move(osv.osv):
|
||||
product = self.pool.get('product.product').browse(cr, uid, [prod_id])[0]
|
||||
uos_id = product.uos_id and product.uos_id.id or False
|
||||
result = {
|
||||
'name': product.name,
|
||||
'name': product.partner_ref,
|
||||
'product_uom': product.uom_id.id,
|
||||
'product_uos': uos_id,
|
||||
'product_qty': 1.00,
|
||||
|
||||
@@ -65,7 +65,7 @@ def _get_moves(self, cr, uid, data, context):
|
||||
|
||||
_moves_arch_lst.append('<field name="move%s" />' % (m.id,))
|
||||
_moves_fields['move%s' % m.id] = {
|
||||
'string': '%s - %s' % (_to_xml(m.product_id.code or '/'), _to_xml(m.product_id.name)),
|
||||
'string': _to_xml(m.name),
|
||||
'type' : 'float', 'required' : True, 'default' : make_default(quantity)}
|
||||
|
||||
if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
|
||||
|
||||
@@ -47,7 +47,7 @@ def _get_returns(self, cr, uid, data, context):
|
||||
for m in [line for line in pick.move_lines]:
|
||||
quantity=m.product_qty
|
||||
arch_lst.append('<field name="return%s"/>\n<newline/>' % (m.id,))
|
||||
fields['return%s' % m.id]={'string':m.product_id.name, 'type':'float', 'required':True, 'default':make_default(quantity)}
|
||||
fields['return%s' % m.id]={'string':m.name, 'type':'float', 'required':True, 'default':make_default(quantity)}
|
||||
res.setdefault('returns', []).append(m.id)
|
||||
arch_lst.append('<field name="invoice_state"/>\n<newline/>')
|
||||
if pick.invoice_state=='invoiced':
|
||||
|
||||
Reference in New Issue
Block a user