Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

500 Internal Server Error (purchase module)

Subscribe

Get notified when there's activity on this post

This question has been flagged
errorErrorTraceback
2 Replies
6416 Views
Avatar
Max Baldwin

Hello everybody,

We are trying to implement purchasing in Odoo 12 CE. The problem we are having is when a vendor clicks the link that we send them they are shown a "500 Internal Server Error". I tracked down the log entry and I will post it below. Any help in resolving this issue would be greatly appreciated.


2019-01-25 14:39:51,495 955 INFO odoo odoo.addons.base.models.ir_model: Access Denied by ACLs for operation: read, uid: 4, model: purchase.order 
2019-01-25 14:39:51,545 955 ERROR odoo odoo.addons.website.models.ir_http: 500 Internal Server Error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_1332_4912
  File "<template>", line 2, in body_call_content_4911
  File "<template>", line 35, in foreach_4907
  File "/usr/lib/python3/dist-packages/odoo/tools/image.py", line 330, in image_data_uri
    FILETYPE_BASE64_MAGICWORD.get(base64_source[:1], 'png'),
TypeError: 'bool' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 203, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 832, in dispatch
    r = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 340, in checked_call
    result.flatten()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1267, in flatten
    self.response.append(self.render())
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1260, in render
    return env["ir.ui.view"].render_template(self.template, self.qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1276, in render_template
    return self.browse(self.get_view_id(template)).render(values, engine)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 231, in render
    return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render
    return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1285, in render
    return self.env[engine].render(self.id, qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 59, in render
    result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 272, in render
    self.compile(template, options)(self, body.append, values or {})
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 351, in _compiled_fn
    raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.models.qweb.QWebException: 'bool' object is not subscriptable
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_1332_4912
  File "<template>", line 2, in body_call_content_4911
  File "<template>", line 35, in foreach_4907
  File "/usr/lib/python3/dist-packages/odoo/tools/image.py", line 330, in image_data_uri
    FILETYPE_BASE64_MAGICWORD.get(base64_source[:1], 'png'),
TypeError: 'bool' object is not subscriptable

Error to render compiling AST
TypeError: 'bool' object is not subscriptable
Template: 1332
Path: /templates/t/t/div[2]/div/div[2]/t/div/div[1]/img
Node: <img t-att-src="image_data_uri(resize_to_48(ol.product_id.image))" alt="Product"/>
                  
 
2019-01-25 14:39:51,551 955 INFO odoo werkzeug: 96.92.191.54 - - [25/Jan/2019 14:39:51] "GET /my/purchase/4?model=purchase.order&res_id=4&access_token=8259b09a-7819-4dad-bab5-070b22a067fd HTTP/1.1" 500 - 53 0.021 0.045
2019-01-25 14:39:51,737 955 INFO odoo werkzeug: 96.92.191.54 - - [25/Jan/2019 14:39:51] "GET /web/webclient/qweb?mods= HTTP/1.1" 200 - 1 0.000 0.003
2019-01-25 14:39:51,739 955 INFO odoo werkzeug: 96.92.191.54 - - [25/Jan/2019 14:39:51] "POST /web/webclient/bootstrap_translations HTTP/1.1" 200 - 1 0.000 0.002
2019-01-25 14:40:06,875 955 INFO odoo werkzeug: 127.0.0.1 - - [25/Jan/2019 14:40:06] "POST /longpolling/poll HTTP/1.1" 200 - 9 0.003 50.008
Thanks in advance for any help.
-1
Avatar
Discard
Ermin Trevisan

Please use a meaningful title next time and not the generic error message.

Avatar
Max Baldwin
Author Best Answer

I'm not sure that is the problem. I exported some data, I'd be very grateful if you would take a look.


id name model transient access_ids/id access_ids/name access_ids/active access_ids/perm_create access_ids/perm_unlink access_ids/group_id access_ids/group_id/id access_ids/perm_read access_ids/perm_write website_form_access field_id/id field_id/name field_id/website_form_blacklisted field_id/copied field_id/help field_id/field_description field_id/ttype field_id/groups field_id/index field_id/model field_id/relation field_id/on_delete field_id/readonly field_id/required field_id/selectable field_id/size field_id/store field_id/track_visibility field_id/translate
base.model_ir_model_access Model Access ir.model.access FALSE base.access_ir_model_access_group_erp_manager ir_model_access_group_erp_manager TRUE TRUE TRUE Administration / Access Rights base.group_erp_manager TRUE TRUE FALSE base.field_ir_model_access____last_update __last_update TRUE FALSE Last Modified on datetime FALSE FALSE ir.model.access FALSE TRUE FALSE FALSE FALSE FALSE FALSE
base.field_ir_model_access__active active TRUE TRUE If you uncheck the active field, it will disable the ACL without deleting it (if you delete a native ACL, it will be re-created when you reload the module). Active boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__create_date create_date TRUE TRUE Created on datetime FALSE FALSE ir.model.access FALSE TRUE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__create_uid create_uid TRUE TRUE Created by many2one FALSE FALSE ir.model.access res.users Set NULL TRUE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__display_name display_name TRUE FALSE Display Name char FALSE FALSE ir.model.access FALSE TRUE FALSE FALSE 0 FALSE FALSE FALSE
base.field_ir_model_access__group_id group_id TRUE TRUE Group many2one FALSE TRUE ir.model.access res.groups Cascade FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__id id TRUE TRUE ID integer FALSE FALSE ir.model.access FALSE TRUE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__model_id model_id TRUE TRUE Object many2one FALSE TRUE ir.model.access ir.model Cascade FALSE TRUE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__name name TRUE TRUE Name char FALSE TRUE ir.model.access FALSE FALSE TRUE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__perm_create perm_create TRUE TRUE Create Access boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__perm_read perm_read TRUE TRUE Read Access boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__perm_unlink perm_unlink TRUE TRUE Delete Access boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__perm_write perm_write TRUE TRUE Write Access boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__write_date write_date TRUE TRUE Last Updated on datetime FALSE FALSE ir.model.access FALSE TRUE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__write_uid write_uid TRUE TRUE Last Updated by many2one FALSE FALSE ir.model.access res.users Set NULL TRUE FALSE TRUE 0 TRUE FALSE FALSE
0
Avatar
Discard
Michael Douglas

What link from this module to give me a better look? So it looks like the access permissions are correct, or is it some error in the module or is it some operation error

Max Baldwin
Author

What link do you require? The link being clicked on the user end is: /mail/view?model=purchase.order&res_id=5&access_token=7a171e82-5389-4099-838a-588e98e36adf

Avatar
Michael Douglas
Best Answer

I believe the error is found in the security file ir.model.access.csv, where the perm_read permission is 0, give a verified on it.

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
?"Your country might be blocked by our hosting provider" error when I create new website
error
Avatar
0
Oct 25
414
Payment Page Return Error with Razorpay on Mobile Devices
error
Avatar
0
Sep 25
1034
Error after installing "purchase" app in Odoo version 18
error
Avatar
Avatar
1
Dec 24
6397
error schema for TourStep Error
error
Avatar
0
Nov 24
2480
I am Using Odoo 18 & facing Technical Server Error?
error technical ErrorTraceback ServerError
Avatar
Avatar
1
Nov 24
2468
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now