1234567891011121314 |
- from openerp import models, fields, api
- class factory_ref_stock(models.Model):
- _inherit = 'stock.move'
- _name = 'stock.move'
- @api.one
- @api.depends('product_id')
- def get_factory_ref(self):
- self.factory_ref = self.product_id.factory_reference
- factory_ref = fields.Char(string="Factory Reference", compute="get_factory_ref")
|