Create linking between 2 modules to get the value in Odoo 9

Viewed 22

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

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

 class moveLot2(models.Model): 

           _inherit="stock.production.lot"

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

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

class moveds(models.Model): 

          _inherit="stock.move" 

          age = fields.Char()

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

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

0 Answers
Related