From 0193e070e83384c9cbda349a29e770219dac2483 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 16 Jul 2012 14:13:10 +0200 Subject: [PATCH] [IMP] pruchase, stock: usability imp bzr revid: qdp-launchpad@openerp.com-20120716121310-ul37v4slifh38aa2 --- addons/purchase/purchase.py | 2 +- addons/purchase/stock.py | 4 +-- addons/stock/stock_view.xml | 29 +++++++++---------- addons/stock_planning/stock_planning_view.xml | 16 +++++----- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index f768f293434..547902b4635 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -167,7 +167,7 @@ class purchase_order(osv.osv): help="Put an address if you want to deliver directly from the supplier to the customer. " \ "Otherwise, keep empty to deliver to your own company." ), - 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}), + 'warehouse_id': fields.many2one('stock.warehouse', 'Destination Warehouse', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',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(STATE_SELECTION, 'Status', 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), diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py index a3de0f0e4dc..b5b708119cc 100644 --- a/addons/purchase/stock.py +++ b/addons/purchase/stock.py @@ -39,8 +39,8 @@ class stock_picking(osv.osv): _columns = { 'purchase_id': fields.many2one('purchase.order', 'Purchase Order', ondelete='set null', select=True), - } + _defaults = { 'purchase_id': False, } @@ -134,6 +134,6 @@ class stock_picking_in(osv.osv): _columns = { 'purchase_id': fields.many2one('purchase.order', 'Purchase Order', ondelete='set null', select=True), - 'warehouse_id': fields.related('purchase_id', 'warehouse_id', type='many2one', relation='stock.warehouse', string='Warehouse'), + 'warehouse_id': fields.related('purchase_id', 'warehouse_id', type='many2one', relation='stock.warehouse', string='Destination Warehouse'), } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 8c0fb1a29e8..934e1e19da0 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -336,29 +336,27 @@ form
- +
+
+
+
+ - - - - - -