[IMP] pruchase, stock: usability imp

bzr revid: qdp-launchpad@openerp.com-20120716121310-ul37v4slifh38aa2
This commit is contained in:
Quentin (OpenERP) 2012-07-16 14:13:10 +02:00
parent c8d8fa16ff
commit 0193e070e8
4 changed files with 24 additions and 27 deletions

View File

@ -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),

View File

@ -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:

View File

@ -336,29 +336,27 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Serial Number" version="7.0">
<group string="Serial Number Identification" col="3">
<div class="oe_button_box">
<button name="action_traceability" string="Upstream Traceability" type="object" context="{'type': '', 'field': 'prodlot_id'}" icon="gtk-go-up"/>
<button name="action_traceability" string="Downstream Traceability" type="object" context="{'type': 'move_history_ids', 'field': 'prodlot_id'}" icon="gtk-go-down"/>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name"/>
</h1>
</div>
<group string="Serial Number Identification">
<group>
<field name="product_id"/>
<field name="name"/>
</group>
<group>
<field name="prefix"/>
<field name="ref"/>
</group>
<group class="oe_button_box">
<button name="action_traceability" string="Upstream Traceability" type="object" context="{'type': '', 'field': 'prodlot_id'}" icon="gtk-go-up"/>
<button name="action_traceability" string="Downstream Traceability" type="object" context="{'type': 'move_history_ids', 'field': 'prodlot_id'}" icon="gtk-go-down"/>
</group>
<group string="Dates">
<group>
<field name="date"/>
</group>
<group string="Traceability">
<field name="stock_available"/>
</group>
</group>
<notebook>
<page string="Revisions">
<field name="revisions"/>
@ -826,7 +824,6 @@
</div>
<field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]"/>
</group>
<group>
<field name="create_date" invisible="1"/>
<field name="date"/>