Hello !
I would like edit a sepcific object after a click on a button "B".
My model has a workflow.
The activity "A" lauch the action "change ()".
The button "B" move to "A" and then call "change ()".
I would like than "cgange ()" open a new edit form to edit a specific object.
I wrote that :
def change (self, cr, uid, ids)
... # create a new object attached to new_id
return {
"type": "ir.actions.act_window",
"name": "edit",
"res_model": "my_model",
"res_id": new_id,
"view_type": "form",
"view_mode": "form",
"view_id": self.pool.get('ir.model.data').get_object_reference(cr, uid, 'module', 'view_id')[1]
}
I have an error :
ValueError: No such external ID currently defined in the system: my_model
Thanks.
↧