Community mailing list archives

community@mail.odoo.com

Avatar

Re: Related fields to account invoice cause Maximum Recursion Depth Exceeded

by
Khaled Hamed, Khaled Hamed
- 12/01/2017 05:54:24
Is it a mistyped realted or should be related. 

On Dec 1, 2017 12:20 PM, "Dimitar Epitropov" <de@dxfactory.eu> wrote:

Hi guys,

Any idea why this causes maximum recursion depth to exceed and anyway to resolve it?

class Protocol(models.Model):
    _name = "bg.protocol"
    _description = "Protocol"

    name = fields.Char(string='Protocol', required=True,
                       copy=False, readonly=True, index=True, default=lambda self: _('New'))
    invoice_id = fields.Many2one(string='Invoice', required=True, copy=False)
    invoice_line_ids = fields.One2many(realted=invoice_id.invoice_line_ids, store=True, readonly=True, copy=False)

Thanks!
--
Logo

Dimitar Epitropov | Odoo developer
+359 883 356 833

www.dXFactory.eu
Consulting | Project Outsourcing | Software Development

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

Reference