irc.libera.chat #tryton log beginning Fri Mar 17 12:10:01 AM CET 2023 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 23:24 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 23:24 | |
-!- springwurm(~springwur@2a01:76c0:302:ab00:769d:5dfd:cba:e43e) has joined #tryton | 06:18 | |
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton | 07:27 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 08:08 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 08:08 | |
-!- rpit(~rpit@a89-154-189-196.cpe.netcabo.pt) has joined #tryton | 08:18 | |
-!- helmut(helmut@subdivi.de) has joined #tryton | 08:22 | |
helmut | hi. 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 |
---|---|---|
mrichez | hi, 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 |
yangoon | helmut: correct | 08:35 |
pokoli | mrichez: what is causing this error? What are you doing? Some code or browsing in tryton? Do you have access rules on products? | 08:38 |
pokoli | mrichez: the error is because you can not access the record (due to access rules) or because it does not exist | 08:38 |
helmut | yangoon: thank you for confirming. | 08:39 |
mrichez | pokoli: 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_history | 08:40 |
pokoli | mrichez: yes, may be related to product_history | 08:41 |
pokoli | does a _history record exist for the variant | 08:41 |
pokoli | ? | 08:41 |
mrichez | pokoli: yes | 08:43 |
mrichez | pokoli: it's a test on a database 5.6 and i try to migrate to 6.6 | 08:44 |
mrichez | pokoli: got a problem on products.. because now code is on template | 08:44 |
mrichez | pokoli: 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 |
mrichez | update product_product set suffix_code=''; | 08:45 |
pokoli | mrichez: you did update create_date, write_date? That affects the history table | 08:46 |
pokoli | did you update the history table? I guess itshould be also updated | 08:46 |
mrichez | pokoli: no i didn't | 08:47 |
mrichez | pokoli: could i also empty history table ? i don't care about history (for now) | 08:47 |
pokoli | mrichez: if you do not care about history you should deactivate the product_history module and drop the _history tables | 08:48 |
mrichez | pokoli: what i mean is that i don't care about previous history but i want to keep history for future | 08:49 |
mrichez | pokoli: so could i just empty history table and then history will be still working for future ? | 08:49 |
pokoli | mrichez: I think you require at least one record in the history data | 08:50 |
pokoli | mrichez: So the best probably is to drop the history tables and tryton will recreate them with the required data on first update | 08:50 |
pokoli | BTW: Is https://discuss.tryton.org/ working for anyone? | 08:50 |
mrichez | pokoli: discuss is not working | 08:51 |
pokoli | mrichez: https://discuss.tryton.org/latest is working for me | 08:51 |
pokoli | Indeed I updated post some time ago, so it seems a problem with the fronp age | 08:51 |
mrichez | pokoli: https://discuss.tryton.org/latest not working | 08:52 |
mrichez | pokoli: i drop both product history tables and doing trytond-admin | 08:53 |
mrichez | pokoli: 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#L1436 | 09:00 |
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton | 09:01 | |
cedk | mrichez: why do you think it is linked to history, is the _datetime set in context? | 09:05 |
cedk | dropping history should not help | 09:05 |
mrichez | cedk: dropping history was just an idea | 09:10 |
mrichez | cedk: don't also know why error message is about record "1" ... this is not the id of my product | 09:11 |
mrichez | cedk: i saw method __check_domain_rule was checking history so i thought it was the problem | 09:13 |
-!- htgoebel(~hartmut@p200300d5df15fe00a914b3e90bddab1b.dip0.t-ipconnect.de) has joined #tryton | 09:20 | |
mrichez | cedk: 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 |
mrichez | cedk: it happens for a specific product | 09:25 |
cedk | mrichez: it is not searching but reading | 09:28 |
cedk | mrichez: you must have wrong data somewhere in the database or Model schema | 09:28 |
mrichez | cedk: indeed... i will search | 09:29 |
cedk | mrichez: or in the code that use an ID for the wrong moel | 09:29 |
helmut | Do 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 |
pokoli | helmut: yes, you understand it correctly | 09:44 |
helmut | thank you | 09:45 |
mrichez | Ok 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 #tryton | 09:55 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 09:55 | |
-!- nicoe(~nicoe@2a02:2788:54:1ff:18c2:1aff:fef9:2b7f) has joined #tryton | 12:11 | |
-!- springwurm(~springwur@2a01:76c0:302:ab00:e8e6:fe89:978:7d5b) has joined #tryton | 13:06 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 13:39 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 13:39 | |
-!- nicoe(~nicoe@2a02:2788:54:1ff:7e2a:31ff:fe5e:b25d) has joined #tryton | 13:41 | |
-!- htgoebel(~hartmut@p200300d5df15fe00a914b3e90bddab1b.dip0.t-ipconnect.de) has left #tryton | 18:01 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 18:55 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 18:55 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 19:26 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 19:26 | |
-!- rpit(~rpit@a89-154-189-196.cpe.netcabo.pt) has joined #tryton | 21:59 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 22: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/!