This question has been flagged
2 Replies
3306 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 ?

Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer

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?

Avatar
Discard