[IMP] stock: Improvements in the layout of some screens

bzr revid: stephane@openerp.com-20100217162342-4nrjfon0szy9c9df
This commit is contained in:
Stephane Wirtel 2010-02-17 17:23:42 +01:00
parent d95103af72
commit 6e28a973fd
3 changed files with 84 additions and 22 deletions

View File

@ -21,6 +21,7 @@
from osv import osv, fields
from tools.translate import _
import tools
#
# Check if it works with UoM ???
@ -37,6 +38,7 @@ class stock_report_prodlots(osv.osv):
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'stock_report_prodlots')
cr.execute("""
create or replace view stock_report_prodlots as (
select max(id) as id,

View File

@ -2,6 +2,43 @@
<openerp>
<data>
<record id="view_stock_report_prodlots_filter" model="ir.ui.view">
<field name="name">stock.report.prodlots.filter</field>
<field name="model">stock.report.prodlots</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Location">
<group col="10" colspan="4">
<filter icon="terp-stock" string="Internal Locations" domain="[('location_id.usage', '=', 'internal')]" help="Internal Locations" default="1" />
<filter icon="terp-stock" string="Customer Locations" domain="[('location_id.usage', '=', 'customer')]" help="Customer Locations" />
<filter icon="terp-stock" string="Supplier Locations" domain="[('location_id.usage', '=', 'supplier')]" help="Supplier Locations" />
<separator orientation="vertical"/>
<field name="location_id" select="1" />
<field name="product_id" select="1" />
</group>
<group expand="1" string="Group By..." colspan="4" col="10">
<filter string="Location" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/>
<filter string="Product" icon="terp-stock" domain="[]" context="{'group_by':'product_id'}"/>
</group>
</search>
</field>
</record>
<record id="stock_report_prodlots_form" model="ir.ui.view">
<field name="name">stock.report.prodlots.view</field>
<field name="model">stock.report.prodlots</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Stock by Lots">
<field name="location_id"/>
<field name="product_id"/>
<field name="prodlot_id"/>
<field name="name"/>
</form>
</field>
</record>
<record id="stock_report_prodlots_tree" model="ir.ui.view">
<field name="name">stock.report.prodlots.view</field>
<field name="model">stock.report.prodlots</field>
@ -15,6 +52,7 @@
</tree>
</field>
</record>
<record id="action_stock_report_prodlots_form" model="ir.actions.act_window">
<field name="name">Locations</field>
<field name="type">ir.actions.act_window</field>
@ -22,6 +60,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'full':'1'}</field>
<field name="search_view_id" ref="view_stock_report_prodlots_filter" />
</record>
@ -39,7 +78,6 @@
</field>
</record>
<menuitem
id="next_id_61"
name="Reporting"

View File

@ -38,12 +38,26 @@
</field>
</record>
<record id="view_inventory_filter" model="ir.ui.view">
<field name="name">stock.inventory.filter</field>
<field name="model">stock.inventory</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Inventory">
<group col="10" colspan="4">
<field name="name" select="1" />
<field name="date" select="1" />
</group>
</search>
</field>
</record>
<record id="view_inventory_tree" model="ir.ui.view">
<field name="name">stock.inventory.tree</field>
<field name="model">stock.inventory</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Lot Inventory">
<tree string="Lot Inventory" colors="grey:state in ('done', 'cancel')">
<field name="name"/>
<field name="date"/>
<field name="state"/>
@ -101,6 +115,7 @@
<field name="view_type">form</field>
<field name="view_id" ref="view_inventory_tree"/>
<field name="context">{'full':'1'}</field>
<field name="search_view_id" ref="view_inventory_filter" />
</record>
<menuitem action="action_inventory_form" id="menu_action_inventory_form" parent="menu_stock_inventory_control" sequence="2"/>
@ -632,16 +647,18 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Stock Picking">
<group col="8" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Available Pickings"/>
<group col="10" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Available Pickings" default="1" />
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Pickings"/>
<separator orientation="vertical"/>
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id', '!=', False)]" help="Has Back Order" />
<separator orientation="vertical"/>
<field name="location_id" select="1"/>
<field name="location_dest_id" select="1"/>
<field name="name" select="1"/>
<field name="address_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="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'}"/>
@ -663,6 +680,8 @@
<field name="date" select="1"/>
<field name="min_date" select="1"/>
<field name="state" select="1"/>
<button name="%(partial_picking)d" states="assigned" string="Products Sent" type="action" icon="gtk-go-forward"/>
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel"/>
</tree>
</field>
</record>
@ -673,12 +692,13 @@
<field name="arch" type="xml">
<form string="Picking list">
<group col="6" colspan="4">
<field name="address_id" select="1"/>
<field name="type"/>
<field name="name" select="1" readonly="1"/>
<field name="min_date" select="1"/>
<field name="backorder_id" select="2" readonly="1"/>
<field name="address_id" select="1"/>
<field name="origin" select="2"/>
<field name="backorder_id" select="2" readonly="1"/>
<field name="date" />
<field name="min_date" select="1"/>
<field name="type"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<notebook colspan="4">
@ -755,15 +775,16 @@
<field name="arch" type="xml">
<search string="Search Stock Delivery">
<group col="10" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Assigned Orders"/>
<filter icon="terp-stock" string="Future Orders" domain="[('state','=','confirmed')]" help="Future Orders"/>
<filter icon="terp-stock" string="Back Orders" domain="[('backorder_id','!=',False)]" help="Back Orders"/>
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Assigned Orders" default="1"/>
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Orders"/>
<separator orientation="vertical"/>
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id','!=',False)]" help="Back Order"/>
<separator orientation="vertical"/>
<field name="address_id" select="1"/>
<field name="name" select="1"/>
<field name="origin" select="1"/>
</group>
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="10">
<group expand="1" string="Group By..." colspan="4" col="10">
<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="Order Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
@ -1124,25 +1145,25 @@
</record>
<menuitem action="action_picking_tree4" id="menu_action_picking_tree4" parent="menu_stock_warehouse_mgmt" sequence="1"/>
<record id="view_picking_internal_search" model="ir.ui.view">
<record id="view_picking_internal_search" model="ir.ui.view">
<field name="name">stock.picking.internal.search</field>
<field name="model">stock.picking</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Internal Picking List">
<group col="8" colspan="4">
<group col="8" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','assigned')]" help="Assigned Internal Moves"/>
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Internal Moves"/>
<filter icon="terp-stock" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Internal Moves" default="1" />
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="address_id" select="1"/>
<field name="company_id" select="1" widget="selection"/>
</group>
<group expand="context.get('report',False)" string="Group By..." colspan="4" col="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'}"/>
</group>
<filter string="Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
</record>
@ -1157,7 +1178,7 @@
<field name="context">{'contact_display': 'partner'}</field>
<field name="search_view_id" ref="view_picking_internal_search"/>
</record>
<menuitem action="action_picking_tree6" id="menu_action_picking_tree6" parent="menu_stock_warehouse_mgmt" sequence="2"/>
<menuitem action="action_picking_tree6" id="menu_action_picking_tree6" parent="menu_stock_warehouse_mgmt" sequence="2"/>
<record id="view_move_tree" model="ir.ui.view">
<field name="name">stock.move.tree</field>
@ -1166,7 +1187,7 @@
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Moves">
<field name="name"/>
<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)"/>
<field name="product_uom" string="UOM"/>
@ -1275,6 +1296,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="search_view_id" ref="view_stock_picking_filter"/>
<field name="domain">[('type','=','out')]</field>
<field name="context">{'contact_display': 'partner'}</field>
</record>
<menuitem action="action_picking_all" id="menu_action_picking_all" parent="menu_stock_warehouse_mgmt" sequence="3"/>