# \#flask

**URL:** https://discuss.tryton.org/tag/flask/27.md

[Latest](https://discuss.tryton.org/latest.md) · [Categories](https://discuss.tryton.org/categories.md) · [Tags](https://discuss.tryton.org/tags.md)

---

## [How to test a flask\_tryton route](https://discuss.tryton.org/t/how-to-test-a-flask-tryton-route/5910)

<div class="topic-metadata">

**Author:** [@hodeinavarro](https://discuss.tryton.org/u/hodeinavarro)\
**Replies:** 20\
**Last updated:** [March 12, 2025, 1:45pm UTC](https://discuss.tryton.org/t/how-to-test-a-flask-tryton-route/5910 "2025-03-12T13:45:49Z")

</div>

Hello, I’d like to integrate some tests in a Tryton Flask application, using flask\_tryton. I can’t quite find how to manage having a “test” transaction and the “route” transaction… since the route transaction asserts o…

---

## [sqlite3.OperationalError: unable to open database file](https://discuss.tryton.org/t/sqlite3-operationalerror-unable-to-open-database-file/8114)

<div class="topic-metadata">

**Author:** [@landras1](https://discuss.tryton.org/u/landras1)\
**Replies:** 7\
**Last updated:** [December 13, 2024, 2:07pm UTC](https://discuss.tryton.org/t/sqlite3-operationalerror-unable-to-open-database-file/8114 "2024-12-13T14:07:50Z")

</div>

Hello Guys! I have a very simple API using flask\_tryton. It was developed under Tryton 5.4, and we migrated to Tryton 6.0 on the production and testing servers, where it works perfectly. However, on my local developmen…

---

## [An Error When i use UserManager](https://discuss.tryton.org/t/an-error-when-i-use-usermanager/7935)

<div class="topic-metadata">

**Author:** [@manuelze](https://discuss.tryton.org/u/manuelze)\
**Replies:** 2\
**Last updated:** [October 8, 2024, 5:15pm UTC](https://discuss.tryton.org/t/an-error-when-i-use-usermanager/7935 "2024-10-08T17:15:20Z")

</div>

Hello/Bonsoir à vous I have an error when I try to use UserManager in my flask application. Here’s an overview of the error. File "/home/gnuhealth/Flask/flaskvenv/lib/python3.8/site-packages/sqlalchemy/orm/query.py"…

---

## [An error when using and executing functions using flask\_tryton](https://discuss.tryton.org/t/an-error-when-using-and-executing-functions-using-flask-tryton/7900)

<div class="topic-metadata">

**Author:** [@manuelze](https://discuss.tryton.org/u/manuelze)\
**Replies:** 6\
**Last updated:** [September 30, 2024, 7:34am UTC](https://discuss.tryton.org/t/an-error-when-using-and-executing-functions-using-flask-tryton/7900 "2024-09-30T07:34:27Z")

</div>

Hello, I have a concern when using flask\_tryton. I have carried out all the steps as shown here. But I still get this error : \[2024-09-27 11:27:45,130\] ERROR in app: Exception on /doctor/party \[GET\] Traceback (most rec…

---

## [App Flask, tryton log level](https://discuss.tryton.org/t/app-flask-tryton-log-level/7896)

<div class="topic-metadata">

**Author:** [@pumontjm](https://discuss.tryton.org/u/pumontjm)\
**Replies:** 3\
**Last updated:** [September 26, 2024, 1:28pm UTC](https://discuss.tryton.org/t/app-flask-tryton-log-level/7896 "2024-09-26T13:28:25Z")

</div>

Hi, I am creating a flask application with flask\_tryton. I can’t find how to modify the tryton log level. How can we enter the trytond-logconf.conf file as a parameter? app = Flask(\_\_name\_\_) app.config\['TRYTON\_DATABA…

---

## [Backward compatibility of Flask\_Tryton](https://discuss.tryton.org/t/backward-compatibility-of-flask-tryton/7174)

<div class="topic-metadata">

**Author:** [@LGiesken](https://discuss.tryton.org/u/LGiesken)\
**Replies:** 1\
**Last updated:** [April 11, 2024, 1:04pm UTC](https://discuss.tryton.org/t/backward-compatibility-of-flask-tryton/7174 "2024-04-11T13:04:06Z")

</div>

Hello everybody. I am currently writing a FHIR API for GNU Health (runs on Tryton). For that I am using Flask\_Tryton. I was wondering about the Backward compatibility of Flask\_Tryton. What happens when there is a new Ver…

---

## [AttributeError: 'NoneType' object has no attribute 'put\_connection'](https://discuss.tryton.org/t/attributeerror-nonetype-object-has-no-attribute-put-connection/6827)

<div class="topic-metadata">

**Author:** [@pedro.s](https://discuss.tryton.org/u/pedro.s)\
**Replies:** 1\
**Last updated:** [December 30, 2023, 4:12pm UTC](https://discuss.tryton.org/t/attributeerror-nonetype-object-has-no-attribute-put-connection/6827 "2023-12-30T16:12:16Z")

</div>

Hello, first of all, happy holidays, the problem I have is the following… I have this code in a python file called app.py from flask import Flask, render\_template, request, redirect, url\_for from flask\_tryton import Tr…

---

## [Tryton as headless-erp or erp-framework](https://discuss.tryton.org/t/tryton-as-headless-erp-or-erp-framework/6685)

<div class="topic-metadata">

**Author:** [@Joans](https://discuss.tryton.org/u/Joans)\
**Replies:** 12\
**Last updated:** [November 10, 2023, 11:45am UTC](https://discuss.tryton.org/t/tryton-as-headless-erp-or-erp-framework/6685 "2023-11-10T11:45:44Z")

</div>

Hello community, newbie here. I started learning Tryton recently. I have to say that it’s no easy to start but if you are patient and you dig in the forum, documentation, code… you can find answers. I’m trying to build…

---

## [Safety recommendations for using flask\_tryton on a custom app](https://discuss.tryton.org/t/safety-recommendations-for-using-flask-tryton-on-a-custom-app/1380)

<div class="topic-metadata">

**Author:** [@iehoshia](https://discuss.tryton.org/u/iehoshia)\
**Replies:** 0\
**Last updated:** [May 8, 2019, 4:55pm UTC](https://discuss.tryton.org/t/safety-recommendations-for-using-flask-tryton-on-a-custom-app/1380 "2019-05-08T16:55:01Z")

</div>

Hi, I’m developing a custom web app using flask\_tryton and web\_user module, that provides the most part of required info to manage register, reset password, confirm\_email, authenticate and so on. The question is which i…

---

## [Creating failing webuser from flask still adds the user](https://discuss.tryton.org/t/creating-failing-webuser-from-flask-still-adds-the-user/5275)

<div class="topic-metadata">

**Author:** [@edbo](https://discuss.tryton.org/u/edbo)\
**Replies:** 2\
**Last updated:** [May 18, 2022, 9:58pm UTC](https://discuss.tryton.org/t/creating-failing-webuser-from-flask-still-adds-the-user/5275 "2022-05-18T21:58:41Z")

</div>

Using the web\_user module, the email address has a SQL constraint to be unique. When adding a new web user from the desktop client with an email address already in the database it will fail and no new user is created. Th…

---

## [Send list to flask-tryton](https://discuss.tryton.org/t/send-list-to-flask-tryton/5272)

<div class="topic-metadata">

**Author:** [@edbo](https://discuss.tryton.org/u/edbo)\
**Replies:** 4\
**Last updated:** [May 18, 2022, 9:52am UTC](https://discuss.tryton.org/t/send-list-to-flask-tryton/5272 "2022-05-18T09:52:03Z")

</div>

I just installed flask-tryton from PyPI (flask-tryton · PyPI) and put the example code into a Python file and started the server. Everything works except the users route. Using an url like http://localhost:5000/users/1,4 …

---

## [Create a button that redirect to flask application](https://discuss.tryton.org/t/create-a-button-that-redirect-to-flask-application/4867)

<div class="topic-metadata">

**Author:** [@andres53016](https://discuss.tryton.org/u/andres53016)\
**Replies:** 3\
**Last updated:** [December 17, 2021, 12:09pm UTC](https://discuss.tryton.org/t/create-a-button-that-redirect-to-flask-application/4867 "2021-12-17T12:09:41Z")

</div>

I wanted to know if it was possible to create a button that redirects me to the flask application with arguments that depend on the current record. Thanks in advance.

---

## [Tryton flask - user login](https://discuss.tryton.org/t/tryton-flask-user-login/1122)

<div class="topic-metadata">

**Author:** [@bala4901](https://discuss.tryton.org/u/bala4901)\
**Replies:** 14\
**Last updated:** [November 25, 2021, 2:46pm UTC](https://discuss.tryton.org/t/tryton-flask-user-login/1122 "2021-11-25T14:46:28Z")

</div>

hi, i am creating a web for warehouse handy terminal. how to implement login using tryton user? currently there is a setting TRYTON\_USER, so any edit, update delete happen to only one user. so it cause audit trail. m…

---

## [How to connect to multiples databases on flask\_tryton](https://discuss.tryton.org/t/how-to-connect-to-multiples-databases-on-flask-tryton/4059)

<div class="topic-metadata">

**Author:** [@fransuar](https://discuss.tryton.org/u/fransuar)\
**Replies:** 3\
**Last updated:** [April 16, 2021, 11:38am UTC](https://discuss.tryton.org/t/how-to-connect-to-multiples-databases-on-flask-tryton/4059 "2021-04-16T11:38:42Z")

</div>

Hi. I am working with flask tryton and I get success to connect to a single tryton database and retrive some data from some models. Now I want to connect to multiple databases and get the same data from each one of them…

---

## [Need some more detailed tutorial on flask tryton](https://discuss.tryton.org/t/need-some-more-detailed-tutorial-on-flask-tryton/3601)

<div class="topic-metadata">

**Author:** [@tryhard](https://discuss.tryton.org/u/tryhard)\
**Replies:** 12\
**Last updated:** [March 29, 2021, 11:24am UTC](https://discuss.tryton.org/t/need-some-more-detailed-tutorial-on-flask-tryton/3601 "2021-03-29T11:24:34Z")

</div>

Hey guys Can anyone teach me(or point me to a site) on how to do flask tryton in more detail than what is on the py website?

---

## [Tryton flask on docker image?](https://discuss.tryton.org/t/tryton-flask-on-docker-image/3860)

<div class="topic-metadata">

**Author:** [@deathrake](https://discuss.tryton.org/u/deathrake)\
**Replies:** 8\
**Last updated:** [March 2, 2021, 12:37pm UTC](https://discuss.tryton.org/t/tryton-flask-on-docker-image/3860 "2021-03-02T12:37:51Z")

</div>

Hey did someone able to setup tryton flask on docker image ? seem’s i cant find trytond.conf in docker container

---

## [How to create a Flask entrypoint to show party](https://discuss.tryton.org/t/how-to-create-a-flask-entrypoint-to-show-party/3876)

<div class="topic-metadata">

**Author:** [@dotbit](https://discuss.tryton.org/u/dotbit)\
**Replies:** 2\
**Last updated:** [March 2, 2021, 9:40am UTC](https://discuss.tryton.org/t/how-to-create-a-flask-entrypoint-to-show-party/3876 "2021-03-02T09:40:57Z")

</div>

Thank you for the example. I am having some trouble getting an entry point to the web user from where I can begin to show the user/party data, for example in /my-account route. What would the right way to get the web\_u…

---

## [KeyError on starting flask with Tryton](https://discuss.tryton.org/t/keyerror-on-starting-flask-with-tryton/3187)

<div class="topic-metadata">

**Author:** [@yoeldiomedez](https://discuss.tryton.org/u/yoeldiomedez)\
**Replies:** 8\
**Last updated:** [September 15, 2020, 4:44pm UTC](https://discuss.tryton.org/t/keyerror-on-starting-flask-with-tryton/3187 "2020-09-15T16:44:27Z")

</div>

Hello, I’m trying to run the example but I get the following KeyError: Traceback (most recent call last): File "/home/yoel/Development/tryton/marketing/app/app.py", line 11, in \<module\> User = tryton.pool.get('re…

---

## [Upgrade from flask\_tryton 0.8.0 to flask\_tryton 0.9.3](https://discuss.tryton.org/t/upgrade-from-flask-tryton-0-8-0-to-flask-tryton-0-9-3/3179)

<div class="topic-metadata">

**Author:** [@iehoshia](https://discuss.tryton.org/u/iehoshia)\
**Replies:** 2\
**Last updated:** [September 3, 2020, 6:47am UTC](https://discuss.tryton.org/t/upgrade-from-flask-tryton-0-8-0-to-flask-tryton-0-9-3/3179 "2020-09-03T06:47:33Z")

</div>

Hi, I have migrated from flask\_tryton==0.8.0 to flask\_tryton==0.9.3 I has a flask app that imports Transaction but in 0.9 it not longer exists. How it could be used in the last version of flask? Transaction change …

---

## [Integrate Tryton on my own personal flask project](https://discuss.tryton.org/t/integrate-tryton-on-my-own-personal-flask-project/3134)

<div class="topic-metadata">

**Author:** [@tryhard](https://discuss.tryton.org/u/tryhard)\
**Replies:** 9\
**Last updated:** [August 31, 2020, 1:33pm UTC](https://discuss.tryton.org/t/integrate-tryton-on-my-own-personal-flask-project/3134 "2020-08-31T13:33:36Z")

</div>

Right now im following a tutorial on flask and have successfully created a app. As time went on i found that creating an inventory system from scratch will be so time consuming and thats when i decided to maybe integrate…

---

## [How to use pagination with tryton\_flask](https://discuss.tryton.org/t/how-to-use-pagination-with-tryton-flask/2957)

<div class="topic-metadata">

**Author:** [@iehoshia](https://discuss.tryton.org/u/iehoshia)\
**Replies:** 3\
**Last updated:** [July 2, 2020, 3:21pm UTC](https://discuss.tryton.org/t/how-to-use-pagination-with-tryton-flask/2957 "2020-07-02T15:21:37Z")

</div>

Hi, I’m working in a blog with tryton\_flask and tryton. I want to add a pagination option to the main page but I don’t know how to do the query with FROM and TO arguments. I’m using the follow code to get the records. …

---

## [Update record with Model.save() from flask tryton](https://discuss.tryton.org/t/update-record-with-model-save-from-flask-tryton/2570)

<div class="topic-metadata">

**Author:** [@German](https://discuss.tryton.org/u/German)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 3:42pm UTC](https://discuss.tryton.org/t/update-record-with-model-save-from-flask-tryton/2570 "2020-04-12T15:42:25Z")

</div>

Dear Tryton team, I’m trying to update the party email from flask tryton with: @tryton.transaction(readonly=False) def update(): party = Party.search(\['id','=',1\])\[0\] party.email = "newmail@gmai…

---

## [Getting list\_price from flask\_tryton](https://discuss.tryton.org/t/getting-list-price-from-flask-tryton/2553)

<div class="topic-metadata">

**Author:** [@German](https://discuss.tryton.org/u/German)\
**Replies:** 5\
**Last updated:** [April 9, 2020, 9:27pm UTC](https://discuss.tryton.org/t/getting-list-price-from-flask-tryton/2553 "2020-04-09T21:27:28Z")

</div>

Dear Tryton team, I’m working on a light portal to see, create only products and invoices information from Tryton. The problem: I’m using product.template.list\_price but is always None, on trytond 5.0.15 I’m not sure…

---

## [Pass context from flask to tryton](https://discuss.tryton.org/t/pass-context-from-flask-to-tryton/2455)

<div class="topic-metadata">

**Author:** [@iehoshia](https://discuss.tryton.org/u/iehoshia)\
**Replies:** 14\
**Last updated:** [April 2, 2020, 3:38pm UTC](https://discuss.tryton.org/t/pass-context-from-flask-to-tryton/2455 "2020-04-02T15:38:26Z")

</div>

Hi, I am working in a flask app that pass some arguments to tryton. I imported Transaction in flask routes file. Something like described here: from trytond.transaction import Transaction @bp.route('/course/',met…

---

## [Flask tryton example](https://discuss.tryton.org/t/flask-tryton-example/2500)

<div class="topic-metadata">

**Author:** [@hidura](https://discuss.tryton.org/u/hidura)\
**Replies:** 6\
**Last updated:** [March 29, 2020, 7:09am UTC](https://discuss.tryton.org/t/flask-tryton-example/2500 "2020-03-29T07:09:00Z")

</div>

Hello I am looking for an example of flask tryton, basically I am looking how to connect to the database and add the initial configuration, also I want to know the encryption of the password to make the login using, flas…

---

## [Flask\_tryton download a report](https://discuss.tryton.org/t/flask-tryton-download-a-report/1997)

<div class="topic-metadata">

**Author:** [@German](https://discuss.tryton.org/u/German)\
**Replies:** 2\
**Last updated:** [November 25, 2019, 7:17pm UTC](https://discuss.tryton.org/t/flask-tryton-download-a-report/1997 "2019-11-25T19:17:33Z")

</div>

Hello, I’ve wondering if it’s possible to download a report using flask\_tryton, In case not, I’m guessing I should start reading about how to use the JSON-RPC or XML-RPC. A good start point should be see sao source cod…

---

## [How to use wizard within Flask](https://discuss.tryton.org/t/how-to-use-wizard-within-flask/1482)

<div class="topic-metadata">

**Author:** [@zmichal](https://discuss.tryton.org/u/zmichal)\
**Replies:** 2\
**Last updated:** [June 20, 2019, 12:01pm UTC](https://discuss.tryton.org/t/how-to-use-wizard-within-flask/1482 "2019-06-20T12:01:31Z")

</div>

Hi, I would like to use the purchase\_requests inside my flask app, but don’t know, how to handle wizards. To generate requests I’m using following: purchase\_request = tryton\_pool.get('purchase.request') …

---

## [How to use flask\_tryton](https://discuss.tryton.org/t/how-to-use-flask-tryton/1266)

<div class="topic-metadata">

**Author:** [@iehoshia](https://discuss.tryton.org/u/iehoshia)\
**Replies:** 9\
**Last updated:** [May 16, 2019, 10:09pm UTC](https://discuss.tryton.org/t/how-to-use-flask-tryton/1266 "2019-05-16T22:09:02Z")

</div>

Hi, I was trying to make a flask app that send info to tryton using flask\_tryton. The code is the follow: from flask import render\_template, flash, redirect, url\_for, session from app import app from app import tryton…

---

## [Access to the 'Many2Many' or 'One2many' fields from Flask](https://discuss.tryton.org/t/access-to-the-many2many-or-one2many-fields-from-flask/1150)

<div class="topic-metadata">

**Author:** [@2cadz](https://discuss.tryton.org/u/2cadz)\
**Replies:** 2\
**Last updated:** [February 19, 2019, 2:18pm UTC](https://discuss.tryton.org/t/access-to-the-many2many-or-one2many-fields-from-flask/1150 "2019-02-19T14:18:23Z")

</div>

Hi, When I try to access the ‘Many2Many’ or ‘One2Many’ fields from Flask I have the following error: website (self): web.site,1 website.default\_locale: ir.lang,9 Traceback (most recent call last): File "run.py", line…
