tryton web_user module aim and a customer portal 'how to'

94 views
Skip to first unread message

guile520

unread,
Sep 14, 2017, 10:27:59 AM9/14/17
to tryton-fr
Hello.

I use trytond with tryton-sao.
users can log in.
I've installed web_user to start a 'portal project' to make paypal payment  available for customers. (account_payment is also installed)
Created a web user with a customer party, added an email and a pwd, active option checked.
I know now that this web user cannot log into tryton-sao client with the email/pwd  set. 

So i wonder what is the module web_user designed for ?

Can someone help me with a way to achieve a customer portal like odoo does, where sale and invoice views are filtered with the user_id ?
(which i used to work on)

Cédric Krier

unread,
Sep 14, 2017, 10:55:05 AM9/14/17
to tryton-fr
On 2017-09-14 06:59, guile520 wrote:
> Hello.

Bonjour,

Comme cette mailing liste est pour les francophone, je vais répondre en
français.

> I use trytond with tryton-sao.
> users can log in.
> I've installed web_user to start a 'portal project' to make paypal payment available for customers. (account_payment is also installed)
> Created a web user with a customer party, added an email and a pwd, active option checked.
>
> I know now that this web user cannot log into tryton-sao client with the email/pwd set.
>
>
> So i wonder what is the module web_user designed for ?

C'est pour fournir les outils pour gérer des utilisateurs d'un site web.

> Can someone help me with a way to achieve a customer portal like odoo does, where sale and invoice views are filtered with the user_id ?

Il faut créer un site web (à B2CK on a une préférence pour Flask) et
utiliser Tryton comme backend. Et entre autre utiliser web_user pour
l'enregistrement et l'authentification des utilisateurs.

En parlant de flask, cette librairie est très pratique pour faire des
site Flask avec Tryton comme backend: http://flask-tryton.b2ck.com/

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

guile520

unread,
Sep 14, 2017, 1:10:06 PM9/14/17
to tryton-fr
Merci pour votre réponse.

J'ai installé nereid dans l'optique présentée précédemment, qui il me semble installe flask.
Des modules ont été désinstallés puis réinstallés avec des versions antérieures.
tryton ne fonctionnait plus, j'ai dû supprimer ce qu'avait installé nereid puis réinstaller certains modules dans leur dernière version.

Est-ce que Flask est compatible avec la dernière version de tryton ?
Pourquoi un utilisateur (web user) créé avec web_user ne peut-il pas se connecter à tryton sao, c'est bien fait pour non ? (c'était le sens de ma première question)

guile520

unread,
Sep 15, 2017, 11:55:06 AM9/15/17
to tryton-fr
J'ai installé flask et trytond + modules, puis flask_tryton.
Comment dois-je configurer l' "app" flask pour utiliser une base postgresql tryton existante ? (pas sqlite)

J'ai visité http://hg.b2ck.com/flask-tryton et quelques liens google, ne trouve pas d'informations.

Cédric Krier

unread,
Sep 15, 2017, 12:25:05 PM9/15/17
to tryton-fr
On 2017-09-14 09:54, guile520 wrote:
> Est-ce que Flask est compatible avec la dernière version de tryton ?

La lib flask-tryton fonctionne avec la version 4.4

> Pourquoi un utilisateur (web user) créé avec web_user ne peut-il pas se
> connecter à tryton sao, c'est bien fait pour non ? (c'était le sens de ma
> première question)

Non, si tu veux un utilisateur qui peut se connecter à l'ERP alors il
faut crée un utilisateur normal.

Cédric Krier

unread,
Sep 15, 2017, 12:25:07 PM9/15/17
to tryton-fr
On 2017-09-15 08:31, guile520 wrote:
> J'ai installé flask et trytond + modules, puis flask_tryton.
> Comment dois-je configurer l' "app" flask pour utiliser une base postgresql
> tryton existante ? (pas sqlite)

Il faut définir où se trouve le fichier de configuration trytond.
C'est la variable app.config['TRYTON_CONFIG'].

> J'ai visité http://hg.b2ck.com/flask-tryton et quelques liens google, ne
> trouve pas d'informations.

Je vais ajouter une note dans le README.


PS: Merci de suivre la netiquette en démarrant une nouvelle thread avec
un nouveau sujet: http://groups.tryton.org/netiquette

Cédric Krier

unread,
Sep 15, 2017, 12:35:05 PM9/15/17
to tryton-fr
On 2017-09-15 18:24, Cédric Krier wrote:
> On 2017-09-15 08:31, guile520 wrote:
> > J'ai visité http://hg.b2ck.com/flask-tryton et quelques liens google, ne
> > trouve pas d'informations.
>
> Je vais ajouter une note dans le README.

Voici: https://codereview.appspot.com/330250043

guile520

unread,
Sep 15, 2017, 12:50:06 PM9/15/17
to tryton-fr
J'obtiens bien 'Administrator, Hello World!' à x.x.x.x:5000.
Si j'ai une demande, je créerai un nouveau topic.

Merci !

Christophe (.net)

unread,
Sep 19, 2017, 4:40:01 AM9/19/17
to tryt...@googlegroups.com
Bonjour,

Pour les tests que j'ai fais j'ai initialisé les variables :

TRYTON_DATABASE = '<nom_de_la_base>'
TRYTON_CONFIG = '<chemin_vers_la_config_du_serveur_tryton>'

En principe dans le fichier de conf de Tryton tu as les informations de
connexion à la base de donnée.

Cordialement
--
Christophe CRIER
Adiczion - http://adiczion.com
Reply all
Reply to author
Forward
0 new messages