[IMP] useability form views reviewed: product, mrp

bzr revid: fp@openerp.com-20120902131413-6sba369b26rbxvfd
This commit is contained in:
Fabien Pinckaers 2012-09-02 15:14:13 +02:00
parent fde00740e2
commit 4d2d2ee443
5 changed files with 37 additions and 45 deletions

View File

@ -647,50 +647,42 @@
<field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/>
</header>
<sheet>
<label for="product_id" class="oe_edit_only"/>
<h1>
<field name="product_id" on_change="product_id_change(product_id)" domain="[('bom_ids','&lt;&gt;',False),('bom_ids.bom_id','=',False)]" class="oe_inline"/>
</h1>
<label for="product_qty" class="oe_edit_only"/>
<h2>
<field name="product_qty" class="oe_inline"/>
<field name="product_uom" groups="product.group_uom" class="oe_inline"/>
<button type="action"
icon="terp-accessories-archiver+"
name="%(mrp.action_change_production_qty)d"
string="Change Qty" states="ready,confirmed" class="oe_inline"/>
</h2>
<div groups="mrp.group_mrp_routings">
<label for="routing_id" class="oe_edit_only"/>
<h2><field name="routing_id" class="oe_inline"/></h2>
<div class="oe_title">
<h1>Manufacturing Order <field name="name" class="oe_inline"/></h1>
</div>
<group>
<group>
<field name="name"/>
<field name="date_planned"/>
<field name="origin"/>
</group>
<group>
<field name="user_id"/>
<field name="product_id" on_change="product_id_change(product_id)" domain="[('bom_ids','&lt;&gt;',False),('bom_ids.bom_id','=',False)]" class="oe_inline"/>
<label for="product_qty"/>
<div>
<field name="product_qty" class="oe_inline"/>
<field name="product_uom" groups="product.group_uom" class="oe_inline"/>
<button type="action"
icon="terp-accessories-archiver+"
name="%(mrp.action_change_production_qty)d"
string="(Update)" states="ready,confirmed" class="oe_edit_only oe_link"/>
</div>
<label for="product_uos_qty" groups="product.group_uos"/>
<div groups="product.group_uos">
<field name="product_uos_qty" class="oe_inline"/>
<label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/>
<field name="product_uos" class="oe_inline"/>
</div>
<field name="date_planned"/>
</group>
<group>
<field name="bom_id" domain="[('product_id','=',product_id)]" context="{'default_product_id': product_id}" on_change="bom_id_change(bom_id)"/>
<field name="routing_id" class="oe_inline" groups="mrp.group_mrp_routings"/>
<field name="user_id"/>
<field name="origin"/>
</group>
<group groups="stock.group_locations">
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
</group>
</group>
<notebook>
<page string="Consumed Products">
<group>
<group>
<field name="bom_id" domain="[('product_id','=',product_id)]" context="{'default_product_id': product_id}" on_change="bom_id_change(bom_id)"/>
</group>
<group groups="stock.group_locations">
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
</group>
</group>
<group>
<group string="Products to Consume">
<field name="move_lines" domain="[('state','&lt;&gt;', ('done', 'cancel'))]" nolabel="1">

View File

@ -34,13 +34,13 @@
</field>
</record>
<act_window name="Procurement Request"
res_model="make.procurement"
src_model="product.product"
view_mode="form"
target="new"
key2="client_action_multi"
id="act_make_procurement"/>
<record model="ir.actions.act_window" id="act_make_procurement">
<field name="name">Procurement Request</field>
<field name="res_model">make.procurement</field>
<field name="src_model">product.product</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -302,7 +302,7 @@ class product_template(osv.osv):
('sellable','Normal'),
('end','End of Lifecycle'),
('obsolete','Obsolete')], 'Status', help="Tells the user if he can use the product or not."),
'uom_id': fields.many2one('product.uom', 'Default Unit of Measure', required=True, help="Default Unit of Measure used for all stock operation."),
'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True, help="Default Unit of Measure used for all stock operation."),
'uom_po_id': fields.many2one('product.uom', 'Purchase Unit of Measure', required=True, help="Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."),
'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
help='Used by companies that manage two units of measure: invoicing and inventory management. For example, in food industries, you will manage a stock of ham but invoice in Kg. Keep empty to use the default Unit of Measure.'),

View File

@ -84,9 +84,9 @@
<page string="Information">
<group>
<group>
<field name="type"/>
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
<field name="list_price"/>
<field name="price_margin" groups="product.group_product_variant"/>
<field name="price_extra" groups="product.group_product_variant"/>
</group>
<group>
<field name="default_code"/>
@ -94,11 +94,11 @@
<div name="ean">
<field name="ean13" placeholder="e.g. 5901234123457"/>
</div>
<field groups="product.group_product_variant" name="variants"/>
</group>
<group>
<field name="type"/>
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
<field groups="product.group_product_variant" name="variants"/>
<field name="price_margin" groups="product.group_product_variant"/>
<field name="price_extra" groups="product.group_product_variant"/>
</group>
</group>
<field name="description" placeholder="describe the product's characteristics..."/>

View File

@ -177,7 +177,7 @@
<field name="arch" type="xml">
<form string="Purchase Order" version="7.0">
<header>
<button name="purchase_confirm" states="draft,sent" string="Confirm Quotation" class="oe_highlight"/>
<button name="purchase_confirm" states="draft,sent" string="Confirm Order" class="oe_highlight"/>
<button name="wkf_send_rfq" states="draft" string="Send RFQ" type="object" context="{'send_rfq':True}"/>
<button name="wkf_send_rfq" states="confirmed" string="Resend Purchase Order" type="object" class="oe_highlight"/>
<button name="action_cancel" states="except_picking,except_invoice" string="Cancel" type="object" />