No changes For fields After Write Method
Hi All , I Tried To Use Write Method inside Button WorkFlow To Update filed In account.asset.asset Module But no Changes Happened For This Field
And This Is My Code
def action_done(self, cr, uid, ids, context=None): mro_obj = self.pool.
assets_obj = self.pool.
assets_
for order in self.browse(cr, uid, ids, context=context):
self.write(cr, uid, ids, {'state': 'done', 'date_execution': time.strftime(
return True
Please I Need Help
Thanks A Lot
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Serpent Consulting Services
- Solved:
- 2014-02-24
- Last query:
- 2014-02-24
- Last reply:
- 2014-02-24
Ali,
Questions for you!
1. asset_ids = records_
2. Is asset_id value coming as any ID? If there is a value, the write will get succeeded.
3. With the IDs of current model you are operating on mro.order by using mro_obj.browse(cr, uid, ids). This is wrong if the model is not mro.order
4. You use for order in self.browse(cr, uid, ids, context=context)! Are you using same IDs in current model?
Thanks.
Sorry For The Code
This Is My Code But It Didn't Work
def action_done(self, cr, uid, ids, context=None):
mro_obj = self.pool.
for records_lines_time in mro_obj.browse(cr, uid, ids):
assets_obj = self.pool.
for order in self.browse(cr, uid, ids, context=context):
return True
Dear Ali,
Please tell us the current model name!
Ali,
Lets optimise:
1. Remove mro.order pooling.
2. Make sure your move done works ok.
3. Comment it and check.
Thanks.
Thanks Jay For You The Answer Is Like That
def action_done(self, cr, uid, ids, context=None):
assets_obj = self.pool.
for records_lines_time in self.browse(cr, uid, ids):
return True
Thanks Serpent Consulting Services, that solved my question.
Welcome!