Odoo Help


Field created in database but not getting saved

Zakir Husain
on 5/3/16, 3:18 PM 315 views

I have create a module in that all fields are created but when i am saving record some field are not getting saved it shows me a warning message that they field are not found. but when i checked in DB those field are created in DB.

this is my model

_columns = {

'name':fields.char('Name', size=240, required=True),

'code':fields.char('Code', size=30, required=True),

'namel2':fields.char('Second Name', size=240),

'company_id':fields.many2one('res.company', 'Company', required=True, copy=False),

'exclude_transfer':fields.boolean('Exclude Transfer'), 

'debit_mainaccount_code': fields.char('Debit Main Account Code', size=20),

'credit_mainaccount_code': fields.char('Credit Main Account Code', size=20),

'is_fixed': fields.boolean('Is Fixed'),

'active':fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the salary component without removing it."),


Is Fixed , debit_mainaccount_code, exclude_transfer,debit_mainaccount_code are not found in that module.

can someone help ?


Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
Ankit H Gandhi(AHG)
| 5 3 6
Rajkot, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 5/4/16, 7:15 AM

Dear Zakir Husain,

Your code is working good but you need to set value 'True' of active boolean fields.


_defaults = {

'active': True


Hope above code help for you.


Ankit H Gandhi.


Need more info, is this an inherited model? What model is it? What does the xml look like? or do you create the records in code?

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.


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

1 follower(s)


Asked: 5/3/16, 3:18 PM
Seen: 315 times
Last updated: 5/4/16, 7:15 AM