Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
4455 Lượt xem

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'
Ảnh đại diện
Huỷ bỏ

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

Tác giả

I am comment the security csv from manifest everything ok,

Câu trả lời hay nhất

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>

Ảnh đại diện
Huỷ bỏ
Tác giả

not working bro,

Absolutely not, the problem occurs with version 10.

ok :(

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 2 19
10516
0
thg 4 15
3096
1
thg 8 18
14659
2
thg 6 17
29819
1
thg 2 16
2254