This question has been flagged
4 Replies
4496 Views
    <record id="view_sale_history_tree" model="ir.ui.view">
        <field name="name">sale.history.tree</field>
        <field name="model">sale.history</field>
        <field name="arch" type="xml">
            <tree string="history">
                <field name="date"/>
                <field name="user"/>
                <field name="reason"/>
            </tree>
        </field>
    </record>

Error came like this openerp.addons.base.ir.ir_ui_view: Can't render view for model: sale.history what is the error in this view

Avatar
Discard

Please copy/paste the entire error. Thanks.

Best Answer

Hi,

Check the __init__.py file of your module. Because the object sale.history is not yet created for the view. You might have not done the import of wizard or folder containing the .py file defining the class 'sale.history'

Avatar
Discard
Best Answer

seems something missing to you in model class when comparing with relevant view.xml please double check those fields in view.xml again with model class

Avatar
Discard
Best Answer

You are using the model sale.history. Are you sure that model exist?

Avatar
Discard
Best Answer

If the above solution can check it then after u can check  and if you may successfully  add the entery of view file in under field

data['yourview filename.xml ']  in   __openerp__.py file  

Avatar
Discard