Skip to content

Commit

Permalink
Merge pull request #461 from frePPLe/17.0
Browse files Browse the repository at this point in the history
Syncing from upstream frePPLe/odoo (17.0)
  • Loading branch information
bt-admin authored Jul 19, 2024
2 parents 5f33de2 + b2dd5ca commit 665c93b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ FROM odoo:17

USER root

RUN echo "list_db = False" >> /etc/odoo/odoo.conf && \
echo "limit_time_cpu = 600" >> /etc/odoo/odoo.conf && \
ARG MULTIDB

RUN if [[ "x$MULTIDB" == "x" ]] ; then echo "list_db = False" >> /etc/odoo/odoo.conf ; fi

RUN echo "limit_time_cpu = 600" >> /etc/odoo/odoo.conf && \
echo "limit_time_real = 600" >> /etc/odoo/odoo.conf

USER odoo
Expand Down
6 changes: 6 additions & 0 deletions frepple/controllers/frepplexml.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ def xml(self, **kwargs):
company_name = kwargs.get("company", req.httprequest.form.get("company", None))
company = None

if not req.env:
# Set up the database context when running in multi-database mode
reg = odoo.registry(database)
cr = reg.cursor()
req.env = odoo.api.Environment(cr, odoo.SUPERUSER_ID, {})

# Login
req.session.db = database
try:
Expand Down

0 comments on commit 665c93b

Please sign in to comment.