I have 2 tables
1- fci_assignment_stuff
2- fci_assignment pool
i need when i change state in first table it should change in the other table too
Here is my code to change the other table but it does not run :(
def act_finish(self, cr, uid, ids, context=None):
if context is None:
context = {}
assignment_obj = self.pool.get("fci.assignment.pool")
for ass_data in assignment_obj.browse(cr, uid, ids, context=context):
ass_data.search(cr,uid,('code', '=', self.code)).write(cr, uid, {'state':'f'})
return True
sry @Cyril Gaspard (GEM) but it doesn't work :( it deosn't change the status in th other table i only change this assignment_obj.write(cr, uid, assignment_ids, {'state':'f'}, context=context) because it's the new status
i edit it more ... it worked ... thanks :D