IRC logs of #tryton for Friday, 2021-01-08

chat.freenode.net #tryton log beginning Fri Jan 8 12:00:01 AM CET 2021
-!- JanGB(~jan@ip5f5ab055.dynamic.kabel-deutschland.de) has joined #tryton23:57
-!- lucascastro(~lucascast@177-185-139-189.dynamic.isotelco.net.br) has joined #tryton01:58
-!- csotelo(~csotelo@132.157.66.201) has joined #tryton02:46
-!- thaneor1(~ldlc6@r167-61-70-123.dialup.adsl.anteldata.net.uy) has joined #tryton05:14
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton06:03
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton06:35
-!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton06:58
-!- Timitos(~kpreisler@2001:a61:578:ee01:762b:62ff:fe84:ed7e) has joined #tryton07:18
LordVanHi.07:24
LordVanJust wondering ..if I want to change an existing field in Sale / SaleLine can I do that with a module, or do I need to edit the original module? (I just want to change state ={'readonly': Eval('state') != 'draft',} of some to soemthing like sate = {'readonly': Eval('state' == 'invoiced',}07:30
LordVanor add a few more states where editing is allowed (haven't decided yet completely)07:31
-!- JanGB(~jan@ip5f5ab07c.dynamic.kabel-deutschland.de) has joined #tryton07:37
LordVanhmm i found https://discuss.tryton.org/t/overriding-a-module-setting-a-required-attribute-field-to-true/2756 .. i hope it works similar with the state requirement .. maybe ..08:00
LordVanwill look into that now08:00
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton08:01
pokoliLordVan: you *should* do it on a module08:18
pokoliLordVan: otherwise customizations will be lost when updating to newer versions of the original module08:18
-!- JanGB(~jan@ip5f5ab07c.dynamic.kabel-deutschland.de) has joined #tryton09:53
-!- mariomop(~quassel@190.188.44.80) has joined #tryton10:57
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton11:15
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton11:48
LordVanpokoli, i know that i am jus tnot sure how to yet ;)12:32
LordVanpokoli, i was busy otherwise in the morning, but i was going to test if I can do it like that person did on that discussion at first12:35
LordVansince i am not changing requirements just making something editable later on12:35
pokoliLordVan: for editing states you just have to update the states attribute of the field in the __setup__ of the model12:37
LordVanpokoli, yeah I was going to just try that so like on that link i'd just override setup12:43
LordVanbtw12:43
LordVansale state .. I want it editable in at least draft/confirmed/quotation/processing12:44
LordVanis it better (tryton ) practice to just make it match those or just do not 'paid'12:44
LordVan(i guess cancelled can be erad only too though)12:44
LordVannot sure if I am missing a state?12:44
pokoliLordVan: which fields did you want to edit on processing?12:45
LordVanjust about everything on SaleLine i can edit in draft state and some on Sale12:45
pokoliLordVan: you can do readonly: ~Eval('state').in(['paid', 'cancelled'])12:45
LordVanyes i was just wondering is it better to do inclusive or exclusive?12:46
LordVanlike if there was a new state added later i mean12:46
pokoliLordVan: Is not a good idea to edit product quantities of processed sales. At this stage the shipment and invoices had been created so if you update them they won't be sync12:46
LordVanpokoli, not in our case12:46
LordVanalternatively I will leave it in "draft" state until the order is done and shipped12:46
pokoliLordVan: your case sounds very strange to my12:46
LordVanwhich is counter-productive since I need delivery notes12:47
pokolis/my/me12:47
LordVanpokoli, well the thing is we are a producing company12:47
pokoliLordVan: could you explain your case?12:47
LordVanand have lots of individual orders with no prior price12:47
LordVanand also quite often customers call up in the middle of production and say they need more of article XY or less or whatever12:47
LordVanso until everything is shipped things can always change12:48
LordVanand the final price is nearly always calculated after the whole order is shipped12:48
LordVan(very few exceptions, where people are known to have real bad payment morale they have to pay on pickup for example)12:48
pokoliLordVan: you should have a look at the sale_amendment module: https://docs.tryton.org/projects/modules-sale-amendment/en/latest/12:48
LordVanso invoices will always be done manually12:48
pokoliLordVan: this allows you to have all the history of the sale (initial stte and all the ammendments)12:49
LordVandelviery notes probably too12:49
LordVanhm i hadn'T noticed that . thanks I will look12:49
LordVanbtw12:49
LordVanabout delivery notes12:49
LordVanI need delivery notes also for sale lines that are not linked to article/products12:49
LordVanis that possible to generate automatically?12:49
pokoliLordVan: about prices: https://discuss.tryton.org/t/setting-product-unit-price-from-production-cost/357412:49
pokoliWe implemeted this for a customer recently (indeed we need to test it)12:50
LordVanpokoli, haha fun fact ..12:50
LordVanwe make steel/stainless steel/aluminium/.. parts too12:51
pokoliLordVan: which kind of lines are you talking about?12:51
LordVanwell i add a sale_line for a customer position XY with name "bla" which i will add in description12:51
LordVan(i have a module which re-adds description in the list of positions)12:51
LordVansince a lot of our parts are one off orders and never come again creating articles for everythign is just not worth it12:52
LordVanand using the production module for that would also be overkill .. for a lot of parts the administrative work would be nearly equal the work time for producing the part ;)12:53
pokoliLordVan: if you want purchase and production planning to work you will need to create a product.12:56
LordVanpokoli, that is nearly impossible to do for us12:56
LordVanwe do a lot of small parts in small quantities, on short notice often and with materials we have in stock12:57
pokoliLordVan: otherwise I think you should use a generic product with the descriptions: https://discuss.tryton.org/t/how-to-manage-the-name-of-generic-products/332312:57
LordVanbut managing all that in tryton is not feasible12:57
LordVanyes creating a generic product was my go-to workaround12:57
pokoliLordVan: stock moves require a product, so if you want them on delivery notes you should use a generic product12:58
pokoliLordVan: the report can be customized to print the text of the sale as the outgoing moves will be linked to the sale line12:58
LordVanyes the report is not the issue too much12:58
LordVanbut i would like the delivery note and invoice to be generated correctly ;)12:59
pokoliLordVan: what does correcly mean for you?12:59
LordVanbtw https://github.com/LordVan/tryton-modules/tree/master/sale_list_description <- is what I use for having decription back12:59
LordVanpokoli, well delivery notes containing the final amounts and also handle partial deliveries12:59
LordVanif i did use a generic product .. would it not list it ont he delivery note as just one ?13:00
LordVansince i would only change the description13:00
LordVan(i have not yet tested this just thought of it)13:00
pokoliLordVan: if you use a generic product but enter 3 lines (with same product) tryton will generate 3 lines on the delivery note13:00
LordVangood13:01
LordVanbut13:01
LordVanif i change my sale lines to be editable later states13:01
pokoliLordVan: main issue probably is sale_ammendment because it does not support to add new lines by default13:01
LordVanwould that update the delivery notes?13:01
LordVan(not sale_ammendment i mean)13:01
pokoliLordVan: but you can use the sale_shipment_grouping and sale_invoice_grouping to group all shipments, invoices of diferent sales13:02
LordVanI need those anyway13:02
pokoliLordVan: so you eneter a new sale for the customer once more products are ordered13:02
LordVanbut I really do not want to (and probably can't) just crete more sales every time13:02
LordVanthere are just too many changes by customers all the time (or even just mistakes in lists)13:02
LordVanWe would end up with 50% (probably) more sales / orders in the system than needed13:03
pokoliLordVan: what is the problem on having more sales if this allows the system generate the correct shipments/invoices?13:04
LordVanpokoli, management/employee acceptance mostly13:04
LordVan^^13:04
LordVanalso13:04
LordVanhow would I handle mistakes that cause amounts to be less than the initial order then..13:04
LordVanto be honest13:05
LordVanI really need to be able to just change things until it is done13:05
LordVanor sometimes it happens that we just end up (production related) with 1 or 2 more than ordered and if the customer wants those (and pays them) then they need adding too13:06
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton13:06
LordVanthe thing is13:06
LordVanInvocies I need to create manually anyway when everything is ready (and has final prices)13:07
LordVanbut delivery notes that are updated when the sale lines change would be nice13:07
pokoliLordVan: mistakes should be handled using amemdnemts13:07
LordVan(not finished/printed ones of course but the remainder)13:07
LordVanpokoli, yes that is what I thought13:08
LordVanpokoli, also I do not have a problem with creating a new sale for actual new items ordered13:08
LordVanit is mostly when the customer changes amounts/descriptions/..13:08
pokoliLordVan: I think you aim to automate the invoice generation. Tryton allows to update them if required, so if you have half of the work done this is a big improvement13:08
LordVanpokoli, well since someone needs to go , calculate prices and enter them into tryton having that person also press the button to generate/print the invoice is fine13:09
LordVanthat said13:10
pokoliLordVan: how do you calculate prices?13:10
LordVanby getting the project documents that had been printed out on order , adding up hours, taking the material used and other cost and sum it up13:10
LordVanbut that is pretty much all manual (the workers won't enter their times,.. in tryton)13:10
LordVanmost of them are computer illiterate or close to that13:11
LordVanso things are filled out on paper13:11
LordVanwhich is fine (for the time being anyway)13:11
LordVanand that is also the reason i do not need (or rather can't) use the production module for now13:11
LordVan[we are a small company with < 20 employees .. we can't have someone enter that much data into tryton all day long]13:12
pokoliLordVan: production module is used to compute all your costs13:12
LordVanyes but that would be too hard to implement (right now at least)13:12
LordVanthat might be an option some years in the future13:12
LordVanright now I want to 1) get away from dolibarr for project documentation generation (very basic one) -- this is nearly done except for some details and the report template13:13
pokoliLordVan: as you do not want to use most of the system probably will be easier to just use the account_invoice and accounting moduels13:13
pokoliLordVan: because if you do not want to manage supply, nor production then it does not make so much sense to enter sale orders13:14
pokoliLordVan: or at leas you can use the "manual" invoice and shipment methods. So you will only have the products ordereds and tryton won't generate any related document13:14
LordVanI do want to manage offer document generation, project document generation [the stuff the workers fill out by hand later], delviery notes and invoices13:14
LordVanpokoli, yes i was going to use manual most likely13:15
LordVanbut13:15
LordVancorrect me if i am wrong .. if I do not use product/article for sale lines .. do i have to type in everyting manually for delivery notes?13:15
pokoliLordVan: is there any time frame that you allow to update the orders? I.e: An order can only be updated upt to 30 days13:15
LordVanpokoli, not really some projects are rather long running while most are short13:16
pokoliLordVan: yes, you chosed to manage everything manually :)13:16
LordVanpokoli, so there is no way to at least copy sale lines to delivery note ?13:16
LordVan[i imagine writing a Wizard for that should be fairly easy]13:16
pokoliLordVan: Why you need delivery notes? To inform customer what has actually been shipped? Or whatelse?13:17
LordVanlater on I do want to use product/article for some customers that actually have (a lot of) recurring products but for 95% of the customers not13:17
LordVanpokoli, to have them sign it if they pick it up that they have it or to put it in the parcel if it is sent13:17
LordVanbasically more a shipping list / confirmation of receipt in case of pickup13:17
LordVanor if we deliver it to the customer then they also sign off on it13:17
pokoliLordVan: how do you know which quantities the user has to pick? Everything that is already produced?13:27
LordVanwell let me add for one that we often have different (desired) completion /delivery dates for individual sale lines (or maybe even for parts of them if quantities are high)13:29
LordVanso usually13:29
LordVanwe would try to send/deliver y complete order13:29
LordVanbut quite often it is only a part of it - most of the time what is done already by then13:29
LordVanso i need to manually be able to adjust the quantities per line of course13:30
LordVanpreferrably with tryton keeping track of how many of each has been already picked up (though most of the time we would try to have one SaleLine completed at once at least anyway13:30
pokoliLordVan: in order to know what has been already produced on tryton you will need a production order13:39
LordVanthat would be entered manually13:39
pokoliLordVan: Then you can have a wizard to generate the shipment based on what has been produced13:39
LordVanright before printing13:39
LordVanbasically for me - for now at least- what would work would probably be a Wizard that creates a delivery note for any products/sale lines not yet delivered -- triggering that manually is fine .. then let the user adjust amounts accordingly and print13:40
LordVanthen at a later point (if it is not completed) run te wizard again for the remainder of products13:40
LordVandoes that sound .. (easily)d oable to you?13:41
LordVan(in an ideal world / situation i would prefer to use production,.. too but that is just way too much to do all at once)13:41
pokoliLordVan: main problem with this wizard it that you will need to properly link shipments with sales, so know what has been delivered or not13:47
LordVanpokoli, yes that is what I think too .. I have not looked at the code yet .. ist hat difficult to link correctly?13:47
pokoliLordVan: this means that you need a one (or more in case of partial shipment) delivery note line for each sale line13:48
LordVanyes potentially13:48
LordVansome could be 0 for a specific delivery not of course13:48
pokoliLordVan: You just have to set the origin of the delivery move to a sale line13:48
LordVanhm13:49
LordVannot sure what you mean .. gotta look at the code..13:49
LordVanI was just going to make the wizard so that it looks at the sale lines and the existing delivery notes lines13:49
LordVancompares and creates one with the difference13:49
LordVansince i do not need stock movements or anything13:49
LordVanas we rarely have any finsihed products in stock13:50
LordVan(with a few small exceptions)13:50
pokoliLordVan: delivery note lines are stock moves :)13:50
LordVanok13:50
LordVaneven if there is nothing i stock (in tryton) to move ^^13:50
LordVanfair13:50
LordVanbut I think that way of handling it - combined with making the sale lines editable (sale_ammendment is probably overkill since I generate the remaining stuff like delivery notes and invoices manually anyway) - is probably the best way to go about it for now13:51
pokoliLordVan: but you can configure Tryton to avoid the picking process.13:51
LordVanACTION has no clue about picking process,.. in tryton (yet)13:52
pokoliLordVan: indeed you don't need to care as you are not using the stock. So just configure tryton to ignore it13:53
LordVanbut since i don'T use inventory/stock management anyway as long as it was hidden to the end user i don't care too mcuh what happens internally (same goes for accounting .. we have existing accouting software which is not going to be replaced so tryton only has very minimal accounting set up so everything works)13:53
pokoliLordVan: if you do not want to use sale_ammendment probably the best is to leave sales as confirmed (so you can go back to draft)13:54
pokoliLordVan: and then process the sale once it's fully delivered, so nothing else can be changed13:55
LordVanpokoli, but (in latest tryton) .. if i click confirm it will go to state processing automatically not confirmed13:55
LordVanso i cannot go back13:55
LordVani don'T want to leave them in the Offer state either though13:56
pokoliLordVan: automatically processing can be avoided ;)13:57
LordVanah wait13:57
LordVani forgot to set to manual13:57
pokoliLordVan: if you set boht manual for invoice and delivery methods the sale will go from confirmed to finished directly13:58
LordVanyes i jsut noticed13:58
LordVannot .. desireable13:58
LordVanhaha13:58
LordVanbut how do i avoid that?13:59
pokoliLordVan: we've done some times by setting a context flag on confirm button and skipping the task queue when the flag is set14:00
LordVanah so doing it without changing that is not possible with just settings then?14:01
LordVanso the only way for me to do this right now would be to stay in the quotation state14:02
LordVan(that would surely not confuse everyone at all .. haha)14:02
LordVanpreferrably i'd like it to be in processing and be able to edit it14:03
LordVanbut to generate delivery notes and sales manually (on button press with wizard)14:03
LordVanor confirmed14:04
LordVani don't mind that14:04
LordVanbut from a usuability point of view it can'T be in quotation or finished state when it is actually being produced right now14:04
LordVanso .. would it be difficult to stop tryton from "automagically" clicking the processing/finished button for me after i confirm?14:08
LordVanin fact i shall go read the code now14:08
LordVan(while i reset my db and re-run the import)14:09
LordVanhmm14:14
LordVanI think best would be if i could just stay at "confirmed" until i process / finish manually14:14
LordVani just noticed this in sale.py: cls._states_cached = ['confirmed', 'processing', 'done', 'cancelled']14:14
LordVanso there is more to consider if i made things read-write again in confrimed/..14:15
LordVanhmm i can'T really see how i can stop tryton from stopping automatically processing and setting the state to done if i just confirm it  ..14:22
LordVan(with both delivery notes and invoices manually)14:22
LordVanpokoli, i assume i would need to do something like you mentioned bout skipping some task queue14:23
LordVansale.py:942   cls.__queue__.process(sales)14:23
LordVanir probably the culprit14:23
LordVanmethinks14:24
LordVanbut .. where is defined what the queue has to do ..14:25
LordVan(line 949 actually but whatver)14:27
LordVanso I could just overwrite the confirm method and just "pass" in it - or maybe set the date not sure if i need that (probably not)14:28
pokoliLordVan: there is a setting to delay the processing but not possible to delay it indefinently. Also you need to setup workers14:36
LordVanworkers?14:38
pokoliLordVan: yes, that line is the culprit.14:38
pokoliLordVan: or a single worker14:38
pokoliLordVan: to process sales and purchases in background14:38
LordVanbut i don'T need it to process anything  at this point14:38
LordVan?14:38
pokoliLordVan: this is really usefull for doing computations on background without forcing the user to wait them14:38
LordVani just want to change the state to confirmed14:39
LordVanso it is listed as such adn not quotation14:39
LordVanand that way i can go back to draft too, change stuff and bck to confirmed14:39
LordVanand when all is done to done14:39
pokoliLordVan: when some products are delivered do you require to update the sale? Or not?14:44
LordVanpokoli, what do you mean update the sale? i just want the delivery notes to be linked to the sale14:44
pokoliLordVan: update sale products to add new lines or modify quantities14:45
LordVanah you mean if we have surplus,.. no that isn ot needed.. in that case the user should just update the sale line (i am contemplating adding a field for amount_produced since the customer ordered .. say 10 pieces we deliver 11 becaue of a surplus)14:47
LordVanbut the order was still fro 1014:47
LordVanfor14:47
LordVanbut14:47
LordVanthen again14:47
LordVani do not think that would matter fo rme14:47
LordVanin fact i would likely do it the other way around and put an amount_ordered in there so we know how much was ordered initially and then we just updaet the amount if we have more /less14:48
LordVanso there is a record of it but it shouldn'T interfere (nor be on any usual reports)14:48
LordVanpokoli, should that not "skip" the queue and go from quotation to confirmed ?14:50
LordVanhttps://dpaste.org/Pm2414:50
LordVan(there is probably some obvious and stupid mistake I am not seeing)14:50
pokoliLordVan: yes, this will skip any code on the confirm transition14:52
LordVanbut14:52
pokoli(which is not probably a good idea)14:52
LordVanit still goes to finished14:52
LordVanpokoli, i was mostly testing14:52
pokoliLordVan: maybe you did not added the Sale class in the register function of the __init__.py file of your module14:52
LordVani did14:52
LordVanbut let me re-check and make sure the module is upgraded14:53
LordVanah14:54
LordVani got an error14:54
LordVandue to missing imports like for the@ModelView .,14:54
LordVanah now that works14:57
LordVanpokoli, is there any way i can easily see what the confirm transition usually does? so i know if i  really can skip this?14:57
LordVansince at first glance14:58
pokoliLordVan: looking at the code of the sale module14:58
LordVanthings seem to work14:58
LordVanpokoli, yes but it only says someting about __queue__14:58
LordVanwhich i couldnt't figure out tbh14:58
LordVanah wait14:59
pokoliLordVan: it does something more:14:59
pokolihttps://hg.tryton.org/modules/sale/file/4c7b8b0d9060/sale.py#l93014:59
LordVanthe .process () module14:59
pokoliLordVan: process is the one that craetes shipments and invoices and updates the shipment_state and invoice_state14:59
LordVanyes15:00
pokoliLordVan: when you see __queue__ it means that it is called in background using the workers15:00
LordVanconfirm only sets the sale date, does soemthing with  cache then starts that queue15:00
LordVanah15:00
LordVanso it calls process straight after15:00
LordVanbut15:00
LordVanif all i do is "skip" confirm15:01
LordVanthen click process later15:01
LordVan(which i do)15:01
LordVanthen I should be good?15:01
pokoliLordVan: but depending on the modules it can do more: https://hg.tryton.org/modules/sale_stock_quantity/file/879b7e44b276/sale.py#l2915:01
LordVanof course other modules could overwrite this15:01
LordVanI am very unlikely to use that one though15:02
LordVanbut i would have to be aware that if i add anything esle that overwrites Sales.confirm to make sure to check (and maybe call taht too)15:02
LordVanIf i did have anything else taht overwrites confirm(..) .. in what order would the various modules be checked?15:04
pokoliLordVan: in the order of dependencies15:06
LordVanbut what if my module depends on sale and that one too?15:06
LordVanI mean yes i can then change mine to depend on that other module but if i "forget" ?15:07
pokoliLordVan: we normally have a module with all customization that have all the dependencies listed15:07
pokoliLordVan: so this module is always executed last15:07
LordVanthat is actually a great idea ^^15:07
LordVanand makes a lot of sense and avoids me having to sort all the modules manually15:07
pokoliLordVan: normally it's easier to maintain if you have a module with all the customizations15:08
LordVanyeah i think i will merge my sale_line_description module into that one too actually15:08
pokoliLordVan: probably it's worth a talk on an unconference (or a webinar on covid times) to explain how to maintan all customizations15:08
LordVansince it is super small15:08
LordVanpokoli, i'd be (vritually) present15:09
LordVanI was wondering anyway .. if in these times it has been considered to do a conference online15:09
pokoliLordVan: I'm not fan of small modules. I prefer customziation modules15:10
LordVani understand .. it was basically the very first module i wrote for tryton15:11
LordVanand it could be considered to be fairly generic15:11
pokoliLordVan: normally customziation modules evolve to become big15:11
LordVanI think others could find a use for that too (all it does is add a column anyway)15:11
LordVanbut15:11
pokoliLordVan: and also can be used to easly create a testing environment as you only need to install the module and all of its dependencies15:11
LordVanpokoli, yepp though for testing i just drop and re-create the DB with soem basic settings at the moment15:11
LordVanthat is even quicker15:11
LordVanre-create being restore backup/pg_dump15:12
LordVanbut .. that is great .. just this - a few lines long - module that overwrites confirm solves my issue about editing without doing anything particularily complicated15:13
pokoliLordVan: then you are only missing the wizard15:14
LordVanyes15:14
pokoliwhich should be part of the same customization module :)15:14
LordVanof course15:14
LordVanwell and my extra fields15:14
LordVanbut15:14
LordVanthose i do not need for monday15:14
LordVan^^15:14
pokoliLordVan: this wizard should create the outgoing move, and set the related sale_line on the origin field of the stock move15:15
LordVanyes i will have to look into that15:16
LordVanthe good thing15:16
pokoliLordVan: then the sale process method will correctly compute the shipped quantities15:16
LordVanI do not need the wizard right now either i have a bit of time for that15:16
LordVanwhat I did need was to stop at "confirmed" to be able to go back and adjust stuff15:16
pokoliLordVan: so you can even use the "on_shipment" invoice method15:16
LordVanand create reports15:16
LordVanpokoli, nice15:16
LordVanI gotta look into how to make the templates for reports .. been ages since i read up on that15:17
pokoliLordVan: you should look at https://docs.tryton.org/projects/server/en/latest/topics/reports/index.html?highlight=reports15:18
pokoliLordVan: and also the relatorio examples: https://relatorio.readthedocs.io/en/latest/quickexample.html15:18
LordVanthank you!15:19
LordVanbtw15:19
LordVansomething that is a bit of an annoyance15:19
LordVanwhen i add a sale line without product15:19
LordVanand enter an amount, a price then change the unit15:19
LordVanit always clears the amount (but not the total amount)15:19
LordVanis there any way to fix this easily -- or at least set a default unit (and tax) for sale line without product?15:20
-!- rpit(~rpit@p200300c88f4cbb00cea2955fb3b32f1a.dip0.t-ipconnect.de) has joined #tryton15:20
pokoliLordVan: changing the unit triggers the recomputed based on the product15:21
pokoliLordVan: but as you do not have product it is emptied15:21
pokoliLordVan: probably a missing feature15:21
pokoliLordVan: the same happens if you set a product, change the unit price and then update the unit. The product unit price will be set15:22
LordVanso15:23
LordVanI could save myself hassle if I did just add a dummy product with unit, tax set and price zero and then edit what i need to?15:23
pokoliLordVan: then the price will be set to zero each time you update the quantity or the unit15:23
LordVanok that is also annoying15:25
LordVanprobably better to leave as-is then15:25
LordVanbecause that generates an error15:25
LordVanthough15:25
LordVan99% of the time when the sale line is first entered there will be no price so15:25
LordVanthat really only matters when the invoice is created15:26
LordVanhm15:26
LordVanpokoli, or i overwrite the recomputation method to leave the price field alone if there is no product15:26
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton15:27
pokoliLordVan: probably the best is to set 0 as unit price for sales15:27
LordVanthough .. https://hg.tryton.org/modules/sale/file/4c7b8b0d9060/sale.py#l130815:28
LordVanso it should return if there is no product associated15:29
LordVanweird15:29
LordVanbecause on_change_unit calls on_change_quantity() which calls compute_unit_price15:29
LordVanwhich should do nothing if there is no product assigned15:30
LordVanunless i am missing something15:30
LordVanpokoli, but I will just make a product "Standard" with the usual tax rate, unit set to pieces and price 015:44
LordVanthat seems to be the most useful solution that does nto require a lot of effort/development15:44
LordVannow the only thing is15:44
LordVancan i set it up so that when adding a new line that one article is selected by default?15:45
LordVanI guess .. i could overwrite setup .. and select a product if none is selected yet15:51
LordVanah15:52
LordVani just noticed something while playing around with proteus15:52
LordVani want to import old sales data (no details needed or even available except for start date, end date (the customer supplied due to date) and a customer reference (and maybe a few contacts)15:53
LordVanbut15:53
LordVanif i create a sale15:53
LordVaneven if i try to set state = 'done' it won't do it .. i assuem because of several reasons .. one being there are no sale lines ?15:53
LordVanalso i guess it won't let me just create a sale with state 'done' ?15:54
LordVanok i figured out how to do that with .click()15:56
LordVanbut15:56
LordVanif i want to import historical sale data15:56
LordVani need the numbers to be from the previous years15:56
LordVancan I even do that using proteus?15:56
pokoliLordVan: maybe we can update on_change_quantity to not update unit_price when it returns None15:58
LordVanpokoli, yes that would be an option15:58
pokoliLordVan: but we should keep the current behaviour for on_change product15:58
LordVanbut I would need to change on_change_unit to not do anything to the other fields15:58
pokoliLordVan: sound like an easy patch for a first time contributor :)15:58
LordVanpokoli, you know what my biggest hurdle is to contribute to the official code base?15:58
LordVanmercurial ^^15:59
LordVan(never really used it)15:59
pokoliLordVan: well, it's very similar to git15:59
LordVanyeah i still need to read some docs first15:59
LordVanand i am sitll a git n00b15:59
LordVani am old school CVS , SVN15:59
LordVanthough I am using git for stuff now15:59
pokoliLordVan: but as far as you create the issue and upload a patch I may take care of uploading the codereview15:59
LordVanand like it15:59
pokoliLordVan: but you should lear about mercurial16:00
LordVani should16:00
pokoliLordVan: mercurial is the natural evolution of SVN. So if you are familiar with svn it won't be to hard16:00
LordVannice16:00
pokoliLordVan: at least it will be great to create the feature request on the bug tracker16:01
LordVanbtw just one last thing before i finish work for today .. what do you think of setting a default product on sale line (if it is a new sale line) in setup() ?16:01
LordVani shall do that on the bug tracker tomorrow (i reported stuff before but been a while)16:02
pokoliLordVan: about the sales import there should be some issue on your code because I imported some historicall data using proteus16:02
LordVanwell all i did was Sale() .. sale.number= 'old number', sale.party = myparty ; sale.save() ; sale.click('draft'), quote, confirm16:02
LordVanbut as soon as I do sale.click('draft') it overwrites the number with the next sequence16:03
pokoliLordVan: Oh, I did not this way. I just created the sale in the done state16:04
LordVanah you can do that? cool16:04
pokoliLordVan: now that I remember I was using proteus but not directly. Just calling the API from proteus16:04
LordVanthat would be all i need16:04
LordVansince i don't need sale lines or anything16:05
pokoliLordVan: you can use trytond-console to call a script directly from the server16:07
pokoliLordVan: in your case will be easier16:07
-!- rpit(~rpit@p200300c88f4cbb00cea2955fb3b32f1a.dip0.t-ipconnect.de) has left #tryton16:15
LordVanwell16:32
LordVanhow is it easier?16:33
LordVanand where are the differences?16:33
pokoliLordVan: proteus mimics the clients so it call on_changes and so one16:33
pokoliLordVan: trytond-console is pure server side so you just have to use the API and set a value for all fields16:33
LordVanok16:34
LordVanthat is what i thought16:34
LordVanbut can i also do that in proteus or will it not let me create done state sale?16:35
LordVanok i tested16:38
LordVanproteus won'T let me do that16:39
LordVanso i guess i need trytond-console16:39
pokoliLordVan: the problem is that proteus understand that the number and the state are readonly16:45
pokoliLordVan: so won't allow you to modify them16:45
LordVanyeah16:46
LordVanpokoli, are there any issues with creating historical entries without any sale lines,.. ?16:46
LordVan(that you know of)16:46
pokoliLordVan: no, as far as the sale does not have any line it does not trigger any other workflow16:48
LordVangood16:49
LordVanpokoli, did you add historical invoice (numbers) too ?16:49
pokoliLordVan: yes, we migrated all the numbers party, data and the lines information16:53
pokoliLordVan: also linked invoices16:54
pokoliLordVan: not an easy task and not something that I would recommend16:54
pokoliLordVan: but the customer wanted it and paid the price. So we just did it.16:54
LordVanwell i want the sale numbers17:03
LordVanthe invoice numbers are currently not in dolibarr17:03
LordVanso would have to be manually copied to a csv to import or so17:03
LordVannow i am not talking invoice lines17:03
LordVanjust the numbers17:03
LordVanbut i recon that is probably difficult17:03
pokoliLordVan: why you need *just* the numbers?17:05
pokoliLordVan: you can always keep dolibarr in a readonly mode to search for historicall data17:05
LordVandolibarr has no invoice numbes17:05
LordVanthey are in spreadsheet documents17:05
pokoliLordVan: i'm asking about sale numbers17:06
pokoliLordVan: you need to start thinking in unify everything on Tryton17:07
LordVanso far17:11
LordVanmost of our data is still in spreadsheets (except accounting and salary calculation) .. only party data and sale/project numbers (with contacts, customer ref and dates were stoerd in dolibarr)17:12
LordVani am going to try to unify as much as possible17:12
LordVanbut it will take time17:12
LordVanfor now i want to replace dolibarr with tryton and then slowly add more and more17:12
LordVanalso will help with user acceptance over tiem17:12
-!- thaneor(~ldlc6@r167-61-78-190.dialup.adsl.anteldata.net.uy) has joined #tryton17:15
pokoliLordVan: i'm leaving for today. Will read you once back online!17:15
LordVansure i am going to have dinner soon too anyway17:19
-!- lucascastro(~lucascast@177.125.20.159) has joined #tryton18:57
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton19:25
LordVanhmm .. I don't get it19:54
LordVanhow can I search for a specific party / company/ sale with trytond-console ?19:54
LordVanthere is no find() like wiht proteus?19:54
LordVanah never mind19:57
LordVan.search there19:57

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