ниже я упомянул grievance.redressal (модель), просмотр и список контроля доступа.я попытался добавить acl для grievance.redressal (модель) в ir.model.access.csv.но модуль не работает, когда обновление сервера
файл класса:
class grievance_redressal(models.Model):
_name = 'grievance.redressal'
name = fields.Char('Name with Initial', size=64)
Просмотр:
<record id="view_grievance_redressal_form" model="ir.ui.view" >
<field name="name">grievance.redressal.form</field>
<field name="model">grievance.redressal</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Grievance Redressal" version="7.0">
<sheet>
<group>
<field name="name"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_grievance_redressal_tree" model="ir.ui.view">
<field name="name">grievance.redressal.tree</field>
<field name="model">grievance.redressal</field>
<field name="arch" type="xml">
<tree string="Grievance Redressal">
<field name="name"/>
</tree>
</field>
</record>
<record id="action_grievance_redressal" model="ir.actions.act_window">
<field name="name">Grievance Redressal</field>
<field name="res_model">grievance.redressal</field>
<field name="view_mode">tree,form</field>
<field name="view_type">form</field>
</record>
<menuitem action="action_grievance_redressal" id="grievance_redressal_menu" parent="operations" sequence="30"/>
ACL:
access_grievance_redressal_group_officer, access.grievance.redressal.group.officer, model_grievance.redressal, group_officer 1,0,0,0
, если я попытался добавить ACL для вновь созданной модели (grievance.redressal) в odoo.но выдает следующую ошибку
File "/home/user/Projects/test/test-server/openerp/service/server.py", line 885, in preload_registries
registry = RegistryManager.new(dbname, update_module=update_module)
File "/home/user/Projects/test/test-server/openerp/modules/registry.py", line 385, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/user/Projects/test/test-server/openerp/modules/loading.py", line 333, in load_modules
force, status, report, loaded_modules, update_module)
File "/home/user/Projects/test/test-server/openerp/modules/loading.py", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/home/user/Projects/test/test-server/openerp/modules/loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/home/user/Projects/test/test-server/openerp/modules/loading.py", line 98, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/home/user/Projects/test/test-server/openerp/tools/convert.py", line 846, in convert_file
convert_csv_import(cr, module, pathname, fp.read(), idref, mode, noupdate)
File "/home/user/Projects/test/test-server/openerp/tools/convert.py", line 914, in convert_csv_import
raise Exception(_('Module loading %s failed: file %s could not be processed:\n %s') % (module, fname, warning_msg))
Exception: Module loading test failed: file test/security/ir.model.access.csv could not be processed:
Line 1 : model+AF8-id
CSV-файл: