跳至内容
菜单
此问题已终结
3 回复
4436 查看

where is wrong, is my code 

ir.model.access.csv

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

access_battery_rent,battery.rent.account.user,battery.rent.model_battery_rent,group_pyth_disciple,1,1,1,1


and security.xml

<?xml version="1.0" encoding="utf-8"?>

<odoo>

    <data>

        <record id="group_pyth_disciple" model="res.groups">

            <field name="name">Maintenance Battery Rent</field>

        </record>

    </data>

</odoo>

error
File "D:\openAps\odoo10\Scripts\odoo-10\odoo\api.py", line 760, in __getitem__
    return self.registry[model_name]._browse((), self)
  File "D:\openAps\odoo10\Scripts\odoo-10\odoo\modules\registry.py", line 178, in __getitem__
    return self.models[model_name]
KeyError: u'odoo'
形象
丢弃

If you comment the security csv file from manifest, does it make any difference?

编写者

I am comment the security csv from manifest everything ok,

最佳答案

Replace odoo to openerp: hope this will hepls

<openerp>

    <data>

        <record id="group_pyth_disciple" model="res.groups">

            <field name="name">Maintenance Battery Rent</field>

        </record>

    </data>

</openerp>

形象
丢弃
编写者

not working bro,

Absolutely not, the problem occurs with version 10.

ok :(

相关帖文 回复 查看 活动
3
2月 19
10473
0
4月 15
3069
1
8月 18
14622
2
6月 17
29773
1
2月 16
2254