[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"/>
@ -825,8 +823,7 @@
<field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_inline"/>
</div>
<field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]"/>
</group>
</group>
<group>
<field name="create_date" invisible="1"/>
<field name="date"/>

View File

@ -244,8 +244,8 @@
<field name="arch" type="xml">
<form string="Stock Planning" version="7.0">
<group>
<group string = "General Info">
<field name="company_id" widget= "selection"
<group string="General Info">
<field name="company_id" widget="selection"
on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
<field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
<field name="period_id" />
@ -257,25 +257,25 @@
on_change = "onchange_uom(product_uom, product_id, active_uom, planned_outgoing, to_procure)"/>
<field name="active_uom" invisible = "True" />
</group>
<group string = "Minimum Stock Rule Indicators">
<group string="Minimum Stock Rule Indicators">
<field name="minimum_op"/>
<field name="maximum_op"/>
</group>
</group>
<group>
<group string = "Current Period Situation">
<group string="Current Period Situation">
<field name="stock_start"/>
<field name="already_out"/>
<field name="already_in"/>
</group>
<group string = "Forecasts">
<group string="Forecasts">
<field name="warehouse_forecast"/>
<field name="company_forecast"/>
<field name="confirmed_forecasts_only"/>
</group>
</group>
<group>
<group string = "Planning and Situation for Calculated Period">
<group string="Planning and Situation for Calculated Period">
<field name="planned_outgoing"/>
<field name="outgoing"/>
<field name="outgoing_left"/>
@ -285,7 +285,7 @@
<button name="calculate_planning" string="Calculate Planning" type="object" icon="gtk-execute" colspan="2"/>
<field name="stock_only"/>
</group>
<group string = "Calculated Period Simulation">
<group string="Calculated Period Simulation">
<field name="outgoing_before"/>
<field name="incoming_before"/>
<field name="stock_simulation"/>
@ -293,7 +293,7 @@
<field name="procure_to_stock"/>
</group>
</group>
<group string = "Internal Supply">
<group string="Internal Supply">
<button name="internal_supply" string="Supply from Another Warehouse" icon="gtk-convert" type="object" colspan="2"/>
<field name="supply_warehouse_id" domain = "[('company_id','=',company_id)] "/>
<field name="stock_supply_location"/>