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'),
}
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
# if rec.psd_allow_logo:
# self.pool.get('stock.transfer').write(cr, uid, ids, {'psd_allow_logo' : True}, context=context)
# else:
# self.pool.get('stock.transfer').write(cr, uid, ids, {'psd_allow_logo' : False}, context=context)
indent_report()
我正在尝试更改 indent_report.psd_allow_logo 时更改 stock_transfer.psd_allow_logo 但写入不起作用,我什至尝试过