Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Error: QWeb2 - template['ListView.rows']: Runtime Error: Error: QWeb2 - template['ListView.row']: Runtime Error: Error: Campo desconocido state en el dominio [["state","in",["draft"]]]

By
Vladimir
on 11/10/16, 10:11 AM 122 views


Hello everyone, I have the following Error,
Error: QWeb2 - template['ListView.rows']: Runtime Error: Error: QWeb2 - template['ListView.row']: Runtime Error: Error: Campo desconocido state en el dominio [["state","in",["draft"]]]
this is the view code:
<group col="2" colspan="2">
        <field name="id_orden_servicio" />
</group>
and in a .py file.
state = fields.Selection([('draft', 'draft')], default='draft')
id_orden_servicio = fields.Many2one("dfsismet_orden_servicio", onupdate='cascade', ondelete='cascade',                                    string="Orden Servicio",                                    index=True, required=True,                                    states={'draft': [('readonly', True)]},                                    domain="""[('state','!=','Calibracion'),                                    ('id_calibrar_orden', '=', False),('instrumento_tipo','=','1')]""")

Thanks a lot.


0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 11/11/16, 2:03 AM

Define state field in the view, if it is not need, still define and make it invisible.

Because whenever you add state property in your .py to control the field, then odoo builds the XML Views Arch with modifers stating the state property, so in order to achieve that odoo tries to find the value of state, but when it couldn't  find  the state field itself, then the above error will be raised.

So change your view accordingly as below

    <field name="id_orden_servicio" />
<field name="state" invisible="1"/>
</group>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/10/16, 10:11 AM
Seen: 122 times
Last updated: 11/11/16, 7:56 AM