Hi guys
I just created a new model picking.process in a custom module.
Something strange happens. If someone can help me it would be great.
When i do this :
class PickingProcess(models.Model):
_inherit = "mail.thread"
_name = 'picking.process'
input_action = fields.Char("Action" ,store=True)
@api.onchange("input_action")
def on_change_input_action(self):
_logger.error("ooooooooooooooooooooo")
if self.input_action != self.input_action2 :
self.pick = 4909
_logger.error(self.pick)
for pack in self.pick.pack_operation_ids:
pack.qty_done = 1
the qty_done is not save BUT if i do pack.write({"qty_done":1}) it works.
If i do that on a _compute with a for record in self: .....
it s the same thing so i imagine it s not the on_change the mistake.
Could you explain me why? and what can i do for correct this bug it works perfectly in others model i made :(
Thanks a lot