跳至內容
選單
此問題已被標幟
784 瀏覽次數

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"

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
9月 24
769
1
4月 25
555
2
3月 25
1475
3
4月 24
2016
0
6月 24
16