Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
786 Tampilan

I have added a custom one2many field in crm.lead model:

class CrmLead(models.Model):

    _inherit = 'crm.lead'

​quote_ids = fields.One2many('insurance.quotes', 'crm_lead_id', string='Quotes')

class InsuranceQuotes(models.Model):

    _name = 'insurance.quotes'

    _description = 'Insurance Quotes'


    crm_lead_id = fields.Many2one('crm.lead', string='CRM Lead')

    broker_id = fields.Many2one('res.partner', string='Broker', domain="[('is_broker', '=', True)]", context={'default_is_broker': True})

I get following error:

UncaughtPromiseError > OwlError

Uncaught Promise > Invalid loop expression: "undefined" is not iterable


My xml code is below. (mentioned here without tag brackets due to some rendering issue here

Can anyone help me with correct version odoo 17 syntax. TIA

xpath expr="//div[hasclass('o_kanban_record_bottom')]" position="after"
div class="oe_kanban_bottom_right o_kanban_bottom_extra"
t t-set="record" t-value="record"
li t-foreach="record.quote_ids" t-as="quote"

p t-esc="quote.partner_id.name"

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Sep 24
774
1
Apr 25
555
2
Mar 25
1479
3
Apr 24
2027
0
Jun 24
16