Skip to Content
Menu
This question has been flagged
1 Reply
3033 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

Avatar
Discard
Author Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
3
Mar 21
8727
2
Sep 21
9616
9
May 21
25326
0
Jun 24
234
0
May 22
1051