Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3127 Vizualizări

I have 2 modules and there is no One2many/Many2one linking between these 2 .

So I want to create these linkings to get the "age" field from stock.move in stock.production.lot


class moveds(models.Model): 

          _inherit="stock.move" 

          age = fields.Char()

          lots=fields.One2many('stock.production.lot','moves',copy=True)


 class moveLot2(models.Model): 

           _inherit="stock.production.lot"

           moves=fields.Many2one('stock.move')

           age2 = fields.Char(related='moves.age', store=True)


So I want to get in my "age2" field the value of "age", there is no error, but age2 is empty,  the linking is correct between o2m and m2o?

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mai 24
3188
1
mar. 23
2967
0
dec. 22
3599
3
sept. 21
9927
0
iun. 21
3314