跳至内容
菜单
此问题已终结

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?

形象
丢弃
相关帖文 回复 查看 活动
1
5月 24
2720
1
3月 23
2471
0
12月 22
3118
3
9月 21
9537
0
6月 21
3021