[FIX] stock: put back required=True on company_id field of picking and stock move
[REF] stock_location: removed the chained_company_id stuff bzr revid: qdp-launchpad@tinyerp.com-20100616100818-uihigpv4fklgxbdz
This commit is contained in:
parent
016c096d9c
commit
4c1ac43aa2
|
@ -602,7 +602,7 @@ class stock_picking(osv.osv):
|
|||
("2binvoiced", "To Be Invoiced"),
|
||||
("none", "Not from Picking")], "Invoice Status",
|
||||
select=True, required=True, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'company_id': fields.many2one('res.company', 'Company', select=1),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, select=1),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda self, cr, uid, context: '/',
|
||||
|
@ -1380,7 +1380,7 @@ class stock_move(osv.osv):
|
|||
\nThe state is \'Waiting\' if the move is waiting for another one.'),
|
||||
'price_unit': fields.float('Unit Price',
|
||||
digits_compute= dp.get_precision('Account')),
|
||||
'company_id': fields.many2one('res.company', 'Company', select=1),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, select=1),
|
||||
'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner"),
|
||||
'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order"),
|
||||
'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"),
|
||||
|
|
|
@ -68,7 +68,7 @@ class procurement_order(osv.osv):
|
|||
origin = (proc.origin or proc.name or '').split(':')[0] +':'+line.name
|
||||
picking_id = self.pool.get('stock.picking').create(cr, uid, {
|
||||
'origin': origin,
|
||||
'company_id': line.chained_company_id and line.chained_company_id.id or False,
|
||||
'company_id': line.company_id and line.company_id.id or False,
|
||||
'type': line.picking_type,
|
||||
'stock_journal_id': line.journal_id and line.journal_id.id or False,
|
||||
'move_type': 'one',
|
||||
|
@ -79,7 +79,7 @@ class procurement_order(osv.osv):
|
|||
move_id = self.pool.get('stock.move').create(cr, uid, {
|
||||
'name': line.name,
|
||||
'picking_id': picking_id,
|
||||
'company_id': line.chained_company_id and line.chained_company_id.id or False,
|
||||
'company_id': line.company_id and line.company_id.id or False,
|
||||
'product_id': proc.product_id.id,
|
||||
'date_planned': proc.date_planned,
|
||||
'product_qty': proc.product_qty,
|
||||
|
|
|
@ -40,7 +40,6 @@ class stock_location_path(osv.osv):
|
|||
("none", "Not from Picking")], "Invoice Status",
|
||||
required=True,),
|
||||
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
|
||||
'chained_company_id': fields.many2one('res.company', 'Chained Company', help='Set here the belonging company of the chained move'),
|
||||
'auto': fields.selection(
|
||||
[('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')],
|
||||
'Automatic Move',
|
||||
|
@ -73,7 +72,6 @@ class product_pulled_flow(osv.osv):
|
|||
'company_id': fields.many2one('res.company', 'Company', help="Is used to know to which company belong packings and moves"),
|
||||
'partner_address_id': fields.many2one('res.partner.address', 'Partner Address'),
|
||||
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
|
||||
'chained_company_id': fields.many2one('res.company', 'Chained Company', help='Set here the belonging company of the chained move'),
|
||||
'product_id':fields.many2one('product.product','Product'),
|
||||
'invoice_state': fields.selection([
|
||||
("invoiced", "Invoiced"),
|
||||
|
@ -120,7 +118,7 @@ class stock_location(osv.osv):
|
|||
if product:
|
||||
for path in product.path_ids:
|
||||
if path.location_from_id.id == location.id:
|
||||
return path.location_dest_id, path.auto, path.delay, path.journal_id and path.journal_id.id or False, path.chained_company_id and path.chained_companyd_id.id or False, path.picking_type
|
||||
return path.location_dest_id, path.auto, path.delay, path.journal_id and path.journal_id.id or False, path.company_id and path.company_id.id or False, path.picking_type
|
||||
return super(stock_location, self).chained_location_get(cr, uid, location, partner, product, context)
|
||||
stock_location()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue