Skip to Content
Menu
This question has been flagged
1 Reply
2360 Views
I'm getting an "unknown field" error, eventhough the model does have the fields. 
What am i doing wrong?



Traceback (most recent call last): File "/Users/jgs/jgs/Coding/Projects/odoo15/odoo/odoo/http.py", line 643, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/Users/jgs/jgs/Coding/Projects/odoo15/odoo/odoo/http.py", line 301, in _handle_exception raise exception.with_traceback(None) from new_cause odoo.tools.convert.ParseError: while parsing /Users/jgs/jgs/Coding/Projects/odoo15/odoo/addons/rectanglemaps/views/create_order_views.xml:4 Fehler bei der Validierung der Ansicht nahe: Unbekanntes Feld "event.registration.event_booth_id" in domain of ([('event_id', '=', event_id), ('event_booth_id.halle_id', '=', halle_id)]) View error context: {'file': '/Users/jgs/jgs/Coding/Projects/odoo15/odoo/addons/rectanglemaps/views/create_order_views.xml', 'line': 8, 'name': 'rectanglemaps.order.wizard.form', 'view': ir.ui.view(2490,), 'view.model': 'rectanglemaps.order.wizard', 'view.parent': ir.ui.view(), 'xmlid': 'rectanglemaps_create_order_view_form'}


This is my code:

<record id="rectanglemaps_create_order_view_form" model="ir.ui.view">
<field name="name">rectanglemaps.order.wizard.formfield>
<
field name="model">rectanglemaps.order.wizardfield>
<
field name="arch" type="xml">
<form>
<group>
<group>
<field name="event_id" readonly="1"/>
group>
<
group>
<field name="event_registration_ids"
widget="many2many_tags"
domain="[('event_id', '=', event_id), ('event_booth_id.halle_id', '=', halle_id)]"/>
<
field name="plan" widget="image"/>
group>
group>
<
footer>
<button string="Anlegen" class="btn-primary" special="save"/>
<
button string="Abbrechen" class="btn-secondary" special="cancel"/>
footer>
form>
field>
record>


And this is the model:

# -*- coding: utf-8 -*-
from odoo import models, fields, api
from . import prepare_engine as rectanglemaps_engine


class EventBoothRegistration(models.Model):
_inherit = 'event.booth.registration'

plan = fields.Binary(string='Plan', attachment=True)

and EventBooth

class EventBooth(models.Model):
_inherit = 'event.booth'

name = fields.Char(string='Name', compute='_compute_name')
display_name = fields.Char(string="Anzeigename", compute='_compute_display_name', inverse='_inverse_display_name', store=True)

# Verbundene Halle
halle_id = fields.Many2one('rectanglemaps.halle', string='Halle')




thank you for you patience!

Avatar
Discard
Related Posts Replies Views Activity
2
Mar 23
10017
1
Feb 18
2298
1
Feb 16
2509
1
Mar 15
3163
1
May 24
765