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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
2172
Views
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