[REM] stock: Remove the traceability wizard view
bzr revid: sbh@tinyerp.com-20100906104740-6bvqsdt5t30p0h5j
This commit is contained in:
@@ -57,7 +57,6 @@ Thanks to the double entry management, the inventory controlling is powerful and
|
||||
"wizard/stock_splitinto_view.xml",
|
||||
"wizard/stock_inventory_line_split_view.xml",
|
||||
"wizard/stock_change_standard_price_view.xml",
|
||||
"wizard/stock_traceability_view.xml",
|
||||
'wizard/stock_picking_make_view.xml',
|
||||
'wizard/stock_return_picking_view.xml',
|
||||
"stock_workflow.xml",
|
||||
|
||||
+3
-35
@@ -532,24 +532,8 @@ class stock_tracking(osv.osv):
|
||||
@param context: A standard dictionary
|
||||
@return: A dictionary of values
|
||||
"""
|
||||
# Refactor Need
|
||||
type1 = context['type'] or 'move_history_ids'
|
||||
field = context['field'] or 'tracking_id'
|
||||
obj = self.pool.get('stock.move')
|
||||
ids = obj.search(cr, uid, [(field, 'in',context['active_ids'])])
|
||||
cr.execute('select id from ir_ui_view where model=%s and field_parent=%s and type=%s', ('stock.move', type1, 'tree'))
|
||||
view_id = cr.fetchone()[0]
|
||||
value = {
|
||||
'domain': "[('id','in',["+','.join(map(str, ids))+"])]",
|
||||
'name': ((type1=='move_history_ids') and 'Upstream Traceability') or 'Downstream Traceability',
|
||||
'view_type': 'tree',
|
||||
'res_model': 'stock.move',
|
||||
'field_parent': type1,
|
||||
'view_id': (view_id,'View'),
|
||||
'type': 'ir.actions.act_window',
|
||||
'nodestroy':True,
|
||||
|
||||
}
|
||||
value={}
|
||||
value=self.pool.get('action.traceability').action_traceability(cr,uid,ids,context)
|
||||
return value
|
||||
stock_tracking()
|
||||
|
||||
@@ -1384,23 +1368,7 @@ class stock_production_lot(osv.osv):
|
||||
@param context: A standard dictionary
|
||||
@return: A dictionary of values
|
||||
"""
|
||||
type1 = context['type'] or 'move_history_ids'
|
||||
field = context['field'] or 'tracking_id'
|
||||
obj = self.pool.get('stock.move')
|
||||
ids = obj.search(cr, uid, [(field, 'in',context['active_ids'])])
|
||||
cr.execute('select id from ir_ui_view where model=%s and field_parent=%s and type=%s', ('stock.move', type1, 'tree'))
|
||||
view_id = cr.fetchone()[0]
|
||||
value = {
|
||||
'domain': "[('id','in',["+','.join(map(str, ids))+"])]",
|
||||
'name': ((type1=='move_history_ids') and 'Upstream Traceability') or 'Downstream Traceability',
|
||||
'view_type': 'tree',
|
||||
'res_model': 'stock.move',
|
||||
'field_parent': type1,
|
||||
'view_id': (view_id,'View'),
|
||||
'type': 'ir.actions.act_window',
|
||||
'nodestroy':True,
|
||||
|
||||
}
|
||||
value=self.pool.get('action.traceability').action_traceability(cr,uid,ids,context)
|
||||
return value
|
||||
stock_production_lot()
|
||||
|
||||
|
||||
@@ -52,55 +52,12 @@ class action_traceability(osv.osv_memory):
|
||||
'res_model': 'stock.move',
|
||||
'field_parent': type1,
|
||||
'view_id': (view_id,'View'),
|
||||
'type': 'ir.actions.act_window'
|
||||
'type': 'ir.actions.act_window',
|
||||
'nodestroy':True,
|
||||
}
|
||||
return value
|
||||
|
||||
action_traceability()
|
||||
|
||||
class stock_traceability_downstream(osv.osv_memory):
|
||||
"""
|
||||
This class is defined for Stock traceability downstream wizard
|
||||
|
||||
"""
|
||||
_name = "stock.traceability.downstream"
|
||||
_inherit = "action.traceability"
|
||||
_description = "Stock traceability downstream"
|
||||
|
||||
stock_traceability_downstream()
|
||||
|
||||
class stock_traceability_upstream(osv.osv_memory):
|
||||
"""
|
||||
This class is defined for Stock traceability upstream wizard
|
||||
|
||||
"""
|
||||
_name = "stock.traceability.upstream"
|
||||
_inherit = "action.traceability"
|
||||
_description = "Stock traceability upstream"
|
||||
|
||||
stock_traceability_upstream()
|
||||
|
||||
class stock_traceability_lot_upstream(osv.osv_memory):
|
||||
"""
|
||||
This class is defined for Stock traceability lot upstream wizard
|
||||
|
||||
"""
|
||||
_name = "stock.traceability.lot.upstream"
|
||||
_inherit = "action.traceability"
|
||||
_description = "Stock traceability lot upstream"
|
||||
|
||||
stock_traceability_lot_upstream()
|
||||
|
||||
class stock_traceability_lot_downstream(osv.osv_memory):
|
||||
"""
|
||||
This class is defined for Stock traceability lot downstream wizard
|
||||
|
||||
"""
|
||||
_name = "stock.traceability.lot.downstream"
|
||||
_inherit = "action.traceability"
|
||||
_description = "Stock traceability lot downstream"
|
||||
|
||||
stock_traceability_lot_downstream()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- =========stock.traceability.downstream================= -->
|
||||
|
||||
<record id="view_stock_traceability_downstream" model="ir.ui.view">
|
||||
<field name="name">Stock traceability downstream</field>
|
||||
<field name="model">stock.traceability.downstream</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Downstream traceability">
|
||||
|
||||
<label string="It will give information about the stock of a product as per the pack" colspan="2" />
|
||||
<separator string="" colspan="4" />
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="action_traceability" string="Downstream traceability" type="object" context="{'type': 'move_history_ids2','field': ''}"/>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Downstream traceability"
|
||||
res_model="stock.traceability.downstream"
|
||||
src_model="stock.tracking"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_view_stock_traceability_downstream"/>
|
||||
|
||||
<!-- =========stock.traceability.upstream================= -->
|
||||
|
||||
<record id="view_stock_traceability_upstream" model="ir.ui.view">
|
||||
<field name="name">Stock traceability upstream</field>
|
||||
<field name="model">stock.traceability.upstream</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Upstream traceability">
|
||||
<label string="It will give information about the stock of a product as per the pack" colspan="2" />
|
||||
<separator string="" colspan="4" />
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="action_traceability" string="Upstream traceability" type="object" context="{'type': '','field': ''}"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Upstream traceability"
|
||||
res_model="stock.traceability.upstream"
|
||||
src_model="stock.tracking"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_view_stock_traceability_upstream"/>
|
||||
|
||||
<!-- =========stock.traceability.lot.upstream================= -->
|
||||
|
||||
<record id="view_stock_traceability_lot_upstream" model="ir.ui.view">
|
||||
<field name="name">Stock traceability lot upstream</field>
|
||||
<field name="model">stock.traceability.lot.upstream</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock traceability lot upstream">
|
||||
<label string="It will give information about the stock of a product as per the Production Lot" colspan="2" />
|
||||
<separator string="" colspan="4" />
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="action_traceability" string="Upstream traceability" type="object" context="{'type': 'move_history_ids2', 'field': 'prodlot_id'}"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Upstream traceability"
|
||||
res_model="stock.traceability.lot.upstream"
|
||||
src_model="stock.production.lot"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_view_stock_traceability_lot_upstream"/>
|
||||
|
||||
<!-- =========stock.traceability.lot.downstream================= -->
|
||||
|
||||
<record id="view_stock_traceability_lot_downstream" model="ir.ui.view">
|
||||
<field name="name">Stock traceability lot downstream</field>
|
||||
<field name="model">stock.traceability.lot.downstream</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock traceability lot downstream">
|
||||
<label string="It will give information about the stock of a product as per the Production Lot" colspan="2" />
|
||||
<separator string="" colspan="4" />
|
||||
<button icon='gtk-cancel' special="cancel"
|
||||
string="Cancel" />
|
||||
<button name="action_traceability" string="Downstream traceability" type="object" context="{'type': '', 'field': 'prodlot_id'}"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Downstream traceability"
|
||||
res_model="stock.traceability.lot.downstream"
|
||||
src_model="stock.production.lot"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_view_stock_traceability_lot_downstream"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user