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

How to add additional fields to the custom module?

By
yogesh
on 3/13/15, 3:45 AM 541 views

Hello all,

I am facing problem in adding fields to the custom module.

I have already created the custom module with 5 fields,now i want add extra 2 fields to that module.I tried to change in the original source code but it displaying error.

Please help me on how to do this..

Thanks in advance.

show your error.

Mansi Kariya (mka)
on 3/13/15, 4:38 AM
Hello Mansi Kariya
Thanks for your reply.

I created custom module but with the same source if i add fields ,it throws the following error.

Traceback (most recent call last):
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\http.py", line 517, in _handle_exception
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\http.py", line 535, in dispatch
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\http.py", line 294, in _call_function
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\service\model.py", line 113, in wrapper
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\http.py", line 291, in checked_call
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\http.py", line 751, in __call__
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\http.py", line 387, in response_wrap
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\openerp\addons\web\controllers\main.py", line 953, in call_button
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\openerp\addons\web\controllers\main.py", line 941, in _call_kw
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 237, in wrapper
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\openerp\addons\base\module\module.py", line 537, in button_immediate_upgrade
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 237, in wrapper
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\openerp\addons\base\module\module.py", line 498, in _button_immediate_function
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\modules\registry.py", line 341, in new
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\modules\loading.py", line 354, in load_modules
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\modules\loading.py", line 263, in load_marked_modules
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\modules\loading.py", line 182, in load_module_graph
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\modules\loading.py", line 118, in _load_data
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\tools\convert.py", line 901, in convert_file
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\tools\convert.py", line 987, in convert_xml_import
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\tools\convert.py", line 853, in parse
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\tools\convert.py", line 763, in _tag_record
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 237, in wrapper
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\openerp\addons\base\ir\ir_model.py", line 1032, in _update
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 237, in wrapper
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\openerp\addons\base\ir\ir_ui_view.py", line 282, in write
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 237, in wrapper
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 360, in old_api
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\models.py", line 3695, in write
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 235, in wrapper
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 552, in new_api
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\models.py", line 3866, in _write
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\api.py", line 235, in wrapper
  File "C:\Program Files (x86)\Odoo 8.0-20141201\server\.\openerp\models.py", line 1271, in _validate_fields
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition

Error details:
Field `ID_APPLICATION` does not exist

Error context:
View `kegenmail.form`
[view_id: 2486, xml_id: kegenmail.view_kmail_form, model: kegenmail, parent_id: n/a]" while parsing file:///C:/Program Files (x86)/Odoo 8.0-20141201/server/openerp/addons/kegenmail/view/mailkegen.xml:25, near
<record model="ir.ui.view" id="view_kmail_form">
			<field name="name">kegenmail.form</field>
			<field name="model">kegenmail</field>
			<field name="arch" type="xml">
				<form string="kmail form">
					<header>
						<button name="view_checking_form" type="object" class="oe_inline oe_stat_button"><p><B>Search</B></p></button>
					</header>
					<sheet>
					
					<group>
						<field name="ID_APPLICATION"/>
						<field name="DH_DEPOTPOSTAL"/>
						
						
						<button name="button_function" type="object" class="oe_inline oe_stat_button"><p><B>Search</B></p></button>
					</group>
					<separator string="" colspan="4"/>
					<group>
						
						<field name="IDT_REF_PLI"/>
						<field name="RETURN_TYPE"/>
						<field name="ID_NOMIDENT"/>
						<field name="ID_ADR2"/>
						<field name="ID_ADR3"/>
						<field name="ID_ADR4"/>
						<field name="ID_ADR5"/>
						
					</group>
					</sheet>
				</form>
			</field>
		</record>

please help me on this.
Thankyou
Regards,
YOGESH

On Fri, Mar 13, 2015 at 2:08 PM, Mansi Kariya (mka) <mka@mail.odoo.com> wrote:

show your error.

--
Mansi Kariya (mka)
Sent by Tiny ERP Pvt Ltd using Odoo about Forum Post How to add additional fields to the custom module?

yogesh
on 3/13/15, 5:06 AM

hello yogesh, its unable to found ID_APPLICATION field in kegenmail model. Have you defined this field list?? check it once, If yes then verify once again or show your py file's code

Mansi Kariya (mka)
on 3/13/15, 5:29 AM
0
yogesh
On 3/13/15, 9:05 AM

Thanks @Mansi kariya and @Baiju ks,

I got the results,the mistake What I made is ,instead of giving ID_APPLICATION,I have given it as ID_APPLICAION.So silly mistake:)

0

Baiju

--Baiju--
3154
| 5 4 8
Kochi, India
--Baiju--
ODOO technical and functional

        I like learning new thing, especially technical thing. I am a quick learner, I can learn technical things very fast. I have good logical skill,  I have immense interest in programming.

e-mail id : baijuks@hotmail.com

Baiju
On 3/13/15, 5:41 AM

Hi Yogesh,

This error message says that field 'ID_APPLICATION' is not defined in the specifed object (kegenmail).

Please check about this field in your .py file.

Hope this helps...

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: 3/13/15, 3:45 AM
Seen: 541 times
Last updated: 3/16/15, 8:10 AM