Odoo Help

Welcome!

This community 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.

0

Error while printing a tree: Can't render view base.view_partner_form for model: res.partner

By
Selverine
on 4/13/16, 8:56 AM 370 views

Hi all,


I am trying to print a tree in my view, but I not able to find the reason of the error.

Is it because my table is in another folder?


Please find below the code:

Inside my xml:

<field name="daily_action">  
                  <tree string="partner_id">
                        <field name="partner_id"/>
                         <field name="date_action"/>
                         <field name="action"/>
                         <field name="titre"/>
                         <field name="text"/>
                         <field name="numero"/>
                   </tree>

</field>

Inside my .py

 'daily_action': fields.one2many('daily.action', 'partner_id', 'Daily Action'),

And the daily.action table ( in another .py, in another folder)

class daily_action(osv.osv):
    _name = 'daily.action'
    _description = 'Daily Action'
    _columns = {
        'partner_id': fields.many2one('res.partner', 'Partner Id', required=True),
        'date_action': fields.date('Date', required=False, readonly=False, select=True),
        'action': fields.char('action', size=128, required=False, translate=False),
        'titre': fields.char('titre', size=128, required=False, translate=False),
        'text': fields.text('texte', size=128, required=False, translate=False),
        'numero': fields.text('texte', size=128, required=False, translate=False),
 
    }    _defaults = {
        'date_action': fields.date.context_today,
        'partner_id': lambda self, cr, uid, context: context.get('partner_id', False),
    }
daily_action()

Here the error:

2016-04-13 12:43:10,569 7809 ERROR HG_1 openerp.addons.base.ir.ir_ui_
view: Can't render view base.view_partner_form for model: res.partnerTraceback (most recent call last):  File "/opt/HG_test/openerp/openerp/
addons/base/ir/ir_ui_view.py", line 126, in _check_render_view    fvg = self.pool.get(view.model).
fields_view_get(cr, uid, view_id=
\view.id
, view_type=view.type, context=context)  File "/opt/HG_test/openerp/openerp/
addons/base/res/res_partner.
py", line 350, in fields_view_get    res = super(res_partner,self).
fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)  File "/opt/HG_test/openerp/openerp/
osv/orm.py", line 2272, in fields_view_get    xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=ctx)  File "/opt/HG_test/openerp/openerp/
osv/orm.py", line 1925, in __view_look_dom_arch    fields_def = self.__view_look_dom(cr, user, node, view_id, False, fields, context=context)  File "/opt/HG_test/openerp/openerp/
osv/orm.py", line 1871, in __view_look_dom    fields.update(self.__view_
look_dom(cr, user, f, view_id, in_tree_view, model_fields, context))  File "/opt/HG_test/openerp/openerp/
osv/orm.py", line 1871, in __view_look_dom    fields.update(self.__view_
look_dom(cr, user, f, view_id, in_tree_view, model_fields, context))  File "/opt/HG_test/openerp/openerp/
osv/orm.py", line 1871, in __view_look_dom    fields.update(self.__view_
look_dom(cr, user, f, view_id, in_tree_view, model_fields, context))  File "/opt/HG_test/openerp/openerp/
osv/orm.py", line 1871, in __view_look_dom    fields.update(self.__view_
look_dom(cr, user, f, view_id, in_tree_view, model_fields, context))  File "/opt/HG_test/openerp/openerp/
osv/orm.py", line 1788, in __view_look_dom    xarch, xfields = relation.__view_look_dom_arch(
cr, user, f, view_id, ctx)


Someone has an idea what is wrong with my tree?


Many thanks,


Selverine

0
Selverine
On 4/17/16, 5:34 AM

A little up for the hope ;-).


I have the impression that the problem is due to the fact that my table is declare in another folder.

May I need to do something special?


Many thanks,


Selverine

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/13/16, 8:56 AM
Seen: 370 times
Last updated: 4/17/16, 5:34 AM