Stock location improvement:

Allows to click on a location to open products
	Good title in columns

bzr revid: fp@tinyerp.com-963644caf289d21ccbb09ada1719c27dbe9fbc57
This commit is contained in:
Fabien Pinckaers 2007-06-21 15:31:07 +00:00
parent a8a21fab1a
commit a3012efaf6
3 changed files with 33 additions and 5 deletions

View File

@ -670,8 +670,8 @@
<field name="view_type">form</field>
<field name="view_id" ref="view_warehouse_orderpoint_tree"/>
</record>
<menuitem name="Inventory Control/Ordering Policy" sequence="4"/>
<menuitem name="Inventory Control/Ordering Policy/Order Point" id="menu_action_orderpoint_form" action="action_orderpoint_form"/>
<menuitem name="Inventory Control/Ordering policy" sequence="4"/>
<menuitem name="Inventory Control/Ordering policy/Minimum quantity rules" id="menu_action_orderpoint_form" action="action_orderpoint_form"/>
<act_window name="Orderpoint"
domain="[('warehouse_id', '=', active_id)]"

View File

@ -939,6 +939,15 @@ class product_product(osv.osv):
#
# Utiliser browse pour limiter les queries !
#
def view_header_get(self, cr, user, view_id, view_type, context):
if (not context.get('location', False)):
return False
cr.execute('select name from stock_location where id=%d', (context['location'],))
j = cr.fetchone()[0]
if j:
return 'Products: '+j
return False
def _get_product_available_func(states, what):
def _product_available(self, cr, uid, ids, name, arg, context={}):
if context.get('shop', False):

View File

@ -691,21 +691,22 @@
</field>
</record>
<record model="ir.actions.act_window" id="action_move_form">
<field name="name">Delivery orders</field>
<field name="res_model">stock.move.lot</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_move_lot_form"/>
</record>
<menuitem name="Inventory Control/Move" id="menu_action_move_form" action="action_move_form"/>
<menuitem name="Inventory Control/Delivery order" id="menu_action_move_form" action="action_move_form"/>
<record model="ir.actions.act_window" id="action_move_tree">
<field name="name">Move Orders to process</field>
<field name="name">Delivery orders to process</field>
<field name="res_model">stock.move.lot</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','draft')]</field>
</record>
<menuitem name="Inventory Control/Move/Move Orders to process" action="action_move_tree" id="menu_move_draft"/>
<menuitem name="Inventory Control/Delivery order/Delivery orders to process" action="action_move_tree" id="menu_move_draft"/>
<record model="ir.ui.view" id="view_move_tree">
<field name="name">stock.move.tree</field>
@ -827,5 +828,23 @@
</record>
<menuitem name="Inventory Control/Configuration/Incoterms" id="menu_action_incoterms_tree" action="action_incoterms_tree"/>
<act_window
name=""
domain="[('type','&lt;&gt;','service')]"
context="{'location': active_id}"
res_model="product.product"
src_model="stock.location"
id="act_product_location_open"/>
<record model="ir.values" id="ir_act_product_location_open">
<field name="key2">tree_but_open</field>
<field name="model">stock.location</field>
<field name="name">Products</field>
<field name="value" eval="'ir.actions.act_window,%d'%act_product_location_open"/>
<field name="object" eval="True"/>
</record>
</data>
</terp>