[IMP,MOD] Usability changes in stock module

bzr revid: vir@tinyerp.com-20100510054620-33vdfnz6exvr91ll
This commit is contained in:
Vir (Open ERP) 2010-05-10 11:16:20 +05:30
parent 06fc5d044a
commit 175db1efdb
8 changed files with 56 additions and 39 deletions

View File

@ -61,14 +61,16 @@
<field name="name" select="1"/>
<field name="active" select="1"/>
<field name="carrier_id" select="1"/>
<field name="sequence" select="1"/>
<field name="sequence" groups="base.group_extended" select="1"/>
<notebook colspan="4">
<page string="Grid definition">
<field colspan="4" name="line_ids" nolabel="1" select="1"/>
</page>
<page string="Destination">
<field colspan="4" name="country_ids"/>
<field colspan="4" name="state_ids"/>
<separator colspan="4" string="Countries"/>
<field colspan="4" name="country_ids" nolabel="1"/>
<separator colspan="4" string="States"/>
<field colspan="4" name="state_ids" nolabel="1"/>
<field name="zip_from"/>
<field name="zip_to"/>
</page>

View File

@ -953,7 +953,7 @@
<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="company_id" select="1" widget="selection"/>-->
<field name="product_id" select="1"/>
</group>
<newline/>

View File

@ -210,11 +210,11 @@ class product_category(osv.osv):
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type'),
}
_defaults = {
'type' : lambda *a : 'normal',
}
_order = "sequence"
def _check_recursion(self, cr, uid, ids):
level = 100
@ -274,7 +274,7 @@ class product_template(osv.osv):
'sale_ok': fields.boolean('Can be Sold', help="Determines if the product can be visible in the list of product within a selection from a sale order line."),
'purchase_ok': fields.boolean('Can be Purchased', help="Determine if the product is visible in the list of products within a selection from a purchase order line."),
'state': fields.selection([('',''),('draft', 'In Development'),('sellable','In Production'),('end','End of Lifecycle'),('obsolete','Obsolete')], 'State', help="Tells the user if he can use the product or not."),
'uom_id': fields.many2one('product.uom', 'Default UoM', required=True, help="Default Unit of Measure used for all stock operation."),
'uom_id': fields.many2one('product.uom', 'Default Unit Of Measure', required=True, help="Default Unit of Measure used for all stock operation."),
'uom_po_id': fields.many2one('product.uom', 'Purchase UoM', 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 UOM.'),
@ -551,7 +551,7 @@ class product_product(osv.osv):
price_type_currency_id = pricetype_obj.browse(cr,uid,price_type_id).currency_id.id
res[product.id] = self.pool.get('res.currency').compute(cr, uid, price_type_currency_id,
context['currency_id'], res[product.id],context=context)
return res
def copy(self, cr, uid, id, default=None, context=None):

View File

@ -63,7 +63,7 @@
<field name="partner_id"/>
<field name="reference" />
<field name="origin" />
<field name="type" />
<field name="type" groups="base.group_extended"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="5">

View File

@ -491,7 +491,7 @@ class stock_picking(osv.osv):
'date_done': fields.datetime('Date Done', help="Date of completion"),
'max_date': fields.function(get_min_max_date, fnct_inv=_set_maximum_date, multi="min_max_date",
method=True, store=True, type='datetime', string='Max. Expected Date', select=2),
'move_lines': fields.one2many('stock.move', 'picking_id', 'Entry lines', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
'move_lines': fields.one2many('stock.move', 'picking_id', 'Internal Moves', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
'delivery_line':fields.one2many('stock.delivery', 'picking_id', 'Delivery lines', readonly=True),
'auto_picking': fields.boolean('Auto-Picking'),
'address_id': fields.many2one('res.partner.address', 'Partner', help="Address of partner"),

View File

@ -186,7 +186,7 @@
<!-- Multi Company -->
<record id="res_partner_tinyshop0" model="res.partner">
<record id="res_partner_tinyshop0" model="res.partner">
<field eval="0" name="customer"/>
<field eval="0" name="supplier"/>
<field eval="1" name="active"/>

View File

@ -4,7 +4,7 @@
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future Stock Forecast"/>
<report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Picking list" rml="stock/report/picking.rml"/>
<report id="report_move_labels" model="stock.move" name="stock.move.label" string="Print Item Labels" xml="stock/report/lot_move_label.xml" xsl="stock/report/lot_move_label.xsl"/>
<report auto="False" id="report_location_overview" model="stock.location" name="lot.stock.overview" string="Location Overview" rml="stock/report/lot_overview.rml"/>
<report auto="False" id="report_location_overview" model="stock.location" name="lot.stock.overview" string="Location Overview" rml="stock/report/lot_overview.rml" groups="base.group_extended"/>
<report auto="False" id="report_lot_location" model="stock.location" name="lot.location" rml="stock/report/lot_location.rml" string="Lots by location"/>
<report id="report_location_overview_all" model="stock.location" name="lot.stock.overview_all" string="Location Content (With children)" rml="stock/report/lot_overview_all.rml"/>
</data>

View File

@ -54,6 +54,11 @@
<field name="date" select="1" />
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="4">
<filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" icon="terp-sale" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
@ -403,7 +408,7 @@
<field name="account_id" select="1" groups="base.group_extended"/>
<field name="location_id"/>
<field name="address_id" context="{'contact_display':'partner'}"/>
<field name="icon"/>
<field name="icon" groups="base.group_extended"/>
<newline/>
<group col="2" colspan="2" groups="base.group_extended">
<separator string="Chained Locations" colspan="2"/>
@ -487,7 +492,7 @@
<field name="view_type">tree</field>
<field name="view_id" ref="view_location_tree"/>
</record>
<menuitem action="action_location_tree" id="menu_action_location_tree" parent="menu_stock_inventory_control" sequence="20"/>
<menuitem action="action_location_tree" id="menu_action_location_tree" parent="menu_stock_inventory_control" groups="base.group_extended" sequence="20"/>
<record id="view_warehouse" model="ir.ui.view">
<field name="name">stock.warehouse</field>
@ -576,7 +581,7 @@
<field name="arch" type="xml">
<tree colors="blue:state in ('draft');grey:state in ('cancel', 'done');red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
<field name="name"/>
<field name="backorder_id"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="origin"/>
<field name="date"/>
<field name="min_date"/>
@ -594,10 +599,10 @@
<form string="Picking list">
<group colspan="4" col="6">
<field name="name" select="1" readonly="1"/>
<field name="address_id" select="1" context="{'contact_display' : 'partner'}"/>
<!-- <field name="address_id" select="1" context="{'contact_display' : 'partner'}" groups="base.group_extended"/>-->
<field name="origin"/>
<field name="backorder_id" readonly="1"/>
<field name="date" />
<field name="backorder_id" groups="base.group_extended" 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"/>
@ -727,7 +732,7 @@
<tree colors="blue:state in ('draft');grey:state in ('cancel', 'done');red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
<field name="name"/>
<field name="address_id" select="1"/>
<field name="backorder_id"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="origin"/>
<field name="date" select="1"/>
<field name="min_date" select="1"/>
@ -747,7 +752,7 @@
<field name="name" select="1" readonly="1"/>
<field name="address_id" select="1"/>
<field name="origin"/>
<field name="backorder_id" readonly="1"/>
<field name="backorder_id" groups="base.group_extended" readonly="1"/>
<field name="date" />
<field name="min_date" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
@ -904,7 +909,7 @@
<tree colors="blue:state in ('draft');grey:state in ('cancel', 'done');red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
<field name="name"/>
<field name="address_id"/>
<field name="backorder_id"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="origin"/>
<field name="date"/>
<field name="min_date"/>
@ -1029,13 +1034,14 @@
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="address_id" select="1"/>
<field name="company_id" select="1" widget="selection"/>
<!-- <field name="company_id" select="1" widget="selection"/>-->
</group>
<newline/>
<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="Order Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
<filter string="Expected Date" icon="terp-stock" domain="[]" context="{'group_by':'min_date'}"/>
</group>
</search>
</field>
@ -1078,11 +1084,11 @@
<tree colors="blue:state in ('draft');grey:state in ('cancel', 'done');red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking list">
<field name="name"/>
<field name="address_id"/>
<field name="backorder_id"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="origin"/>
<field name="date"/>
<field name="min_date"/>
<field name="invoice_state"/>
<field name="invoice_state" groups="base.group_extended"/>
<field name="state"/>
<button name="%(action_partial_picking)d" states="assigned" string="Validate" type="action" icon="gtk-ok" help="Receive products"/>
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" help="Cancel" confirm="This operation will cancel the shipment. Do you want to continue?" />
@ -1097,10 +1103,11 @@
<form string="Input Picking List">
<group colspan="4" col="6">
<field name="name" readonly="1" select="1"/>
<field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}"/>
<field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" />
<field name="origin"/>
<field name="backorder_id" readonly="1"/>
<field name="backorder_id" readonly="1" groups="base.group_extended"/>
<field name="date"/>
<field name="type"/>
<field name="min_date" readonly="1"/>
<field name="invoice_state" string="Invoice Control"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
@ -1111,7 +1118,7 @@
<tree colors="grey:state in ('cancel');black:state not in ('cancel')" string="Stock Moves">
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uom" string="Product Unit of Measure"/>
<field name="location_dest_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
<field name="state"/>
@ -1194,8 +1201,8 @@
<search string="Input Picking List">
<group col="8" colspan="4">
<filter icon="terp-stock" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Incoming Orders" />
<separator orientation="vertical"/>
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id', '!=', False)]" help="Has Back Order" />
<separator orientation="vertical" />
<filter icon="terp-stock" string="Back Order" domain="[('backorder_id', '!=', False)]" help="Has Back Order" groups="base.group_extended"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="address_id" select="1"/>
@ -1203,8 +1210,13 @@
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter icon="terp-stock" name="state" string="State" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical" />
<filter string="Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
<filter string="Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
<separator orientation="vertical" />
<filter string="Order Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
<filter string="Expected Date" icon="terp-stock" domain="[]" context="{'group_by':'min_date'}"/>
<separator orientation="vertical" />
<filter string="Origin" icon="terp-stock" domain="[]" context="{'group_by':'origin'}"/>
</group>
</search>
@ -1257,8 +1269,10 @@
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
<filter string="Partner" icon="terp-stock" domain="[]" context="{'group_by':'address_id'}"/>
<filter string="Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
<filter string="Order Date" icon="terp-stock" domain="[]" context="{'group_by':'date'}"/>
<filter string="Expected Date" icon="terp-stock" domain="[]" context="{'group_by':'min_date'}"/>
<filter string="Origin" icon="terp-stock" domain="[]" context="{'group_by':'origin'}"/>
</group>
</search>
@ -1275,7 +1289,7 @@
<field name="context">{'contact_display': 'partner',"search_default_confirmed":1}</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" groups="base.group_extended" sequence="2"/>
<record id="view_move_tree" model="ir.ui.view">
<field name="name">stock.move.tree</field>
@ -1314,8 +1328,8 @@
<field name="name"/>
<field name="product_id" select="1" on_change="onchange_product_id(product_id,location_id,location_dest_id)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom"/>
<field name="product_uos"/>
<field name="product_uom" string="Unit Of Measure"/>
<field name="product_uos" groups="base.group_extended"/>
</group>
<group colspan="2" col="2">
@ -1368,7 +1382,6 @@
<search string="Stock Moves">
<group col="8" colspan="4">
<filter icon="terp-stock" string="Available" domain="[('state','=','done')]" help="Done"/>
<filter icon="terp-stock" string="Available" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Future"/>
<separator orientation="vertical"/>
<field name="location_id"/>
<field name="location_dest_id"/>
@ -1376,10 +1389,12 @@
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter icon="terp-stock" string="Inventory" domain="[]" context="{'group_by':'name'}" />
<filter icon="terp-stock" string="State" domain="[]" context="{'group_by':'state'}" />
<filter string="Product" icon="terp-stock" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Source Location" icon="terp-stock" domain="[]" context="{'group_by':'location_id'}"/>
<filter string="Dest. Location" icon="terp-stock" domain="[]" context="{'group_by':'location_dest_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="Destination Location" icon="terp-stock" domain="[]" context="{'group_by':'location_dest_id'}"/>
</group>
</search>
</field>
@ -1414,7 +1429,7 @@
<field name="product_uom" string="UOM"/>
<field name="prodlot_id" string="Lot" groups="base.group_extended"/>
<field name="date_planned"/>
<field name="backorder_id"/>
<field name="backorder_id" groups="base.group_extended"/>
<field name="state"/>
<button name="%(action_partial_move)d" string="Partial" type="action" states="assigned" icon="gtk-justify-fill"/>
<button name="action_cancel" states="assigned,confirmed" string="Cancel" type="object" icon="gtk-cancel"/>