Odoo Help
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM
|
e-Commerce
|
Accounting
|
Inventory
|
PoS
|
Project management
|
MRP
|
etc.
How can i inherit "account.bank.statement.line" model?
I am trying to inherit "account.bank.statement.line" model. For this i am writing a below code. it's installing perfectly but fields not adding to table
.py file
*************************************************************************************************************
from openerp.osv import fields, osv
class account_bank_statement_line_extension(osv.osv):
_inherit = 'account.bank.statement.line'
_column={
'payment_reference':fields.char('payment_reference',size=50),
}
account_bank_statement_line_extension()
****************************************************************************
__openerp__.py
*****************************************************************************
{
'name': "Account Cashflow Extension",
'version': "1.0",
'author': "Samba",
'category': "Tools",
'description':"""
This module for to add payment_reference field to account_bank_statment_line
""",
'depends': ['account'],
'data': [
],
'demo': [],
'installable': True,
}
***********************************************************************************************
I don't have any view files. column "payment_reference" not adding to table "account_bank_statement_line".
To check weather column added or not, i am using pgadmin3. I have restarted pgadmin3 also.
Try adding :
_name = 'account.bank.statement.line'
Because I think that is the type of inheritance you are aiming for. Also, the calling of the class is deprecated, so you can remove the final "account_bank_statement_line_extension()".
Did you include the .py file in __init__.py as well?
[EDIT]
Its columns, not column!
i have included .py file in __init__.py, I had write more than 10 inherited modules without _name, those are updating correctly. But i unable to find the problem in this scenario.
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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 9/5/14, 6:02 AM |
Seen: 623 times |
Last updated: 3/16/15, 8:10 AM |