コンテンツへスキップ
メニュー
この質問にフラグが付けられました
7874 ビュー

Hello, i am trying to do a simple class extension to the model ir.ui.menu, but i find it baffling that it shows a error saying that the field doesn't exist as i am currently creating it.

This is my code

class Menu(osv.osv):
        _name = 'ir.ui.menu'
        _inherit = 'ir.ui.menu'
        _columns = {
            'test_field':fields.many2one('related.model', 'Tests', ondelete='cascade')
        }
Menu()

But this raises the following error.

File "/home/erp_user/openerp/test/server/openerp/sql_db.py", line 226, in execute res = self._obj.execute(query, params) ProgrammingError: column ir_ui_menu.test does not exist LINE 1: ...",ir_ui_menu."parent_id",ir_ui_menu."parent_left",ir_ui_menu...

I have no clue of how to declare the field in other way as this one has always functioned. Any ideas? Thanks in advance.

アバター
破棄

Please post your xml view.

著作者

That is the thing, i stil haven't done it. I erased my view trying to solve this, only declaring the field still with no result. I have a <page string="Menus & Actions"></page> with no content, and still it appears.

avoid the _name and verify the result

著作者

No, that was no good at all. I actually resolved it, but was going into the database, unsinstalling the module and then reinstalling it again. Very unpractical and still don't know what caused the error.

関連投稿 返信 ビュー 活動
4
12月 24
31107
2
3月 15
10403
1
12月 24
1770
1
10月 23
1861
1
8月 23
2209