Hello, I have a module with one2many field, which installed without any problems. But when I update the module generates a KeyError for that field .
invf = env[self.comodel_name]._fields[self.inverse_name]
KeyError: 'ubicacion'
The code is:
class res_partner(models.Model):
_inherit = 'res.partner'
movimientos_dispenser = fields.One2many('movimientos','ubicacion',domain=[('fecha_retiro','=',False)])
class Movimientos(models.Model):
_name = 'movimientos'
name = fields.Many2one('dispenser',domain=[('disponible','=',True)] , ondelete='restrict', string='Codigo de dispenser', required=True)
ubicacion = fields.Many2one ('res.partner',domain=[('customer','=',True)], string="Ubicacion", required=True, ondelete="restrict")
Thank you for your help.
hello my friend, did you get a solution or you still need help ??
Hello, thanks for your interest. I resolved the problem correcting the dependences of the modules.
Regards ,Francisco.
Enviado: miércoles, 18 de noviembre de 2015 05:53 a.m.
Para: Francisco Tobar
Asunto: Re: How to solve KeyError one2many field ?
hello my friend, did you get a solution or you still need help ??
--Drees Far
Sent by Odoo S.A. using Odoo
happy for hearing that my friend :) but i though you will upvote my answer ... :/