IRC logs of #tryton for Friday, 2021-05-28

chat.freenode.net #tryton log beginning Fri May 28 12:00:01 AM CEST 2021
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:04
-!- springwurm(~springwur@5.104.149.54) has joined #tryton04:56
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton05:03
-!- Timitos(~kpreisler@2001:a61:4ac:5b01:762b:62ff:fe84:ed7e) has joined #tryton06:00
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton06:26
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton07:05
cedkpokoli: would you mind if I work on the budget modules?07:23
pokolicedk: no, please go ahead07:25
pokolicedk: can we backport translation fixes if they fix a crash?07:25
pokoliI did not test but I guess this fix produces a crash: https://hg.tryton.org/weblate?cmd=changeset&node=1e7f984fa95807:25
cedkpokoli: I think we manage such case and avoid crash07:26
pokolicedk: great, so I will do nothing unless I get a crash report. Thanks07:27
-!- ludo2(~Thunderbi@193.33.57.196) has joined #tryton07:27
LordVancedk, I was trying to figure ot where I can add some extra logic (fill in some custom fields I added) when the componets of a kit are added on sale quotation ..07:35
LordVanbut to be honest I am still unsure .. is this something that'd need to be done in the OrderLineMixin?07:37
LordVanset_components seems like it would be the correct method07:39
LordVanbut i am unsure how to best go about overwriting that07:39
-!- thaneor1(~ldlc6@r167-61-68-22.dialup.adsl.anteldata.net.uy) has joined #tryton07:42
LordVanor could I hook into some method in the SaleLine methods to do this? (I want to copy a field from the "parent" of the components to the components itself07:49
mrichezhi, is it possible to use a language only for interface use, not for translation ? i mean duplicating english language with french format settings (number, date) but i don't want to have translation in this mixed language (product name, ...)  just for the interface07:55
cedkLordVan: I guess you should extend set_components08:14
cedkmrichez: not really because the call is to have the same display everywhere08:14
cedkmrichez: but you could extend User._get_preferences to change the locale for the user08:15
LordVancedk, ok thanks i will look into it more then i just didn'T want to be completely somewhere else08:15
mrichezcedk: ok, i'll try to extend user, would be better solution... thanks08:16
-!- springwurm(~springwur@5.104.149.54) has joined #tryton08:37
LordVancedk, that said to keep it simpler (for me at least) I was considering just adding some code to my on_change_product (which seems to be called as my code is executed and my custom fields filled in) .. so that if the current line is the component of a kit to just add the data needed .. or do you think that would possibly cause some issues I am not thinking of right now?08:57
LordVanhttps://github.com/LordVan/tryton-modules/blob/3c7bf2d83c97644eee8053301695d5cfad42d6f4/rm_extra_data/sale.py#L281 <- that method08:58
cedkpokoli: there was a reason to use negative value for the budget compare to the income statement?08:58
LordVanI'd have to be able to reliably tell if it was added as a component or as an individual sale line though ..08:59
LordVanhm08:59
cedkLordVan: why not if it makes sense for your use case08:59
LordVancedk, is there a reliable way to make sure it was not added individually, but as part of a kit?09:00
cedkLordVan: no09:01
pokolicedk: I do not remember but it sounds like a fix to have the same amounts due to some wrong computing of the income amount (as its reversed from the usual debit - credit)09:06
cedkpokoli: looking at some example it seems that it is a common practice09:07
pokolimrichez: maybe you can a derivative language from english which sets the french formating. Something like en_FR09:08
cedkI guess it comes from the idea that it is expense to consume and revenue to fill09:08
pokolicedk: yes, from the bugdet (and also income) PoV the expense consume and the revenue fills09:09
mrichezpokoli: that was my first idea but if i click on translation (for example product name, i got now translation for English and for English_FR), it just need this language for interface09:10
pokolimrichez: of course, as it's a new language. So only option is to extend User._get_preferences09:13
mrichezpokoli: :-)09:15
cedkpokoli: I'm going to change the amount management, I think it should be based on a sum of children + the node amount (which could be empty)09:22
cedklike that there is no need for a validation09:22
pokolicedk: this is the same as we do on accounting, so for me it makes sense09:25
LordVancedk, hmm what about adding a boolean field to the line mixin so that one can determine if it was added automatically as part of a kit or not?09:29
LordVanor do you think this is not something that could be useful in general (not just for me) ?09:29
cedkLordVan: I do not see use case for that09:31
LordVanwell only for "special" treatment for sale/purchase lines like in my case09:31
LordVanI want to treat the sale lines differently if it was added as a component of a kit or individually. Like on the delivery note I want it to just list the kit, not all the components09:35
LordVanactually I have to admit I have to read up on how I would override/extend the set_components method of the ORderMixin class which is returned by order_mxin(prefix)09:37
LordVan[also I have no idea how the whole Mixin stuff works]09:38
cedkLordVan: then you should use a kit product and not a goods with components09:43
LordVanthat said i could just try to figure it out by looping through the sale lines and when i find a kit added then do my custom stuff for the components09:43
LordVancedk, i am not sure what you mean with that09:44
LordVanI am just thinking it might be more useful to elaborate this on discuss with examples and reasoning as to why I want to do this than trying to explain here ;)09:47
-!- dee(4fe6e7c6@p4fe6e7c6.dip0.t-ipconnect.de) has joined #tryton09:52
pokoliLordVan: the sale process behaves diferently if the product with components is of type kit or its a goods one09:56
LordVanhm09:57
pokoliLordVan: If you use a kit product, only the kit line will apear on sale but the stock moves will be created using the components09:57
LordVanbut could I "abuse" that to fill in my custom fields?09:57
LordVanpokoli, yes i read that code09:57
pokoliLordVan: you can use this type to diferentiate what to print on each report09:58
LordVanah10:00
LordVanthe line type10:00
cedkkit vs goods is not really about the reporting but how components are invoiced and at which price10:32
LordVancedk, yes I understand that but for me it would be useful to have that differentiaton for the report too11:02
-!- ludo2(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton11:04
-!- mariomop(~quassel@181.29.189.235) has joined #tryton11:04
-!- ludo3(~Thunderbi@2001:912:1480:380::1) has joined #tryton11:11
pokoliLordVan: it seems you are building a system just to generate reports :O11:14
LordVanpokoli, generating reports is a large part yes11:15
LordVan-- if you consider delivery notes and invoices also reports11:15
LordVanthat is the next part11:15
pokoliLordVan: yes they are reports but also a separate document, not just sales11:19
LordVanyes of course11:20
LordVani am just doing my very last adjustments for sale reports (now that product kits are available that is all that is left before i move on to delivery notes and invoices)11:20
LordVanpokoli, but basically i do not want to move on to replacing the next part(S) of our workflow with tryton before this one is done (ok technically speaking there is a small detail that needs to be still done, but that is related to offers & offer numbers, but that is low priority)11:22
-!- ludo2(~Thunderbi@193.33.57.196) has joined #tryton11:54
-!- lucascastro(~lucascast@177-185-133-236.dynamic.isotelco.net.br) has joined #tryton12:08
-!- springwurm(~springwur@5.104.149.54) has joined #tryton12:08
-!- ludo2(~Thunderbi@193.33.57.196) has joined #tryton12:49
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton13:12
-!- Pilou(~Pilou@rogoth.ir5.eu) has joined #tryton16:55
-!- Pilou(~Pilou@pdpc/supporter/active/pilou) has joined #tryton16:55
-!- ludo2(~Thunderbi@221.114.141.88.rev.sfr.net) has joined #tryton19:01
-!- thaneor(~ldlc6@r167-61-79-56.dialup.adsl.anteldata.net.uy) has joined #tryton19:44

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