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 #tryton | 05:04 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:db7c:11fb:1fc6:3112) has joined #tryton | 06:01 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 06:18 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 06:18 | |
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton | 07:06 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton | 08:02 | |
mrichez | hi, 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 |
---|---|---|
pokoli | mrichez: there is an error message on the process which is processed by the queue | 09:46 |
pokoli | mrichez: but the queue does not show the messages on test | 09:46 |
pokoli | mrichez: you should add a raise here https://foss.heptapod.net/tryton/tryton/-/blob/b96579a49fa33288c9a10c71746c9dd51aada49c/trytond/trytond/worker.py#L183 | 09:47 |
pokoli | And you will see the full traceback with the error message | 09:47 |
mrichez | pokoli: thanks ! :-) | 09:48 |
mrichez | pokoli: i got my error :-) | 09:52 |
pokoli | mrichez: now you only need to fix it ;-) | 09:54 |
mrichez | pokoli: :-) | 09:54 |
-!- htgoebel(~hartmut@p200300d5df1dd10054e09a7a4c08d46a.dip0.t-ipconnect.de) has joined #tryton | 10:58 | |
htgoebel | Hi, | 11:02 |
htgoebel | in Tryton 5: | 11:02 |
htgoebel | I try to use trytond.modules.account.tests.tools.get_accounts() in a unittest (not doctest). | 11:02 |
htgoebel | This keeps failing with "assert self.user is None" in trytond/transaction.py", line 86 | 11:02 |
htgoebel | How to use this function? Or is there some substitute? | 11:02 |
pokoli | htgoebel: test.tools are designed to be used on proteus (doctest). You should use functions from test_account in unittest | 11:11 |
htgoebel | pokoli: IC. Will try that | 11:11 |
mrichez | hi, 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#L1590 | 11:23 |
pokoli | mrichez: maybe this issue can bring some more info on the topic: https://foss.heptapod.net/tryton/tryton/-/issues/12124 | 11:30 |
mrichez | pokoli: hum, i see... so it seems necessary to add a lead time for products... | 11:34 |
pokoli | mrichez: not sure if this is the right behaviour, as once you set a lead time you can not use a lower shipping date | 11:35 |
mrichez | pokoli: i could set a leadtime to 0 instead of None | 11:36 |
pokoli | mrichez: yes but that will plan all your shipments without a shipping date to the same sale date, which may not be the expected behaviour | 11:37 |
pokoli | mrichez: I even have the case of a customer that changes the price depending based on the delivery time | 11:38 |
pokoli | the 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 |
pokoli | Not sure how this can be solved using standard code, but I do not think its "too strang" | 11:40 |
mrichez | pokoli: but if i set default leadtime to 0 and i set shipping_date later then it will be shipping date that will be used | 11:43 |
pokoli | mrichez: yes, but what if you do not set a shipping date? Which should be the behaviour? | 11:46 |
mrichez | then 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 |
pokoli | mrichez: 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 |
pokoli | But 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 them | 11:53 |
mrichez | pokoli: 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 |
mrichez | pokoli: 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 |
pokoli | mrichez: I may understand, I see that planned dates are not taken as serious as they should be | 12:00 |
pokoli | mrichez: 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 products | 12:01 |
mrichez | pokoli: yes i think that will be our default value | 12:02 |
-!- springwurm(~springwur@2a01:76c0:302:ab00:d0e5:cfae:eb89:8f2e) has joined #tryton | 12:09 | |
-!- nicoe(~nicoe@2a02:2788:54:1ff:18c2:1aff:fef9:2b7f) has joined #tryton | 12:14 | |
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton | 15:25 | |
-!- rpit(~rpit@p200300c88f3f5b00202e27664fee210b.dip0.t-ipconnect.de) has joined #tryton | 17:08 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 20: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/!