Odoo Help

0

Field created in database but not getting saved

By
Zakir Husain
on 5/3/16, 3:18 PM 431 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 ?

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

Like

_defaults = {

'active': True

}

Hope above code help for you.

Cheers,

Ankit H Gandhi.

0

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?

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

1 follower(s)

Stats

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