IRC logs of #tryton for Friday, 2023-03-17

irc.libera.chat #tryton log beginning Fri Mar 17 12:10:01 AM CET 2023
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:24
-!- ChanServ changed mode/#tryton -> +o cedk 23:24
-!- springwurm(~springwur@2a01:76c0:302:ab00:769d:5dfd:cba:e43e) has joined #tryton06:18
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton07:27
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:08
-!- ChanServ changed mode/#tryton -> +o cedk 08:08
-!- rpit(~rpit@a89-154-189-196.cpe.netcabo.pt) has joined #tryton08:18
-!- helmut(helmut@subdivi.de) has joined #tryton08:22
helmuthi. Do I understand correctly that trytond only does the web server and that when I want to use an external server (such as uwsgi), I should stop trytond?08:27
mrichezhi, how to fix such error: "trytond.model.modelstorage.AccessError: You are trying to read records "1" of "Product Variant" that don't exist anymore. - "08:34
yangoonhelmut: correct08:35
pokolimrichez: what is causing this error? What are you doing? Some code or browsing in tryton? Do you have access rules on products?08:38
pokolimrichez: the error is because you can not access the record (due to access rules) or because it does not exist08:38
helmutyangoon: thank you for confirming.08:39
mrichezpokoli: it happens on one product when trying to get_rec_name : if self.code... . I check database product exists and template too... i'm wondering if problem could be linked to product_history08:40
pokolimrichez: yes, may be related to product_history08:41
pokolidoes a _history record exist for the variant08:41
pokoli?08:41
mrichezpokoli: yes08:43
mrichezpokoli: it's a test on a database 5.6 and i try to migrate to 6.608:44
mrichezpokoli: got a problem on products.. because now code is on template08:44
mrichezpokoli: so i made an sql update to get code from variant: update product_template as t set code=p.code from product_product p  where t.id=p.template;08:45
mrichezupdate product_product set suffix_code='';08:45
pokolimrichez: you did update create_date, write_date? That affects the history table08:46
pokolidid you update the history table? I guess itshould be also updated08:46
mrichezpokoli: no i didn't08:47
mrichezpokoli: could i also empty history table ? i don't care about history (for now)08:47
pokolimrichez: if you do not care about history you should deactivate the product_history module and drop the _history tables08:48
mrichezpokoli: what i mean is that i don't care about previous history but i want to keep history for future08:49
mrichezpokoli: so could i just empty history table and then history will be still working for future ?08:49
pokolimrichez: I think you require at least one record in the history data08:50
pokolimrichez: So the best probably is to drop the history tables and tryton will recreate them with the required data on first update08:50
pokoliBTW: Is https://discuss.tryton.org/ working for anyone? 08:50
mrichezpokoli: discuss is not working08:51
pokolimrichez: https://discuss.tryton.org/latest is working for me 08:51
pokoliIndeed I updated  post some time ago, so it seems a problem with the fronp age08:51
mrichezpokoli: https://discuss.tryton.org/latest not working08:52
mrichezpokoli: i drop both product history tables and doing trytond-admin08:53
mrichezpokoli: still error message when retrying :( .... i'll investigate .. error is raising in this method: https://foss.heptapod.net/tryton/tryton/-/blob/branch/default/trytond/trytond/model/modelsql.py#L143609:00
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton09:01
cedkmrichez: why do you think it is linked to history, is the _datetime set in context?09:05
cedkdropping history should not help09:05
mrichezcedk: dropping history was just an idea09:10
mrichezcedk: don't also know why error message is about record "1" ... this is not the id of my product09:11
mrichezcedk: i saw method __check_domain_rule was checking history so i thought it was the problem09:13
-!- htgoebel(~hartmut@p200300d5df15fe00a914b3e90bddab1b.dip0.t-ipconnect.de) has joined #tryton09:20
mrichezcedk: i debug with query, don't understand why searching for id = 1 : DEBUG trytond.backend.postgresql.database b'SELECT "a"."write_date" AS "write_date", "a"."suffix_code" AS "suffix_code", "a"."write_uid" AS "write_uid", "a"."template" AS "template", "a"."create_uid" AS "create_uid", "a"."code" AS "code", "a"."create_date" AS "create_date", "a"."active" AS "active", "a"."id" AS "id" FROM "product_product" AS "a" WHERE (("a"."id" IN (1)))'09:25
mrichezcedk: it happens for a specific product09:25
cedkmrichez: it is not searching but reading09:28
cedkmrichez: you must have wrong data somewhere in the database or Model schema09:28
mrichezcedk: indeed... i will search09:29
cedkmrichez: or in the code that use an ID for the wrong moel09:29
helmutDo I understand correctly that tryton-sao is essentially serving static js code that uses the regular web rpc provided by tryton-server (werkzeug) or another wsgi server (e.g. uwsgi) and has no active server component on its own?09:42
pokolihelmut: yes, you understand it correctly09:44
helmutthank you09:45
mrichezOk i found my error, i was using the wrong model with a function field...   Thanks Cedk and Pokoli for help :-)09:50
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:55
-!- ChanServ changed mode/#tryton -> +o cedk 09:55
-!- nicoe(~nicoe@2a02:2788:54:1ff:18c2:1aff:fef9:2b7f) has joined #tryton12:11
-!- springwurm(~springwur@2a01:76c0:302:ab00:e8e6:fe89:978:7d5b) has joined #tryton13:06
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton13:39
-!- ChanServ changed mode/#tryton -> +o cedk 13:39
-!- nicoe(~nicoe@2a02:2788:54:1ff:7e2a:31ff:fe5e:b25d) has joined #tryton13:41
-!- htgoebel(~hartmut@p200300d5df15fe00a914b3e90bddab1b.dip0.t-ipconnect.de) has left #tryton18:01
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton18:55
-!- ChanServ changed mode/#tryton -> +o cedk 18:55
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton19:26
-!- ChanServ changed mode/#tryton -> +o cedk 19:26
-!- rpit(~rpit@a89-154-189-196.cpe.netcabo.pt) has joined #tryton21:59
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:51
-!- ChanServ changed mode/#tryton -> +o cedk 22:51

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!