我想在網站上顯示地址欄,但它給訪問錯誤。出於某種原因,我無法在網站上使用聯繫人窗口小部件。odoo res.partner地址欄訪問網站上的錯誤
當我作爲公共用戶訪問該頁面時,它顯示500內部服務器錯誤。但如果我是管理員,一切正常。
在我的XML模板,我寫如下:
<span t-field="event.address_id.city" groups="base.group_public"/>,
<span t-field="event.address_id.country_id.name" groups="base.group_public"/>
在ir.model.access.csv文件我寫如下:
access_res_partner,res.partner,base.model_res_partner,base.group_public,1,0,0,0
也試過
access_res_partner,res.partner,base.model_res_partner,,1,0,0,0
但顯示以下錯誤:
AccessError: (u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: res.partner, Operation: read)', None)
Error to render compiling AST AccessError: (u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: res.partner, Operation: read)', None) Template: website_event.index Path: /templates/t/t/div/div[2]/div[2]/div[1]/ul/li/div/div/div[3]/div/div[3]/span[1] Node: ,
我也是在XML嘗試這種不組,但結果是一樣的:
<span t-field="event.address_id.city"/>,
<span t-field="event.address_id.country_id.name"/>
我怎樣才能解決這個問題。