12345678910111213141516 |
- # -*- encoding: utf-8 -*-
- from openerp import models,fields,api
- class purchase_order_line(models.Model):
- _name = 'purchase.order.line'
- _inherit = 'purchase.order.line'
- #obtener referencia
- @api.one
- #@api.onchange('product_id')
- @api.depends('product_id')
- def _get_factory_reference(self):
- self.product_factory_ref = self.product_id.factory_reference
- #campo
- product_factory_ref = fields.Char(string='Referencia de fábrica', compute='_get_factory_reference')
|