Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2380 Widoki

Greetingz,

I'm trying to access spicific object which is 'product_id' avilable on stock.move , on ' stock.view_move_picking_form '

from python code i want to inhirit this form to get a value from this filed , i tried to inhirit 'stock.move' once i tryed to get product_id value am getting same value even if i did any changes , the value will never change because am sure am trying to get wrong view field .

 

so is there any way to specify which form to deal with from python code .

my code is :

class stock_move(osv.osv):
    _name='stock.move'
    _inherit='stock.move'
    
    def onchange_product_rolls_dec(self,cr,uid,ids,context=None):
        print "----------------------------------------"

        myobj = self.pool.get('stock.move').browse(cr, uid, uid, context)
        print myobj.product_id.display_name
        print "----------------------------------------"

 

Regrads

Awatar
Odrzuć