bugfix_picking_seq
bzr revid: fp@tinyerp.com-20090227070459-2ea2616c1qoizply
This commit is contained in:
parent
64195bf0b7
commit
c48a9565f7
|
@ -178,6 +178,7 @@ class account_invoice(osv.osv):
|
|||
move[line.move_id.id] = True
|
||||
for line in r.line_id:
|
||||
move[line.move_id.id] = True
|
||||
|
||||
invoice_ids = []
|
||||
if move:
|
||||
invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)
|
||||
|
|
|
@ -395,6 +395,10 @@ class stock_picking(osv.osv):
|
|||
res[pick]['max_date'] = dt2
|
||||
return res
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
if 'name' not in vals:
|
||||
vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking')
|
||||
return super(stock_picking, self).create(cr, user, vals, context)
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Reference', size=64, select=True),
|
||||
|
@ -432,7 +436,7 @@ class stock_picking(osv.osv):
|
|||
select=True, required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda self,cr,uid,context: self.pool.get('ir.sequence').get(cr, uid, 'stock.picking'),
|
||||
'name': lambda self,cr,uid,context: '/',
|
||||
'active': lambda *a: 1,
|
||||
'state': lambda *a: 'draft',
|
||||
'move_type': lambda *a: 'direct',
|
||||
|
|
Loading…
Reference in New Issue