Odoo Help


Custom Module error: field state unknown in domain [["state","in",["done"] ]]

on 4/9/13, 4:40 PM 11,713 views

when I click on my button "new" of my custom module I ve this error, have you idea : Error: field state unknow in the domain [["state","in",["done"]]]




| 5 5 8
Bogotá, Colombia
Informatics engineer Industrial engineer
On 7/15/13, 3:25 PM

It is because a field depends of the field state, but in the view there is not that field so just add

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

this solved my problem

mesay amare
on 9/3/13, 6:45 AM

pls thumb it up then

on 9/3/13, 11:42 AM
On 6/7/13, 11:02 PM

In the view, do have 'state' field???

Yes. I've actually done this two ways, by having <field name="state"/> and also using <field name="state" widget="statusbar"/>

Shaun Dawson
on 6/12/13, 4:44 PM
On 8/27/14, 5:04 AM

verify if you display the state field

<field name="state" widget="statusbar" statusbar_visible="draft,sent,progress,done"  statusbar_colors='{"invoice_except":"red","waiting_date":"blue"}'


Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 4/9/13, 10:41 PM

There is a domain on one of the fields on your form that is using the STATE field, but this field is not available on the form.

Shaun Dawson
On 6/7/13, 9:32 PM

I had this exact same problem, and I think I fixed it by giving "state" a default value:

_defaults = {
    'state': 'new'

I'm not positive that's what fixed it because I was tracking a number of issues at the time, but my theory is that OpenERP didn't actually add the field into the domain until it actually needed it.


Grover Menacho

--Grover Menacho--
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Odoo Developer

Grover Menacho
On 7/15/13, 5:12 PM

I think that you have a field on your code or your view calling state. Maybe invisible or readonly.

On 4/10/13, 12:40 PM

I have no state field in my form. OEP version that I use is 7.0-20130403-231707, it may be a bug.

Best to post your reply as a COMMENT, not an ANSWER. Either you need to remove the domain or add the field. If you post your XML it may be easier to spot the problem.

Ray Carnes
on 4/10/13, 1:28 PM

Excuse. My XML > 600 charaters . How send it ? karma < 30.

on 4/10/13, 3:18 PM

Have it hosted and post the link - you can insert a space if you can't post links yet. http://collegefallout.com/10-good-free-file-hosting-websites-with-no-sign-up/

Ray Carnes
on 4/10/13, 3:50 PM

here my xml http://www.yourfilelink.com/get.php?fid=835642

on 4/10/13, 4:44 PM

It doesn't help me spot the problem. Sorry.

Ray Carnes
on 4/10/13, 9:22 PM

I do not understand me, I do not see any fields in the xml state. The parser can be confused fields state_id with fields state? is it possible?

on 4/11/13, 12:10 PM

No. The parser won't get confused. Something is referring to state and you need to find out what.

Ray Carnes
on 4/11/13, 12:23 PM

I don't understand, this the sccreenshots errors : http://www.yourfilelink.com/get.php?fid=835725

on 4/12/13, 8:56 AM

Are you using a workflow? That refers to state.

Shaun Dawson
on 6/7/13, 9:14 PM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 4/9/13, 4:40 PM
Seen: 11713 times
Last updated: 7/19/17, 4:42 PM