Hello there,
I'm newbie in here, so my question is how can I add new relational fields One2many inside my existing inherit model??
Thank you.
Esta pergunta foi sinalizada
5280
Visualizações
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscrever-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
|
2
jul. 24
|
3305 | ||
|
|
1
set. 15
|
6738 | ||
|
|
1
jul. 22
|
7521 | ||
|
|
2
fev. 21
|
14880 | ||
|
|
3
abr. 20
|
12863 |
Are you not able to do it by defining new fields in the inherited model like this
class A(models.Model):
field1
field2
class B(models.Model):
_inherit="A"
one2many_field = fields.One2many(codmodel, inverse_name)
many2many_field = fields.Many2many(comodel)
??
Would have been nicer if you could add more information about the problem you're facing.
@Karan BK, hey there I've found the solution. What I have done wrong is not mentioned inverse relation in my main module, after doing this things works well, anyway thanks for response. Thanks