Odoo Help

1

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

By
gennaooep
on 4/9/13, 4:40 PM 8,870 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"]]]

10

Felipe

--Felipe--
Felipe
967
| 5 4 8
Bogotá, Colombia
--Felipe--
Informatics engineer Industrial engineer
Felipe
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

Felipe
on 9/3/13, 11:42 AM
1
DNTQ
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
0
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.

0
Qamar Soft
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"}'

0

Grover Menacho

--Grover Menacho--
GH Mediacloud
2533
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

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.

0
gennaooep
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.

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

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

gennaooep
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/

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

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

gennaooep
on 4/10/13, 4:44 PM

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

Bista Solutions US, 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?

gennaooep
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.

Bista Solutions US, 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

gennaooep
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
0

Ray Carnes

--Ray Carnes--
15999
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

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

Completed Odoo Functional and Technical Training.

Major Skills:

  • 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.

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

Register

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)

Stats

Asked: 4/9/13, 4:40 PM
Seen: 8870 times
Last updated: 3/16/15, 8:10 AM