Comment 2 for bug 1098557

Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: [Bug 1098557] Re: Can't set a default origin for stock pickings at duplication time

Dear Amit Bhavsar,
I don't understand your remark: a default value can be set by calling
copy() with a dictionnary in the parameter "default", as stated in
http://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/methods.html#id1
Example :
             defaults={'origin': 'test', 'type': 'internal'}
             id = self.pool.get('stock.picking').copy(cr, uid, 1,
defaults, context={})

I've pushed a trivial fix which lets custom addons use it instead of
overriding the value of related key in content of the dictionnary.
Please re-open this bug and/or mark it "Fix committed".
Lionel