[IMP] hr_expense,mrp,product,stock: Improve the layout of some search and form views

bzr revid: stephane@openerp.com-20100223160550-o0b0kkh9yirnuew0
This commit is contained in:
Stephane Wirtel 2010-02-23 17:05:50 +01:00
parent af3e14ec11
commit bcae22c42a
5 changed files with 162 additions and 93 deletions

View File

@ -177,7 +177,7 @@ class product_product(osv.osv):
_inherit = "product.product"
_columns = {
'hr_expense_ok': fields.boolean('Can be Expensed', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
'hr_expense_ok': fields.boolean('Can constitute an Expense', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
}
product_product()

View File

@ -955,23 +955,51 @@
</tree>
</field>
</record>
<record model="ir.ui.view" id="warehouse_orderpoint_search">
<field name="name">stock.warehouse.orderpoint.search</field>
<field name="model">stock.warehouse.orderpoint</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Minimum Stock Rules Search">
<field name="name" select="1" />
<field name="warehouse_id" select="1" widget="selection"/>
<field name="location_id" select="1" />
<field name="company_id" select="1" widget="selection"/>
<field name="product_id" select="1"/>
</search>
</field>
</record>
<record id="view_warehouse_orderpoint_form" model="ir.ui.view">
<field name="name">stock.warehouse.orderpoint.form</field>
<field name="model">stock.warehouse.orderpoint</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Minimum Stock Rules">
<field name="name" select="1"/>
<field name="active" select="1"/>
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" select="1" widget="selection"/>
<field name="location_id" select="2"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="product_id" on_change="onchange_product_id(product_id)" select="1"/>
<field name="product_uom"/>
<field name="product_min_qty"/>
<field name="product_max_qty"/>
<field name="qty_multiple"/>
<field name="procurement_id" readonly="1"/>
<group col="2" colspan="2">
<separator string="General Information" colspan="2" />
<field name="name" />
<field name="product_id" on_change="onchange_product_id(product_id)" />
<field name="product_uom"/>
</group>
<group col="2" colspan="2">
<separator string="Locations" colspan="2" />
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
<field name="location_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group col="2" colspan="2">
<separator string="Quantity Rules" colspan="2" />
<field name="product_min_qty"/>
<field name="product_max_qty"/>
<field name="qty_multiple"/>
</group>
<group col="2" colspan="2">
<separator string="Misc" colspan="2" />
<field name="procurement_id" readonly="1"/>
<field name="active" />
</group>
</form>
</field>
</record>
@ -981,6 +1009,7 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_warehouse_orderpoint_tree"/>
<field name="search_view_id" ref="warehouse_orderpoint_search" />
</record>
<menuitem action="action_orderpoint_form" id="menu_action_orderpoint_form" parent="menu_mrp_reordering"/>

View File

@ -11,10 +11,18 @@
<filter string="Services" icon="terp-stock" domain="[('type','=','service')]"/>
<filter string="Stockable" icon="terp-stock" domain="['|',('type','=','product'),('type','=','consu')]"/>
<separator orientation="vertical"/>
<filter string="Can be sold" icon="terp-stock" domain="[('sale_ok','=',1)]"/>
<filter string="Can be Purchased" icon="terp-stock" domain="[('purchase_ok', '=', 1)]" />
<separator orientation="vertical"/>
<field name="default_code" select="1"/>
<field name="name" select="1"/>
<field name="categ_id" select="1" widget="selection"/>
<newline/>
<!--
<group col='8' colspan='4' expand='1' string='Group by...'>
<filter string='Category' icon="terp-stock" domain="[]" context="{'group_by' : 'categ_id'}" />
</group>
-->
<group col='8' colspan='7' expand="1" string="Extended options...">
<field name="pricelist_id" select="1" widget="selection" context="{'pricelist': self}" />
</group>
@ -28,9 +36,10 @@
<field name="type">tree</field>
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<tree colors="red:virtual_available&lt;0;blue:virtual_available&gt;=0 and state in ('draft', 'end', 'obsolete');black:virtual_available&gt;=0 and state not in ('draft', 'end', 'obsolete')" string="Products">
<tree colors="red:virtual_available&lt;0;blue:virtual_available&gt;=0 and state in ('draft', 'end', 'obsolete');black:virtual_available&gt;=0 and state not in ('draft', 'end', 'obsolete')" string="Products">
<field name="default_code"/>
<field name="name"/>
<field name="categ_id" />
<field name="variants" groups="product.group_product_variant"/>
<field name="uom_id"/>
<field name="qty_available"/>
@ -61,7 +70,7 @@
<field groups="base.group_extended" name="ean13" select="2"/>
</group>
<group colspan="1" col="2">
<separator string="Product Type" colspan="2"/>
<separator string="Product Characteristics" colspan="2"/>
<field name="sale_ok" select="2"/>
<field name="purchase_ok" select="2"/>
<field groups="base.group_extended" name="rental" select="2"/>

View File

@ -356,7 +356,7 @@ class stock_tracking(osv.osv):
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the tracking lots without removing it."),
'serial': fields.char('Reference', size=64),
'move_ids': fields.one2many('stock.move', 'tracking_id', 'Moves Tracked'),
'date': fields.datetime('Date Created', required=True),
'date': fields.datetime('Created Date', required=True),
}
_defaults = {
'active': lambda *a: 1,
@ -993,7 +993,7 @@ class stock_move(osv.osv):
'name': fields.char('Name', size=64, required=True, select=True),
'priority': fields.selection([('0', 'Not urgent'), ('1', 'Urgent')], 'Priority'),
'date': fields.datetime('Date Created'),
'date': fields.datetime('Created Date'),
'date_planned': fields.datetime('Date', required=True, help="Scheduled date for the movement of the products or real date if the move is done."),
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),

View File

@ -137,7 +137,7 @@
<field name="name" select="1"/>
<field name="serial" select="1"/>
<field name="date" select="1"/>
<field name="active" select="1"/>
<field name="active" />
</form>
</field>
</record>
@ -213,17 +213,17 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Production Lot">
<notebook colspan="4">
<page string="Production Lot">
<field name="name" select="1"/>
<field name="ref" select="2"/>
<notebook colspan="4">
<page string="Production Lot">
<field name="name" select="1"/>
<field name="ref" select="2"/>
<field name="prefix" select="1"/>
<field name="product_id" select="1"/>
<field name="stock_available"/>
<field name="date" select="2"/>
<field colspan="4" name="revisions" nolabel="1"/>
</page>
</notebook>
<field name="product_id" select="1"/>
<field name="stock_available"/>
<field name="date" select="2"/>
<field colspan="4" name="revisions" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</record>
@ -233,20 +233,46 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Production Lot">
<field name="date"/>
<field name="prefix" />
<field name="name"/>
<field name="ref"/>
<field name="product_id"/>
<field name="stock_available"/>
<field name="date"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="search_product_lot_filter">
<field name="name">Production Lots Filter</field>
<field name="model">stock.production.lot</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Product Lots Filter">
<group col="10" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('stock_available', '&gt;', 0)]" help="Available Product Lots" default="1" />
<separator orientation="vertical"/>
<field name="prefix" select="1"/>
<field name="name" select="1"/>
<field name="ref" select="1"/>
<field name="product_id" select="1"/>
<field name="date" select="1"/>
</group>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="Product" icon="terp-stock" domain="[]" context="{'group_by':'product_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_production_lot_form" model="ir.actions.act_window">
<field name="name">Production Lots</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">stock.production.lot</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_production_lot_tree"/>
<field name="search_view_id" ref="search_product_lot_filter" />
<field name="context">{'full':'1'}</field>
</record>
<menuitem action="action_production_lot_form" id="menu_action_production_lot_form" parent="menu_traceability"/>
@ -627,7 +653,6 @@
<field colspan="4" name="note" nolabel="1"/>
</page>
<page string="Other info" groups="base.group_extended">
<field name="origin" select="2"/>
<field name="active" select="2"/>
<field name="auto_picking"/>
<field name="invoice_state" select="2"/>
@ -1024,9 +1049,6 @@
</record>
<!-- <menuitem action="action_picking_tree" id="menu_action_picking_tree" parent="menu_stock_root" sequence="19"/>-->
#
# Reception of Products
#
<record id="view_picking_in_tree" model="ir.ui.view">
<field name="name">stock.picking.in.tree</field>
<field name="model">stock.picking</field>
@ -1042,7 +1064,7 @@
<field name="invoice_state"/>
<field name="state"/>
<button name="%(partial_picking)d" states="assigned" string="Products Received" type="action" icon="gtk-ok"/>
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel"/>
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" confirm="Are you sure to want to cancel this record ?" />
</tree>
</field>
</record>
@ -1118,9 +1140,9 @@
</group>
</page>
<page string="Return Picking History">
<field name="move_stock_return_history" nolabel="1"/>
</page>
</notebook>
<field name="move_stock_return_history" nolabel="1"/>
</page>
</notebook>
</form>
</field>
<group col="7" colspan="4">
@ -1162,8 +1184,8 @@
</group>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
<filter string="State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
<filter string="Origin" icon="terp-stock" domain="[]" context="{'group_by':'origin'}"/>
</group>
</search>
</field>
@ -1215,8 +1237,8 @@
</group>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
<filter string="State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
<filter string="Origin" icon="terp-stock" domain="[]" context="{'group_by':'origin'}"/>
</group>
</search>
</field>
@ -1240,7 +1262,7 @@
<field name="type">tree</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Moves">
<tree colors="grey:state in ('done', 'cancel');black:state not in ('done', 'cancel');red:date_planned > current_date" string="Moves">
<field name="name" string="Move Name"/>
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@ -1264,45 +1286,54 @@
<field eval="4" name="priority"/>
<field name="arch" type="xml">
<form string="Stock Moves">
<notebook colspan="4">
<page string="General Information">
<separator colspan="4" string="Move Information"/>
<field name="location_id" select="1"/>
<field name="location_dest_id" select="1"/>
<field colspan="4" name="product_id" select="1" on_change="onchange_product_id(product_id,location_id,location_dest_id)"/>
<field name="product_qty" select="2" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" select="2"/>
<field name="product_uos" select="2"/>
<field colspan="4" name="name" select="2"/>
<field name="date"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="date_planned"/>
<field name="priority"/>
<field name="address_id" select="2" context="{'contact_display':'partner'}"/>
<newline/>
<field name="picking_id" select="2"/>
<newline/>
<field name="prodlot_id" select="2"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<field name="tracking_id" select="2"/>
<newline/>
<label/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill"/>
<separator colspan="4" string="Move State"/>
<field name="state" select="1"/>
<group col="4" colspan="2">
<button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
<button name="action_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="action_cancel" states="assigned,confirmed" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="action_done" states="assigned" string="Make Parcel" type="object" icon="gtk-jump-to"/>
</group>
</page>
<page string="Return Picking History">
<field name="move_stock_return_history" nolabel="1"/>
</page>
</notebook>
<notebook colspan="4">
<page string="General Information">
<group colspan="2" col="2">
<separator colspan="2" string="Move Information"/>
<field name="name" select="2"/>
<field name="product_id" select="1" on_change="onchange_product_id(product_id,location_id,location_dest_id)"/>
<field name="product_qty" select="2" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" select="2"/>
<field name="product_uos" select="2"/>
</group>
<group colspan="2" col="2">
<separator string="Locations &amp; Picking" colspan="2" />
<field name="location_id" select="1"/>
<field name="location_dest_id" select="1"/>
<field name="picking_id" select="2"/>
<field name="address_id" select="2" context="{'contact_display':'partner'}"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<group colspan="2" col="2">
<separator string="Dates &amp; Priority" colspan="2" />
<field name="date"/>
<field name="date_planned"/>
<field name="priority"/>
</group>
<group colspan="2" col="4">
<separator string="Tracability" colspan="4" />
<field name="tracking_id" select="1" colspan="4" />
<field name="prodlot_id" select="2"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id)"/>
<button name="%(track_line)d" string="Split in production lots" type="action" icon="gtk-justify-fill" colspan="2" />
</group>
</page>
<page string="Return Picking History">
<field name="move_stock_return_history" nolabel="1"/>
</page>
</notebook>
<group col="6" colspan="4">
<field name="state" select="1"/>
<button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
<button name="action_assign" states="confirmed" string="Set Available" type="object" icon="gtk-yes"/>
<button name="action_cancel" states="assigned,confirmed" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="action_done" states="assigned" string="Make Parcel" type="object" icon="gtk-jump-to"/>
</group>
</form>
</field>
</record>
@ -1313,23 +1344,23 @@
<field name="type">tree</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<search string="Stock Moves">
<group col="8" colspan="4">
<filter icon="terp-stock" string="Draft" domain="[('state','=','draft')]" help="Draft Moves"/>
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Available Moves"/>
<separator orientation="vertical"/>
<field name="location_id" select="1"/>
<field name="location_dest_id" select="1"/>
<field name="product_id" select="1"/>
<search string="Stock Moves">
<group col="8" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Available Moves"/>
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Moves"/>
<filter icon="terp-stock" string="Waiting" domain="[('state','=','waiting')]" help="Waiting"/>
<separator orientation="vertical"/>
<field name="location_id" select="1"/>
<field name="location_dest_id" select="1"/>
<field name="product_id" select="1"/>
</group>
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="8">
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="Product" icon="terp-stock" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
<filter string="Location" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/>
<filter string="Product" icon="terp-stock" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
<filter string="Destion Location" icon="terp-stock" domain="[]" context="{'group_by':'location_dest_id'}"/>
<filter string="Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
<filter string="Destination Location" icon="terp-stock" domain="[]" context="{'group_by':'location_dest_id'}"/>
</group>
</search>
</field>
</record>