chat.freenode.net #tryton log beginning Thu 06 Feb 2020 12:00:01 AM CET | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 23:58 | |
-!- kwmiebach(sid16855@gateway/web/irccloud.com/x-nqehdsygomwnksdv) has joined #tryton | 00:26 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 01:17 | |
-!- k-man(~jason@unaffiliated/k-man) has joined #tryton | 02:54 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 05:58 | |
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton | 07:24 | |
-!- Timitos(~kpreisler@2001:a61:426:7801:762b:62ff:fe84:ed7e) has joined #tryton | 07:51 | |
-!- rpit(~rpit@p200300C88F4B78001207D9AC39121C59.dip0.t-ipconnect.de) has joined #tryton | 07:53 | |
-!- josesalvador(~josesalva@84.124.29.26.static.user.ono.com) has joined #tryton | 08:12 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 08:27 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 08:53 | |
-!- sebd(~seb@aditu.ldd.fr) has joined #tryton | 09:13 | |
sebd | Hello, using proteus 5.4, I would like to close an open session, so to release the database (and be able to use it as template to create a new one). I tried to "del" the TrytondConfig, does not work. Nor TrytondConfig.pool.stop(database_name). I cannot find an easy way. Is there ? | 09:19 |
---|---|---|
semarie | sebd: I think that in order to release the database you will need to shutdown the server. no just to not have a client connected to the server | 09:21 |
sebd | actually, it I stop the client, the database is released. | 09:22 |
semarie | ah. you are using proteus in "database" mode and not using xmlrpc | 09:23 |
semarie | with config.set_trytond('...') | 09:23 |
sebd | yes | 09:24 |
sebd | ok I just realized I do not need a running server so to use proteus (I thought it was pure client) | 09:26 |
semarie | I am unsure if it is possible. I think the Pool() should be stopped | 09:26 |
cedk | sebd: calling database.close() should do it | 09:27 |
sebd | ok let's try | 09:27 |
sebd | 'str' object has no attribute 'close' | 09:28 |
semarie | sebd: proteus has two connection mode: using set_trytond('database'), it will directly use trytond code to speak with database ; and set_xmlrpc(url) where is acts as a client | 09:28 |
cedk | sebd: not the database name but the real database instance | 09:29 |
cedk | sebd: you can get it from Transaction | 09:29 |
sebd | ok | 09:29 |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 09:34 | |
sebd | cedk: Transaction.start(dbname, 0).database.close() is wrong. How to get the current Database instance without starting a new transaction ? | 10:34 |
sebd | or how to I reset the whole proteus environment ? | 10:37 |
sebd | importlib.reload(config) is not enough | 10:42 |
sebd | never mind, I'll use another algorithm | 10:43 |
-!- mariomop(~quassel@181.228.29.59) has joined #tryton | 10:46 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 11:24 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 13:02 | |
sebd | Party.addresses is filled with an empty Address at creation. A supplied Address cannot overridable this first empty Address, except when user is root. Why ? | 14:16 |
sebd | Identifiers and ContactMechanisms do not suffer this problem. | 14:17 |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 14:24 | |
-!- josesalvador(~josesalva@170.253.41.74) has joined #tryton | 14:38 | |
pokoli | sebd: you can update this value at creating | 15:00 |
sebd | Partner(name='...', addresses=[Address(name='...', ...)]).save() # inserts an empty address before mine | 15:08 |
sebd | I understand I have to update the auto-created address, yes | 15:09 |
sebd | I just don't understand why | 15:09 |
pokoli | sebd: party = Party(); address, = party.addresses; address.street = 'Your street here' | 15:10 |
sebd | too many code lines ! ;) | 15:11 |
-!- josesalvador(~josesalva@170.253.41.74) has joined #tryton | 15:38 | |
cedk | sebd: because proteus behaves like the client | 15:40 |
cedk | sebd: you can not in the client prefill a field at creation before having the default value | 15:41 |
cedk | but I think we could improve proteus to not request default value for fields passed at initialization | 15:41 |
-!- josesalvador(~josesalva@170.253.41.74) has joined #tryton | 15:42 | |
sebd | ok I understand | 15:43 |
-!- josesalvador(~josesalva@170.253.41.74) has joined #tryton | 16:03 | |
-!- josesalvador(~josesalva@170.253.41.74) has joined #tryton | 16:49 | |
-!- josesalvador(~josesalva@170.253.41.74) has joined #tryton | 17:17 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!