Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
4 Respostas
18146 Visualizações

When defining a one2many field on a wizard (TransientModel), you need to specify the column of the related model that points to the wizard.

How should I do this in case of a orm.TransientModel?

Avatar
Cancelar
Melhor resposta

Just like every other model.

See the example of wizard.select.move.template and wizard.select.move.template.line

Avatar
Cancelar
Autor

Thanks Lorenzo. But don't you think this foreign key on the 'other' object is strange? What happens if the wizard instance record is removed? Then this foreign key 'template_id' is invalid?

It depends on what referential action you set as 'ondelete'

Publicações relacionadas Respostas Visualizações Atividade
0
set. 19
3744
1
jun. 24
442
0
jul. 22
3741
1
fev. 16
4959
6
dez. 23
30713