Sanjay Gohel (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-purchase-improvement-sgo into
lp:openobject-addons.
Requested reviews:
Amit Patel (OpenERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-purchase-improvement-sgo/+merge/125676
hello,
on click of backorder of stock picking it opens stock picking view in i
have improved as per model it opens stock.picking.in or stock.picking.out form
view.
Thank You.
SGO
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-purchase-improvement-sgo/+merge/125676
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-purchase-improvement-sgo.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-09-21 05:15:07 +0000
+++ stock/stock.py 2012-09-21 11:08:23 +0000
@@ -709,6 +709,15 @@
for move in picking_obj.move_lines:
move_obj.write(cr, uid, [move.id], {'tracking_id': False,'prodlot_id':False, 'move_history_ids2': [(6, 0, [])], 'move_history_ids': [(6, 0, [])]})
return res
+
+ def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
+ if view_type =='form':
+ mod_obj = self.pool.get('ir.model.data')
+ if self._name == "stock.picking.in":
+ model,view_id = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_in_form')
+ if self._name == "stock.picking.out":
+ model,view_id = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
+ return super(stock_picking,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
def onchange_partner_in(self, cr, uid, context=None, partner_id=None):
return {}
@@ -2939,6 +2948,7 @@
return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context)
_columns = {
+ 'backorder_id': fields.many2one('stock.picking.in', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'state': fields.selection(
[('draft', 'Draft'),
('auto', 'Waiting Another Operation'),
@@ -2983,6 +2993,7 @@
return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context)
_columns = {
+ 'backorder_id': fields.many2one('stock.picking.out', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'state': fields.selection(
[('draft', 'Draft'),
('auto', 'Waiting Another Operation'),
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp