Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
790 Lượt xem

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"

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 24
774
1
thg 4 25
558
2
thg 3 25
1480
3
thg 4 24
2031
0
thg 6 24
16