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 #tryton00:01
-!- lucascastro(~lucascast@177-185-139-189.dynamic.isotelco.net.br) has joined #tryton02:01
-!- csotelo(~csotelo@132.157.66.201) has joined #tryton03:01
-!- thaneor1(~ldlc6@r167-61-70-123.dialup.adsl.anteldata.net.uy) has joined #tryton06:01
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton07:01
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton07:01
-!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton07:01
-!- Timitos(~kpreisler@2001:a61:578:ee01:762b:62ff:fe84:ed7e) has joined #tryton08:01
LordVanHi.08:01
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',}08:01
LordVanor add a few more states where editing is allowed (haven't decided yet completely)08:01
-!- JanGB(~jan@ip5f5ab07c.dynamic.kabel-deutschland.de) has joined #tryton08:01
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 ..09:01
LordVanwill look into that now09:01
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton09:01
pokoliLordVan: you *should* do it on a module09:01
pokoliLordVan: otherwise customizations will be lost when updating to newer versions of the original module09:01
-!- JanGB(~jan@ip5f5ab07c.dynamic.kabel-deutschland.de) has joined #tryton10:01
-!- mariomop(~quassel@190.188.44.80) has joined #tryton11:01
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton12:01
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton12:01
LordVanpokoli, i know that i am jus tnot sure how to yet ;)13:01
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 first13:01
LordVansince i am not changing requirements just making something editable later on13:01
pokoliLordVan: for editing states you just have to update the states attribute of the field in the __setup__ of the model13:01
LordVanpokoli, yeah I was going to just try that so like on that link i'd just override setup13:01
LordVanbtw13:01
LordVansale state .. I want it editable in at least draft/confirmed/quotation/processing13:01
LordVanis it better (tryton ) practice to just make it match those or just do not 'paid'13:01
LordVan(i guess cancelled can be erad only too though)13:01
LordVannot sure if I am missing a state?13:01
pokoliLordVan: which fields did you want to edit on processing?13:01
LordVanjust about everything on SaleLine i can edit in draft state and some on Sale13:01
pokoliLordVan: you can do readonly: ~Eval('state').in(['paid', 'cancelled'])13:01
LordVanyes i was just wondering is it better to do inclusive or exclusive?13:01
LordVanlike if there was a new state added later i mean13:01
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 sync13:01
LordVanpokoli, not in our case13:01
LordVanalternatively I will leave it in "draft" state until the order is done and shipped13:01
pokoliLordVan: your case sounds very strange to my13:01
LordVanwhich is counter-productive since I need delivery notes13:01
pokolis/my/me13:01
LordVanpokoli, well the thing is we are a producing company13:01
pokoliLordVan: could you explain your case?13:01
LordVanand have lots of individual orders with no prior price13:01
LordVanand also quite often customers call up in the middle of production and say they need more of article XY or less or whatever13:01
LordVanso until everything is shipped things can always change13:01
LordVanand the final price is nearly always calculated after the whole order is shipped13:01
LordVan(very few exceptions, where people are known to have real bad payment morale they have to pay on pickup for example)13:01
pokoliLordVan: you should have a look at the sale_amendment module: https://docs.tryton.org/projects/modules-sale-amendment/en/latest/13:01
LordVanso invoices will always be done manually13:01
pokoliLordVan: this allows you to have all the history of the sale (initial stte and all the ammendments)13:01
LordVandelviery notes probably too13:01
LordVanhm i hadn'T noticed that . thanks I will look13:01
LordVanbtw13:01
LordVanabout delivery notes13:01
LordVanI need delivery notes also for sale lines that are not linked to article/products13:01
LordVanis that possible to generate automatically?13:01
pokoliLordVan: about prices: https://discuss.tryton.org/t/setting-product-unit-price-from-production-cost/357413:01
pokoliWe implemeted this for a customer recently (indeed we need to test it)13:01
LordVanpokoli, haha fun fact ..13:01
LordVanwe make steel/stainless steel/aluminium/.. parts too13:01
pokoliLordVan: which kind of lines are you talking about?13:01
LordVanwell i add a sale_line for a customer position XY with name "bla" which i will add in description13:01
LordVan(i have a module which re-adds description in the list of positions)13:01
LordVansince a lot of our parts are one off orders and never come again creating articles for everythign is just not worth it13:01
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 ;)13:01
pokoliLordVan: if you want purchase and production planning to work you will need to create a product.13:01
LordVanpokoli, that is nearly impossible to do for us13:01
LordVanwe do a lot of small parts in small quantities, on short notice often and with materials we have in stock13:01
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/332313:01
LordVanbut managing all that in tryton is not feasible13:01
LordVanyes creating a generic product was my go-to workaround13:01
pokoliLordVan: stock moves require a product, so if you want them on delivery notes you should use a generic product13:01
pokoliLordVan: the report can be customized to print the text of the sale as the outgoing moves will be linked to the sale line13:01
LordVanyes the report is not the issue too much13:01
LordVanbut i would like the delivery note and invoice to be generated correctly ;)13:01
pokoliLordVan: what does correcly mean for you?13:01
LordVanbtw https://github.com/LordVan/tryton-modules/tree/master/sale_list_description <- is what I use for having decription back13:01
LordVanpokoli, well delivery notes containing the final amounts and also handle partial deliveries13:01
LordVanif i did use a generic product .. would it not list it ont he delivery note as just one ?14:01
LordVansince i would only change the description14:01
LordVan(i have not yet tested this just thought of it)14:01
pokoliLordVan: if you use a generic product but enter 3 lines (with same product) tryton will generate 3 lines on the delivery note14:01
LordVangood14:01
LordVanbut14:01
LordVanif i change my sale lines to be editable later states14:01
pokoliLordVan: main issue probably is sale_ammendment because it does not support to add new lines by default14:01
LordVanwould that update the delivery notes?14:01
LordVan(not sale_ammendment i mean)14:01
pokoliLordVan: but you can use the sale_shipment_grouping and sale_invoice_grouping to group all shipments, invoices of diferent sales14:01
LordVanI need those anyway14:01
pokoliLordVan: so you eneter a new sale for the customer once more products are ordered14:01
LordVanbut I really do not want to (and probably can't) just crete more sales every time14:01
LordVanthere are just too many changes by customers all the time (or even just mistakes in lists)14:01
LordVanWe would end up with 50% (probably) more sales / orders in the system than needed14:01
pokoliLordVan: what is the problem on having more sales if this allows the system generate the correct shipments/invoices?14:01
LordVanpokoli, management/employee acceptance mostly14:01
LordVan^^14:01
LordVanalso14:01
LordVanhow would I handle mistakes that cause amounts to be less than the initial order then..14:01
LordVanto be honest14:01
LordVanI really need to be able to just change things until it is done14:01
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 too14:01
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton14:01
LordVanthe thing is14:01
LordVanInvocies I need to create manually anyway when everything is ready (and has final prices)14:01
LordVanbut delivery notes that are updated when the sale lines change would be nice14:01
pokoliLordVan: mistakes should be handled using amemdnemts14:01
LordVan(not finished/printed ones of course but the remainder)14:01
LordVanpokoli, yes that is what I thought14:01
LordVanpokoli, also I do not have a problem with creating a new sale for actual new items ordered14:01
LordVanit is mostly when the customer changes amounts/descriptions/..14:01
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 improvement14:01
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 fine14:01
LordVanthat said14:01
pokoliLordVan: how do you calculate prices?14:01
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 up14:01
LordVanbut that is pretty much all manual (the workers won't enter their times,.. in tryton)14:01
LordVanmost of them are computer illiterate or close to that14:01
LordVanso things are filled out on paper14:01
LordVanwhich is fine (for the time being anyway)14:01
LordVanand that is also the reason i do not need (or rather can't) use the production module for now14:01
LordVan[we are a small company with < 20 employees .. we can't have someone enter that much data into tryton all day long]14:01
pokoliLordVan: production module is used to compute all your costs14:01
LordVanyes but that would be too hard to implement (right now at least)14:01
LordVanthat might be an option some years in the future14:01
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 template14:01
pokoliLordVan: as you do not want to use most of the system probably will be easier to just use the account_invoice and accounting moduels14:01
pokoliLordVan: because if you do not want to manage supply, nor production then it does not make so much sense to enter sale orders14:01
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 document14:01
LordVanI do want to manage offer document generation, project document generation [the stuff the workers fill out by hand later], delviery notes and invoices14:01
LordVanpokoli, yes i was going to use manual most likely14:01
LordVanbut14:01
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?14:01
pokoliLordVan: is there any time frame that you allow to update the orders? I.e: An order can only be updated upt to 30 days14:01
LordVanpokoli, not really some projects are rather long running while most are short14:01
pokoliLordVan: yes, you chosed to manage everything manually :)14:01
LordVanpokoli, so there is no way to at least copy sale lines to delivery note ?14:01
LordVan[i imagine writing a Wizard for that should be fairly easy]14:01
pokoliLordVan: Why you need delivery notes? To inform customer what has actually been shipped? Or whatelse?14:01
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 not14:01
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 sent14:01
LordVanbasically more a shipping list / confirmation of receipt in case of pickup14:01
LordVanor if we deliver it to the customer then they also sign off on it14:01
pokoliLordVan: how do you know which quantities the user has to pick? Everything that is already produced?14:01
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)14:01
LordVanso usually14:01
LordVanwe would try to send/deliver y complete order14:01
LordVanbut quite often it is only a part of it - most of the time what is done already by then14:01
LordVanso i need to manually be able to adjust the quantities per line of course14:01
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 anyway14:01
pokoliLordVan: in order to know what has been already produced on tryton you will need a production order14:01
LordVanthat would be entered manually14:01
pokoliLordVan: Then you can have a wizard to generate the shipment based on what has been produced14:01
LordVanright before printing14:01
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 print14:01
LordVanthen at a later point (if it is not completed) run te wizard again for the remainder of products14:01
LordVandoes that sound .. (easily)d oable to you?14:01
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)14:01
pokoliLordVan: main problem with this wizard it that you will need to properly link shipments with sales, so know what has been delivered or not14:01
LordVanpokoli, yes that is what I think too .. I have not looked at the code yet .. ist hat difficult to link correctly?14:01
pokoliLordVan: this means that you need a one (or more in case of partial shipment) delivery note line for each sale line14:01
LordVanyes potentially14:01
LordVansome could be 0 for a specific delivery not of course14:01
pokoliLordVan: You just have to set the origin of the delivery move to a sale line14:01
LordVanhm14:01
LordVannot sure what you mean .. gotta look at the code..14:01
LordVanI was just going to make the wizard so that it looks at the sale lines and the existing delivery notes lines14:01
LordVancompares and creates one with the difference14:01
LordVansince i do not need stock movements or anything14:01
LordVanas we rarely have any finsihed products in stock14:01
LordVan(with a few small exceptions)14:01
pokoliLordVan: delivery note lines are stock moves :)14:01
LordVanok14:01
LordVaneven if there is nothing i stock (in tryton) to move ^^14:01
LordVanfair14:01
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 now14:01
pokoliLordVan: but you can configure Tryton to avoid the picking process.14:01
LordVanACTION has no clue about picking process,.. in tryton (yet)14:01
pokoliLordVan: indeed you don't need to care as you are not using the stock. So just configure tryton to ignore it14:01
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)14:01
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)14:01
pokoliLordVan: and then process the sale once it's fully delivered, so nothing else can be changed14:01
LordVanpokoli, but (in latest tryton) .. if i click confirm it will go to state processing automatically not confirmed14:01
LordVanso i cannot go back14:01
LordVani don'T want to leave them in the Offer state either though14:01
pokoliLordVan: automatically processing can be avoided ;)14:01
LordVanah wait14:01
LordVani forgot to set to manual14:01
pokoliLordVan: if you set boht manual for invoice and delivery methods the sale will go from confirmed to finished directly14:01
LordVanyes i jsut noticed14:01
LordVannot .. desireable14:01
LordVanhaha14:01
LordVanbut how do i avoid that?14:01
pokoliLordVan: we've done some times by setting a context flag on confirm button and skipping the task queue when the flag is set15:01
LordVanah so doing it without changing that is not possible with just settings then?15:01
LordVanso the only way for me to do this right now would be to stay in the quotation state15:01
LordVan(that would surely not confuse everyone at all .. haha)15:01
LordVanpreferrably i'd like it to be in processing and be able to edit it15:01
LordVanbut to generate delivery notes and sales manually (on button press with wizard)15:01
LordVanor confirmed15:01
LordVani don't mind that15:01
LordVanbut from a usuability point of view it can'T be in quotation or finished state when it is actually being produced right now15:01
LordVanso .. would it be difficult to stop tryton from "automagically" clicking the processing/finished button for me after i confirm?15:01
LordVanin fact i shall go read the code now15:01
LordVan(while i reset my db and re-run the import)15:01
LordVanhmm15:01
LordVanI think best would be if i could just stay at "confirmed" until i process / finish manually15:01
LordVani just noticed this in sale.py: cls._states_cached = ['confirmed', 'processing', 'done', 'cancelled']15:01
LordVanso there is more to consider if i made things read-write again in confrimed/..15:01
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  ..15:01
LordVan(with both delivery notes and invoices manually)15:01
LordVanpokoli, i assume i would need to do something like you mentioned bout skipping some task queue15:01
LordVansale.py:942   cls.__queue__.process(sales)15:01
LordVanir probably the culprit15:01
LordVanmethinks15:01
LordVanbut .. where is defined what the queue has to do ..15:01
LordVan(line 949 actually but whatver)15:01
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)15:01
pokoliLordVan: there is a setting to delay the processing but not possible to delay it indefinently. Also you need to setup workers15:01
LordVanworkers?15:01
pokoliLordVan: yes, that line is the culprit.15:01
pokoliLordVan: or a single worker15:01
pokoliLordVan: to process sales and purchases in background15:01
LordVanbut i don'T need it to process anything  at this point15:01
LordVan?15:01
pokoliLordVan: this is really usefull for doing computations on background without forcing the user to wait them15:01
LordVani just want to change the state to confirmed15:01
LordVanso it is listed as such adn not quotation15:01
LordVanand that way i can go back to draft too, change stuff and bck to confirmed15:01
LordVanand when all is done to done15:01
pokoliLordVan: when some products are delivered do you require to update the sale? Or not?15:01
LordVanpokoli, what do you mean update the sale? i just want the delivery notes to be linked to the sale15:01
pokoliLordVan: update sale products to add new lines or modify quantities15:01
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)15:01
LordVanbut the order was still fro 1015:01
LordVanfor15:01
LordVanbut15:01
LordVanthen again15:01
LordVani do not think that would matter fo rme15:01
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 /less15:01
LordVanso there is a record of it but it shouldn'T interfere (nor be on any usual reports)15:01
LordVanpokoli, should that not "skip" the queue and go from quotation to confirmed ?15:01
LordVanhttps://dpaste.org/Pm2415:01
LordVan(there is probably some obvious and stupid mistake I am not seeing)15:01
pokoliLordVan: yes, this will skip any code on the confirm transition15:01
LordVanbut15:01
pokoli(which is not probably a good idea)15:01
LordVanit still goes to finished15:01
LordVanpokoli, i was mostly testing15:01
pokoliLordVan: maybe you did not added the Sale class in the register function of the __init__.py file of your module15:01
LordVani did15:01
LordVanbut let me re-check and make sure the module is upgraded15:01
LordVanah15:01
LordVani got an error15:01
LordVandue to missing imports like for the@ModelView .,15:01
LordVanah now that works15:01
LordVanpokoli, is there any way i can easily see what the confirm transition usually does? so i know if i  really can skip this?15:01
LordVansince at first glance15:01
pokoliLordVan: looking at the code of the sale module15:01
LordVanthings seem to work15:01
LordVanpokoli, yes but it only says someting about __queue__15:01
LordVanwhich i couldnt't figure out tbh15:01
LordVanah wait15:01
pokoliLordVan: it does something more:15:01
pokolihttps://hg.tryton.org/modules/sale/file/4c7b8b0d9060/sale.py#l93015:01
LordVanthe .process () module15:01
pokoliLordVan: process is the one that craetes shipments and invoices and updates the shipment_state and invoice_state15:01
LordVanyes16:01
pokoliLordVan: when you see __queue__ it means that it is called in background using the workers16:01
LordVanconfirm only sets the sale date, does soemthing with  cache then starts that queue16:01
LordVanah16:01
LordVanso it calls process straight after16:01
LordVanbut16:01
LordVanif all i do is "skip" confirm16:01
LordVanthen click process later16:01
LordVan(which i do)16:01
LordVanthen I should be good?16:01
pokoliLordVan: but depending on the modules it can do more: https://hg.tryton.org/modules/sale_stock_quantity/file/879b7e44b276/sale.py#l2916:01
LordVanof course other modules could overwrite this16:01
LordVanI am very unlikely to use that one though16:01
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)16:01
LordVanIf i did have anything else taht overwrites confirm(..) .. in what order would the various modules be checked?16:01
pokoliLordVan: in the order of dependencies16:01
LordVanbut what if my module depends on sale and that one too?16:01
LordVanI mean yes i can then change mine to depend on that other module but if i "forget" ?16:01
pokoliLordVan: we normally have a module with all customization that have all the dependencies listed16:01
pokoliLordVan: so this module is always executed last16:01
LordVanthat is actually a great idea ^^16:01
LordVanand makes a lot of sense and avoids me having to sort all the modules manually16:01
pokoliLordVan: normally it's easier to maintain if you have a module with all the customizations16:01
LordVanyeah i think i will merge my sale_line_description module into that one too actually16:01
pokoliLordVan: probably it's worth a talk on an unconference (or a webinar on covid times) to explain how to maintan all customizations16:01
LordVansince it is super small16:01
LordVanpokoli, i'd be (vritually) present16:01
LordVanI was wondering anyway .. if in these times it has been considered to do a conference online16:01
pokoliLordVan: I'm not fan of small modules. I prefer customziation modules16:01
LordVani understand .. it was basically the very first module i wrote for tryton16:01
LordVanand it could be considered to be fairly generic16:01
pokoliLordVan: normally customziation modules evolve to become big16:01
LordVanI think others could find a use for that too (all it does is add a column anyway)16:01
LordVanbut16:01
pokoliLordVan: and also can be used to easly create a testing environment as you only need to install the module and all of its dependencies16:01
LordVanpokoli, yepp though for testing i just drop and re-create the DB with soem basic settings at the moment16:01
LordVanthat is even quicker16:01
LordVanre-create being restore backup/pg_dump16:01
LordVanbut .. that is great .. just this - a few lines long - module that overwrites confirm solves my issue about editing without doing anything particularily complicated16:01
pokoliLordVan: then you are only missing the wizard16:01
LordVanyes16:01
pokoliwhich should be part of the same customization module :)16:01
LordVanof course16:01
LordVanwell and my extra fields16:01
LordVanbut16:01
LordVanthose i do not need for monday16:01
LordVan^^16:01
pokoliLordVan: this wizard should create the outgoing move, and set the related sale_line on the origin field of the stock move16:01
LordVanyes i will have to look into that16:01
LordVanthe good thing16:01
pokoliLordVan: then the sale process method will correctly compute the shipped quantities16:01
LordVanI do not need the wizard right now either i have a bit of time for that16:01
LordVanwhat I did need was to stop at "confirmed" to be able to go back and adjust stuff16:01
pokoliLordVan: so you can even use the "on_shipment" invoice method16:01
LordVanand create reports16:01
LordVanpokoli, nice16:01
LordVanI gotta look into how to make the templates for reports .. been ages since i read up on that16:01
pokoliLordVan: you should look at https://docs.tryton.org/projects/server/en/latest/topics/reports/index.html?highlight=reports16:01
pokoliLordVan: and also the relatorio examples: https://relatorio.readthedocs.io/en/latest/quickexample.html16:01
LordVanthank you!16:01
LordVanbtw16:01
LordVansomething that is a bit of an annoyance16:01
LordVanwhen i add a sale line without product16:01
LordVanand enter an amount, a price then change the unit16:01
LordVanit always clears the amount (but not the total amount)16:01
LordVanis there any way to fix this easily -- or at least set a default unit (and tax) for sale line without product?16:01
-!- rpit(~rpit@p200300c88f4cbb00cea2955fb3b32f1a.dip0.t-ipconnect.de) has joined #tryton16:01
pokoliLordVan: changing the unit triggers the recomputed based on the product16:01
pokoliLordVan: but as you do not have product it is emptied16:01
pokoliLordVan: probably a missing feature16:01
pokoliLordVan: the same happens if you set a product, change the unit price and then update the unit. The product unit price will be set16:01
LordVanso16:01
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?16:01
pokoliLordVan: then the price will be set to zero each time you update the quantity or the unit16:01
LordVanok that is also annoying16:01
LordVanprobably better to leave as-is then16:01
LordVanbecause that generates an error16:01
LordVanthough16:01
LordVan99% of the time when the sale line is first entered there will be no price so16:01
LordVanthat really only matters when the invoice is created16:01
LordVanhm16:01
LordVanpokoli, or i overwrite the recomputation method to leave the price field alone if there is no product16:01
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton16:01
pokoliLordVan: probably the best is to set 0 as unit price for sales16:01
LordVanthough .. https://hg.tryton.org/modules/sale/file/4c7b8b0d9060/sale.py#l130816:01
LordVanso it should return if there is no product associated16:01
LordVanweird16:01
LordVanbecause on_change_unit calls on_change_quantity() which calls compute_unit_price16:01
LordVanwhich should do nothing if there is no product assigned16:01
LordVanunless i am missing something16:01
LordVanpokoli, but I will just make a product "Standard" with the usual tax rate, unit set to pieces and price 016:01
LordVanthat seems to be the most useful solution that does nto require a lot of effort/development16:01
LordVannow the only thing is16:01
LordVancan i set it up so that when adding a new line that one article is selected by default?16:01
LordVanI guess .. i could overwrite setup .. and select a product if none is selected yet16:01
LordVanah16:01
LordVani just noticed something while playing around with proteus16:01
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)16:01
LordVanbut16:01
LordVanif i create a sale16:01
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 ?16:01
LordVanalso i guess it won't let me just create a sale with state 'done' ?16:01
LordVanok i figured out how to do that with .click()16:01
LordVanbut16:01
LordVanif i want to import historical sale data16:01
LordVani need the numbers to be from the previous years16:01
LordVancan I even do that using proteus?16:01
pokoliLordVan: maybe we can update on_change_quantity to not update unit_price when it returns None16:01
LordVanpokoli, yes that would be an option16:01
pokoliLordVan: but we should keep the current behaviour for on_change product16:01
LordVanbut I would need to change on_change_unit to not do anything to the other fields16:01
pokoliLordVan: sound like an easy patch for a first time contributor :)16:01
LordVanpokoli, you know what my biggest hurdle is to contribute to the official code base?16:01
LordVanmercurial ^^16:01
LordVan(never really used it)16:01
pokoliLordVan: well, it's very similar to git16:01
LordVanyeah i still need to read some docs first16:01
LordVanand i am sitll a git n00b16:01
LordVani am old school CVS , SVN16:01
LordVanthough I am using git for stuff now16:01
pokoliLordVan: but as far as you create the issue and upload a patch I may take care of uploading the codereview16:01
LordVanand like it16:01
pokoliLordVan: but you should lear about mercurial17:01
LordVani should17:01
pokoliLordVan: mercurial is the natural evolution of SVN. So if you are familiar with svn it won't be to hard17:01
LordVannice17:01
pokoliLordVan: at least it will be great to create the feature request on the bug tracker17: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() ?17:01
LordVani shall do that on the bug tracker tomorrow (i reported stuff before but been a while)17:01
pokoliLordVan: about the sales import there should be some issue on your code because I imported some historicall data using proteus17:01
LordVanwell all i did was Sale() .. sale.number= 'old number', sale.party = myparty ; sale.save() ; sale.click('draft'), quote, confirm17:01
LordVanbut as soon as I do sale.click('draft') it overwrites the number with the next sequence17:01
pokoliLordVan: Oh, I did not this way. I just created the sale in the done state17:01
LordVanah you can do that? cool17:01
pokoliLordVan: now that I remember I was using proteus but not directly. Just calling the API from proteus17:01
LordVanthat would be all i need17:01
LordVansince i don't need sale lines or anything17:01
pokoliLordVan: you can use trytond-console to call a script directly from the server17:01
pokoliLordVan: in your case will be easier17:01
-!- rpit(~rpit@p200300c88f4cbb00cea2955fb3b32f1a.dip0.t-ipconnect.de) has left #tryton17:01
LordVanwell17:01
LordVanhow is it easier?17:01
LordVanand where are the differences?17:01
pokoliLordVan: proteus mimics the clients so it call on_changes and so one17:01
pokoliLordVan: trytond-console is pure server side so you just have to use the API and set a value for all fields17:01
LordVanok17:01
LordVanthat is what i thought17:01
LordVanbut can i also do that in proteus or will it not let me create done state sale?17:01
LordVanok i tested17:01
LordVanproteus won'T let me do that17:01
LordVanso i guess i need trytond-console17:01
pokoliLordVan: the problem is that proteus understand that the number and the state are readonly17:01
pokoliLordVan: so won't allow you to modify them17:01
LordVanyeah17:01
LordVanpokoli, are there any issues with creating historical entries without any sale lines,.. ?17:01
LordVan(that you know of)17:01
pokoliLordVan: no, as far as the sale does not have any line it does not trigger any other workflow17:01
LordVangood17:01
LordVanpokoli, did you add historical invoice (numbers) too ?17:01
pokoliLordVan: yes, we migrated all the numbers party, data and the lines information17:01
pokoliLordVan: also linked invoices17:01
pokoliLordVan: not an easy task and not something that I would recommend17:01
pokoliLordVan: but the customer wanted it and paid the price. So we just did it.17:01
LordVanwell i want the sale numbers18:01
LordVanthe invoice numbers are currently not in dolibarr18:01
LordVanso would have to be manually copied to a csv to import or so18:01
LordVannow i am not talking invoice lines18:01
LordVanjust the numbers18:01
LordVanbut i recon that is probably difficult18:01
pokoliLordVan: why you need *just* the numbers?18:01
pokoliLordVan: you can always keep dolibarr in a readonly mode to search for historicall data18:01
LordVandolibarr has no invoice numbes18:01
LordVanthey are in spreadsheet documents18:01
pokoliLordVan: i'm asking about sale numbers18:01
pokoliLordVan: you need to start thinking in unify everything on Tryton18:01
LordVanso far18:01
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)18:01
LordVani am going to try to unify as much as possible18:01
LordVanbut it will take time18:01
LordVanfor now i want to replace dolibarr with tryton and then slowly add more and more18:01
LordVanalso will help with user acceptance over tiem18:01
-!- thaneor(~ldlc6@r167-61-78-190.dialup.adsl.anteldata.net.uy) has joined #tryton18:01
pokoliLordVan: i'm leaving for today. Will read you once back online!18:01
LordVansure i am going to have dinner soon too anyway18:01
-!- lucascastro(~lucascast@177.125.20.159) has joined #tryton19:01
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton20:01
LordVanhmm .. I don't get it20:01
LordVanhow can I search for a specific party / company/ sale with trytond-console ?20:01
LordVanthere is no find() like wiht proteus?20:01
LordVanah never mind20:01
LordVan.search there20:01

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