[FIX] (5.0 -6.0)Locations when M2O,should not be among view type--author=GPA(OpenEPP)
bzr revid: vra@tinyerp.com-20100510135426-efb9wllvligbtkr4
This commit is contained in:
parent
fdd2745662
commit
a6c05c04f8
|
@ -161,7 +161,7 @@ class purchase_order(osv.osv):
|
|||
"In this case, it will remove the warehouse link and set the customer location."
|
||||
),
|
||||
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'posted':[('readonly',True)]}),
|
||||
'location_id': fields.many2one('stock.location', 'Destination', required=True),
|
||||
'location_id': fields.many2one('stock.location', 'Destination', required=True, domain=[('usage','<>','view')]),
|
||||
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."),
|
||||
'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Waiting Supplier Ack'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True),
|
||||
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines', states={'approved':[('readonly',True)],'done':[('readonly',True)]}),
|
||||
|
|
|
@ -2051,9 +2051,9 @@ class stock_warehouse(osv.osv):
|
|||
# 'partner_id': fields.many2one('res.partner', 'Owner'),
|
||||
'company_id': fields.many2one('res.company','Company',required=True,select=1),
|
||||
'partner_address_id': fields.many2one('res.partner.address', 'Owner Address'),
|
||||
'lot_input_id': fields.many2one('stock.location', 'Location Input', required=True),
|
||||
'lot_stock_id': fields.many2one('stock.location', 'Location Stock', required=True),
|
||||
'lot_output_id': fields.many2one('stock.location', 'Location Output', required=True),
|
||||
'lot_input_id': fields.many2one('stock.location', 'Location Input', required=True, domain=[('usage','<>','view')]),
|
||||
'lot_stock_id': fields.many2one('stock.location', 'Location Stock', required=True, domain=[('usage','<>','view')]),
|
||||
'lot_output_id': fields.many2one('stock.location', 'Location Output', required=True, domain=[('usage','<>','view')]),
|
||||
}
|
||||
_defaults = {
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c),
|
||||
|
|
Loading…
Reference in New Issue