Odoo Help

0

How to add column in List View?

By
babu
on 6/2/14, 6:21 AM 1,168 views

Hi to all,

I am new to openerp. In Quotations, I am added new column but it showing error. Please any one help me 

Server Traceback (most recent call last): File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\openerp\addons\web\session.py", line 89, in send File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\netsvc.py", line 296, in dispatch_rpc File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\service\web_services.py", line 626, in dispatch File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\osv\osv.py", line 190, in execute_kw File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\osv\osv.py", line 132, in wrapper File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\osv\osv.py", line 199, in execute File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\osv\osv.py", line 187, in execute_cr File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\openerp\addons\base\module\module.py", line 426, in button_immediate_install File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\openerp\addons\base\module\module.py", line 477, in _button_immediate_function File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\pooler.py", line 39, in restart_pool File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\modules\registry.py", line 233, in new File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\modules\loading.py", line 354, in load_modules File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\modules\loading.py", line 256, in load_marked_modules File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\modules\loading.py", line 161, in load_module_graph File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\modules\registry.py", line 118, in load File "C:\Program Files\OpenERP 7.0-20140526-231154\Server\server\.\openerp\osv\orm.py", line 888, in create_instance

 

TypeError: The model "sale" specifies an unexisting parent class "sale" You may need to add a dependency on the parent class' module.

 

Here my code,

{
    'name': 'Sale Quotations',
    'version': '1.0',
#    'category': 'Project',
#    'sequence': 5,
    'description': """


    """,
    'author':  'Team',
    'website': 'http://www.example.com',
    'depends': ["sale"],
    'data': [
        'quotations_view.xml',

    ],
   
    'installable': True,
    'auto_install': False,
}

 

Xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
    <record id="quotation_inherit_tree_view" model="ir.ui.view">
        <field name="model">sale.order</field>
        <field name="type">tree</field>
        <field name="inherit_id" ref="sale.view_quotation_tree"/>
        <field name="arch" type="xml">
        <xpath expr="//field[@name='partner_id']" position="after">
            <field name="client_order_ref" string="Customer Reference"/>
        </xpath>
        </field>
    </record>
</data> 
</openerp>

py file

from openerp.addons.sale import sale
from openerp.osv import fields, osv
import time
from openerp import SUPERUSER_ID
import openerp.addons.decimal_precision as dp
#from openerp import tools
from openerp.tools.translate import _

class quotations(osv.osv):
    _inherit = 'sale.order'

quotations()

i think you inherit sale module right? inheriting sale.order so you put _inherit='sale.order' _inherit = 'sale.order' Add client_order_ref in python file _columns = { 'client_order_ref':fields.many2one('res.partner','Customer Reference'), }

Rajkumar
on 6/2/14, 6:26 AM
0
madhuopenerp
On 6/2/14, 6:34 AM

Hi Rajkumar,

Thanks for responding me,

After changed as you mentioned,But it showing the same error.

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

2 follower(s)

Stats

Asked: 6/2/14, 6:21 AM
Seen: 1168 times
Last updated: 3/16/15, 8:10 AM