[FIX]stock: added a group , class on button, improve a menu tip,label name,added a tree view on one2many field

bzr revid: mma@tinyerp.com-20120611095914-631eo6yw8bz9aknx
This commit is contained in:
Mayur Maheshwari (OpenERP) 2012-06-11 15:29:14 +05:30
parent 787df16f84
commit 7c6ebb98f5
6 changed files with 50 additions and 30 deletions

View File

@ -454,7 +454,7 @@ class mrp_production(osv.osv):
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', select=True),
'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uos_qty': fields.float('Product UoS Qty', states={'draft':[('readonly',False)]}, readonly=True),
'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),

View File

@ -324,7 +324,7 @@
<field name="code" select="1" string="Reference"/>
<newline/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
<newline/>
<field name="product_uos_qty" groups="product.group_uos" />
@ -339,7 +339,7 @@
<tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="name" invisible="1"/>
<field name="date_start"/>
<field name="date_stop"/>
@ -351,7 +351,7 @@
<field name="code" select="1" string="Reference"/>
<newline/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
<newline/>
<field name="product_uos_qty" groups="product.group_uos" />
@ -367,7 +367,7 @@
<tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="name" invisible="1"/>
<field name="date_start"/>
<field name="date_stop"/>
@ -455,7 +455,7 @@
<field name="code"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="type"/>
<field name="method"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
@ -477,7 +477,7 @@
<field name="product_id" string="Component Product"/>
<field name="bom_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="type"/>
<field name="method"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
@ -633,9 +633,9 @@
<field name="arch" type="xml">
<form layout="manual">
<header>
<button name="button_confirm" states="draft" string="Confirm Production"/>
<button name="button_produce" states="ready" string="Start Production"/>
<button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" type="action"/>
<button name="button_confirm" states="draft" string="Confirm Production" class="oe_form_button_hi"/>
<button name="button_produce" states="ready" string="Start Production" class="oe_form_button_hi"/>
<button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" type="action" class="oe_form_button_hi"/>
<button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object"/>
<button name="button_recreate" states="picking_except" string="Recreate Picking"/>
<button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel"/>
@ -650,11 +650,11 @@
<newline/>
<field name="product_id" on_change="product_id_change(product_id)" domain="[('supply_method','=','produce')]"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<button type="action"
icon="terp-accessories-archiver+"
name="%(mrp.action_change_production_qty)d"
string="Change Qty" states="ready,confirmed" />
string="Change Quantity" states="ready,confirmed" />
</group>
<group colspan="4" col="4">
<label string="" colspan="2"/>
@ -667,17 +667,17 @@
<page string="Consumed Products">
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
<field name="routing_id" groups="mrp.group_mrp_routings" select="1"/>
<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')]"/>
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)" groups="stock.group_locations"/>
<field name="location_dest_id" domain="[('usage','=','internal')]" groups="stock.group_locations"/>
<separator string="" colspan="4"/>
<field colspan="2" name="move_lines" nolabel="1" widget="one2many_list"
mode="tree,form" height="275" domain="[('state','&lt;&gt;', ('done', 'cancel'))]">
<tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="location_id" string="Source Loc."/>
<field name="product_qty"/>
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field name="location_id" string="Source Loc." groups="stock.group_locations"/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
@ -699,8 +699,8 @@
widget="one2many_list" mode="tree,form" height="275">
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state == 'cancel' " string="Consumed Products" editable="bottom">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="Unit of Measure"/>
<field name="product_qty" readonly="1"/>
<field name="product_uom" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
<field name="prodlot_id" context="{'product_id': product_id}"/>
<field name="state" invisible="1"/>
<field name="scrapped" invisible="1"/>
@ -785,7 +785,7 @@
<field name="date_start"/>
<field name="date_finished"/>
<field name="picking_id"/>
<field name="move_prod_id"/>
<field name="move_prod_id" groups="stock.group_locations"/>
</page>
</notebook>
</sheet>
@ -844,7 +844,9 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_production_filter"/>
<field name="context">{}</field>
<field name="help">Manufacturing Orders are usually proposed automatically by OpenERP based on the bill of materials and the procurement rules, but you can also create manufacturing orders manually. OpenERP will handle the consumption of the raw materials (stock decrease) and the production of the finished products (stock increase) when the order is processed.</field>
<field name="help">Click here to create a new Manufacturing Order
&lt;p&gt;
To process the production, don't forget to create a Bill of Material. Manufacturing Order can be automatically generated based on procurement rules specified on the product</field>
</record>
<menuitem action="mrp_production_action" id="menu_mrp_production_action"
parent="menu_mrp_manufacturing" sequence="1"/>
@ -934,7 +936,7 @@
<field name="name"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
</form>
@ -948,7 +950,7 @@
<tree string="Scheduled Products">
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
</tree>
@ -987,7 +989,17 @@
<field name="arch" type="xml">
<group name="misc" position="after">
<separator string="Bill of Materials" colspan="4"/>
<field name="bom_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
<field name="bom_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}" widget="one2many_list"
mode="tree,form">
<tree string="Bill of Materials">
<field name="name" string="Component Name"/>
<field name="bom_id"/>
<field name="product_qty" string="Quantity of Product"/>
<field name="type"/>
<field name="date_start"/>
<field name="date_stop"/>
</tree>
</field>
</group>
</field>
</record>

View File

@ -550,10 +550,10 @@ class stock_warehouse_orderpoint(osv.osv):
'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"),
'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','=','product')]),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'product_min_qty': fields.float('Min Quantity', required=True,
'product_min_qty': fields.float('Minimum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\
"a procurement to bring the virtual stock to the Max Quantity."),
'product_max_qty': fields.float('Max Quantity', required=True,
'product_max_qty': fields.float('Maximum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity, OpenERP generates "\
"a procurement to bring the virtual stock to the Quantity specified as Max Quantity."),
'qty_multiple': fields.integer('Qty Multiple', required=True,

View File

@ -280,7 +280,15 @@
<group name="misc" position="after">
<group colspan="4" attrs="{'invisible':[('type','=','service')]}" groups="stock.group_stock_manager">
<separator string="Minimum Stock Rules" colspan="4"/>
<field name="orderpoint_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
<field colspan="4" name="orderpoint_ids" nolabel="1" context="{'default_product_id': active_id}" widget="one2many_list"
mode="tree,form">
<tree string="Reordering Rules">
<field name="name"/>
<field name="warehouse_id"/>
<field name="product_min_qty"/>
<field name="product_max_qty"/>
</tree>
</field>
</group>
</group>
</field>

View File

@ -557,7 +557,7 @@
<field name="product_name"/>
<field name="product_code"/>
<field name="min_qty"/>
<field name="product_uom"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="delay"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field colspan="4" groups="product.group_sale_pricelist" name="pricelist_ids" nolabel="1" widget="one2many_list">
@ -715,7 +715,7 @@
<field colspan="4" name="seller_ids" nolabel="1"/>
</page>
<page string="Descriptions">
<separator string="Description"/>
<separator string="Internal Description"/>
<field colspan="4" name="description" nolabel="1"/>
<separator string="Sale Description"/>
<field colspan="4" name="description_sale" nolabel="1"/>

View File

@ -132,7 +132,7 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('product_id','=',active_id),('picking_id.type','=','in')]</field>
<field name="domain">[('product_id','=',[active_id]),('picking_id.type','=','in')]</field>
<field name="view_id" ref="view_move_tree_reception_picking"/>
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
<field name="search_view_id" ref="view_move_search_reception_incoming_picking"/>