Skip to Content
Menu
This question has been flagged
1 Reply
2277 Views
class stock_transfer(osv.osv):
 _inherit="stock.transfer"
_columns={'psd_allow_logo':fields.boolean('Alow Logo'),
 }
stock_transfer()
class indent_report(osv.osv_memory):
 _inherit = "indent.report"
_columns = {
     'psd_allow_logo':fields.boolean('Alow Logo'),'psd_allow_logo':fields.boolean('Alow Logo'),
     }
def write(self, cr, uid, ids, psd_allow_logo, context = None):
    res = super(indent_report, self).write(cr, uid, ids, values, context = active_ids)
if 'psd_allow_logo' in values:
       for res in self.browse(cr, uid, ids, context = active_ids):
           self.pool.get('stock.transfer').write(cr, uid, [res.stock_transfer_id.id], {'psd_allow_logo': values['psd_allow_logo'],}, context = active_ids)
    return res}
indent_report()
#i'm trying to write the value from indent_report.psd_allow_logo to stock_transfer.psd_allow_logo But the write function is'nt working.
Avatar
Discard
Author Best Answer
self.pool.get('stock.transfer').write(cr,uid,active_ids[0],{'psd_allow_logo':rec.psd_allow_logo})
#adding that to indent.report solved the issue, i was missing active_ids
Avatar
Discard
Related Posts Replies Views Activity
1
Jun 15
3284
1
Oct 15
4187
4
Apr 24
170724
0
Dec 23
606
5
Nov 24
217128