IRC logs of #tryton for Tuesday, 2023-05-09

irc.libera.chat #tryton log beginning Tue May 9 12:10:01 AM CEST 2023
-!- springwurm(~springwur@2a01:76c0:302:ab00:56d6:1041:838c:f1e6) has joined #tryton05:04
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:db7c:11fb:1fc6:3112) has joined #tryton06:01
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton06:18
-!- ChanServ changed mode/#tryton -> +o cedk 06:18
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton07:06
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton08:02
mrichezhi, is there a way to now in tests why a state is not correct... example: in a state, scenario do a click on 'Confirm', so i'm expecting to be in state 'processing', but state is 'confirmed'... how to get error message that prevent sale state to be in 'processing' ?09:45
pokolimrichez: there is an error message on the process which is processed by the queue09:46
pokolimrichez: but the queue does not show the messages on test09:46
pokolimrichez: you should add a raise here https://foss.heptapod.net/tryton/tryton/-/blob/b96579a49fa33288c9a10c71746c9dd51aada49c/trytond/trytond/worker.py#L183 09:47
pokoliAnd you will see the full traceback with the error message09:47
mrichezpokoli: thanks ! :-)09:48
mrichezpokoli: i got my error :-)09:52
pokolimrichez: now you only need to fix it ;-) 09:54
mrichezpokoli: :-)09:54
-!- htgoebel(~hartmut@p200300d5df1dd10054e09a7a4c08d46a.dip0.t-ipconnect.de) has joined #tryton10:58
htgoebelHi,11:02
htgoebelin Tryton 5:11:02
htgoebelI try to use trytond.modules.account.tests.tools.get_accounts() in a unittest (not doctest).11:02
htgoebelThis keeps failing with "assert self.user is None" in trytond/transaction.py", line 8611:02
htgoebelHow to use this function? Or is there some substitute?11:02
pokolihtgoebel: test.tools are designed to be used on proteus (doctest). You should use functions from test_account in unittest11:11
htgoebelpokoli: IC. Will try that11:11
mrichezhi, if i don't define lead time on product, why sale shipping date can't be used to define planned_shipping_date on moves ? https://foss.heptapod.net/tryton/tryton/-/blob/branch/default/modules/sale/sale.py#L159011:23
pokolimrichez: maybe this issue can bring some more info on the topic: https://foss.heptapod.net/tryton/tryton/-/issues/1212411:30
mrichezpokoli: hum, i see... so it seems necessary to add a lead time for products... 11:34
pokolimrichez: not sure if this is the right behaviour, as once you set a lead time you can not use a lower shipping date11:35
mrichezpokoli: i could set a leadtime to 0 instead of None11:36
pokolimrichez: yes but that will plan all your shipments without a shipping date to the same sale date, which may not be the expected behaviour11:37
pokolimrichez: I even have the case of a customer that changes the price depending based on the delivery time 11:38
pokolithe problem is that the list price is always the longer lead time which is the default one. If you want to have it sooner you just pay more for it and the increase the manufactoring priority 11:39
pokoliNot sure how this can be solved using standard code, but I do not think its "too strang"11:40
mrichezpokoli: but if i set default leadtime to 0 and i set shipping_date later then it will be shipping date that will be used11:43
pokolimrichez: yes, but what if you do not set a shipping date? Which should be the behaviour?11:46
mrichezthen it will use shipping_date calculated with lead_time = 0, that will be the date when we process the sale, no ? (so it will be better to use at least a lead time of 1 day)11:49
pokolimrichez: yes, that will mean that the sale shipments will be planned by the same sale date (tomorrow if you use 1 day of lead time)11:53
pokoliBut once you use the lead time of 1 day, you won't be able to set shipping_date to today, despite you have the products in stock and you can ship them11:53
mrichezpokoli: hum, i understand but in our case i don't think it will happens, because there's a lot of preparation for each shipment. Indeed, it could happens if you sell small products (in this case, better to define 0 as leadtime)11:57
mrichezpokoli: i never thought about this problem until this morning when one of my test failed because there was no planned_date on move (because no lead time defined in my test)11:58
pokolimrichez: I may understand, I see that planned dates are not taken as serious as they should be12:00
pokolimrichez: but if you have it clear that no sale will be sent on same date, it is safe to use 1 day as default lead time for all products12:01
mrichezpokoli: yes i think that will be our default value12:02
-!- springwurm(~springwur@2a01:76c0:302:ab00:d0e5:cfae:eb89:8f2e) has joined #tryton12:09
-!- nicoe(~nicoe@2a02:2788:54:1ff:18c2:1aff:fef9:2b7f) has joined #tryton12:14
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton15:25
-!- rpit(~rpit@p200300c88f3f5b00202e27664fee210b.dip0.t-ipconnect.de) has joined #tryton17:08
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton20:47
-!- ChanServ changed mode/#tryton -> +o cedk 20:47

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