[IMP]issur4-warehouse-imp
bzr revid: pna@tinyerp.com-20120809094438-aamnemh4fdjidus4
This commit is contained in:
parent
71cd55490a
commit
46567ce1f9
|
@ -309,5 +309,19 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="product_form_view_procurement_button">
|
||||||
|
<field name="name">Procurement</field>
|
||||||
|
<field name="model">product.product</field>
|
||||||
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<!--xpath expr="//div[@class='oe_right oe_button_box']" position="inside"-->
|
||||||
|
<xpath expr="//field[@name='image_medium']" position="after">
|
||||||
|
<div class='oe_right oe_button_box'>
|
||||||
|
<button string="Procurement Request" name="%(act_make_procurement)d" type="action"/>
|
||||||
|
</div>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
|
@ -114,8 +114,9 @@ class make_procurement(osv.osv_memory):
|
||||||
|
|
||||||
res = super(make_procurement, self).default_get(cr, uid, fields, context=context)
|
res = super(make_procurement, self).default_get(cr, uid, fields, context=context)
|
||||||
product_id = self.pool.get('product.product').browse(cr, uid, record_id, context=context).id
|
product_id = self.pool.get('product.product').browse(cr, uid, record_id, context=context).id
|
||||||
|
warehouse_id = self.pool.get('stock.warehouse').search(cr, uid, [], context=context)
|
||||||
if 'product_id' in fields:
|
if 'product_id' in fields:
|
||||||
res.update({'product_id':product_id})
|
res.update({'product_id':product_id,'warehouse_id':warehouse_id and warehouse_id[0]})
|
||||||
return res
|
return res
|
||||||
|
|
||||||
make_procurement()
|
make_procurement()
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
<form string="Procurement Request" version="7.0">
|
<form string="Procurement Request" version="7.0">
|
||||||
<group col="4" string="This wizard will plan the procurement for this product. This procurement may generate task, production orders or purchase orders."/>
|
<group col="4" string="This wizard will plan the procurement for this product. This procurement may generate task, production orders or purchase orders."/>
|
||||||
<group>
|
<group>
|
||||||
<field name="product_id" on_change="onchange_product_id(product_id)"/>
|
<field name="product_id" on_change="onchange_product_id(product_id)" attrs="{'invisible':True}"/>
|
||||||
<field name="qty"/>
|
<field name="qty"/>
|
||||||
<field name="uom_id"/>
|
<field name="uom_id"/>
|
||||||
<field name="date_planned"/>
|
<field name="date_planned"/>
|
||||||
<field name="warehouse_id"/>
|
<field name="warehouse_id" groups="stock.group_locations"/>
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
<button name="make_procurement" string="Ask New Products" type="object" class="oe_highlight" />
|
<button name="make_procurement" string="Ask New Products" type="object" class="oe_highlight" />
|
||||||
|
|
|
@ -602,6 +602,8 @@ class product_product(osv.osv):
|
||||||
def name_get(self, cr, user, ids, context=None):
|
def name_get(self, cr, user, ids, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
if isinstance(ids,(int,long)):
|
||||||
|
ids=[ids]
|
||||||
if not len(ids):
|
if not len(ids):
|
||||||
return []
|
return []
|
||||||
def _name_get(d):
|
def _name_get(d):
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('product_id','=',active_id),('picking_id.type','=','in')]</field>
|
<field name="domain">[('picking_id.type','=','in')]</field>
|
||||||
<field name="view_id" ref="view_move_tree_reception_picking"/>
|
<field name="view_id" ref="view_move_tree_reception_picking"/>
|
||||||
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
||||||
<field name="search_view_id" ref="view_move_search_reception_incoming_picking"/>
|
<field name="search_view_id" ref="view_move_search_reception_incoming_picking"/>
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('product_id','=',active_id),('picking_id.type','=','out')]</field>
|
<field name="domain">[('picking_id.type','=','out')]</field>
|
||||||
<field name="view_id" ref="view_move_tree_reception_picking"/>
|
<field name="view_id" ref="view_move_tree_reception_picking"/>
|
||||||
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
|
||||||
<field name="search_view_id" ref="view_move_search_reception_outcoming_picking"/>
|
<field name="search_view_id" ref="view_move_search_reception_outcoming_picking"/>
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
<div class="oe_product_desc">
|
<div class="oe_product_desc">
|
||||||
<h4><a type="edit"><field name="name"></field></a></h4>
|
<h4><a type="edit"><field name="name"></field></a></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Code: <field name="code"/></li>
|
<li t-if="record.code.raw_value">Code: <field name="code"/></li>
|
||||||
<li t-if="record.type.raw_value != 'service'">Stock on hand: <field name="qty_available"/> <field name="uom_id"/></li>
|
<li t-if="record.type.raw_value != 'service'">Stock on hand: <field name="qty_available"/> <field name="uom_id"/></li>
|
||||||
<li t-if="record.type.raw_value != 'service'">Stock available: <field name="virtual_available"/> <field name="uom_id"/></li>
|
<li t-if="record.type.raw_value != 'service'">Stock available: <field name="virtual_available"/> <field name="uom_id"/></li>
|
||||||
<li>Price: <field name="lst_price"></field></li>
|
<li>Price: <field name="lst_price"></field></li>
|
||||||
|
|
|
@ -22,6 +22,7 @@ access_stock_production_lot_user,stock.production.lot user,model_stock_productio
|
||||||
access_stock_production_lot_revision,stock.production.lot.revision,model_stock_production_lot_revision,stock.group_stock_user,1,1,1,1
|
access_stock_production_lot_revision,stock.production.lot.revision,model_stock_production_lot_revision,stock.group_stock_user,1,1,1,1
|
||||||
access_stock_move_manager,stock.move manager,model_stock_move,stock.group_stock_manager,1,1,0,0
|
access_stock_move_manager,stock.move manager,model_stock_move,stock.group_stock_manager,1,1,0,0
|
||||||
access_stock_move_user,stock.move user,model_stock_move,stock.group_stock_user,1,0,0,0
|
access_stock_move_user,stock.move user,model_stock_move,stock.group_stock_user,1,0,0,0
|
||||||
|
access_stock_move_warehouse_manager,stock.move.manager,model_stock_move,stock.group_stock_manager,1,1,1,1
|
||||||
access_stock_inventory_user,stock.inventory user,model_stock_inventory,stock.group_stock_user,1,0,0,0
|
access_stock_inventory_user,stock.inventory user,model_stock_inventory,stock.group_stock_user,1,0,0,0
|
||||||
access_stock_inventory_manager,stock.inventory manager,model_stock_inventory,stock.group_stock_manager,1,1,1,1
|
access_stock_inventory_manager,stock.inventory manager,model_stock_inventory,stock.group_stock_manager,1,1,1,1
|
||||||
access_stock_inventory_line_user,stock.inventory.line user,model_stock_inventory_line,stock.group_stock_user,1,0,0,0
|
access_stock_inventory_line_user,stock.inventory.line user,model_stock_inventory_line,stock.group_stock_user,1,0,0,0
|
||||||
|
|
|
Loading…
Reference in New Issue