chat.freenode.net #tryton log beginning Fri Jan 8 12:00:01 AM CET 2021 | ||
-!- JanGB(~jan@ip5f5ab055.dynamic.kabel-deutschland.de) has joined #tryton | 23:57 | |
-!- lucascastro(~lucascast@177-185-139-189.dynamic.isotelco.net.br) has joined #tryton | 01:58 | |
-!- csotelo(~csotelo@132.157.66.201) has joined #tryton | 02:46 | |
-!- thaneor1(~ldlc6@r167-61-70-123.dialup.adsl.anteldata.net.uy) has joined #tryton | 05:14 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 06:03 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 06:35 | |
-!- LordVan(~lordvan@gentoo/developer/LordVan) has joined #tryton | 06:58 | |
-!- Timitos(~kpreisler@2001:a61:578:ee01:762b:62ff:fe84:ed7e) has joined #tryton | 07:18 | |
LordVan | Hi. | 07:24 |
---|---|---|
LordVan | Just 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 |
LordVan | or 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 #tryton | 07:37 | |
LordVan | hmm 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 |
LordVan | will look into that now | 08:00 |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 08:01 | |
pokoli | LordVan: you *should* do it on a module | 08:18 |
pokoli | LordVan: otherwise customizations will be lost when updating to newer versions of the original module | 08:18 |
-!- JanGB(~jan@ip5f5ab07c.dynamic.kabel-deutschland.de) has joined #tryton | 09:53 | |
-!- mariomop(~quassel@190.188.44.80) has joined #tryton | 10:57 | |
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton | 11:15 | |
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton | 11:48 | |
LordVan | pokoli, i know that i am jus tnot sure how to yet ;) | 12:32 |
LordVan | pokoli, 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 first | 12:35 |
LordVan | since i am not changing requirements just making something editable later on | 12:35 |
pokoli | LordVan: for editing states you just have to update the states attribute of the field in the __setup__ of the model | 12:37 |
LordVan | pokoli, yeah I was going to just try that so like on that link i'd just override setup | 12:43 |
LordVan | btw | 12:43 |
LordVan | sale state .. I want it editable in at least draft/confirmed/quotation/processing | 12:44 |
LordVan | is 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 |
LordVan | not sure if I am missing a state? | 12:44 |
pokoli | LordVan: which fields did you want to edit on processing? | 12:45 |
LordVan | just about everything on SaleLine i can edit in draft state and some on Sale | 12:45 |
pokoli | LordVan: you can do readonly: ~Eval('state').in(['paid', 'cancelled']) | 12:45 |
LordVan | yes i was just wondering is it better to do inclusive or exclusive? | 12:46 |
LordVan | like if there was a new state added later i mean | 12:46 |
pokoli | LordVan: 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 sync | 12:46 |
LordVan | pokoli, not in our case | 12:46 |
LordVan | alternatively I will leave it in "draft" state until the order is done and shipped | 12:46 |
pokoli | LordVan: your case sounds very strange to my | 12:46 |
LordVan | which is counter-productive since I need delivery notes | 12:47 |
pokoli | s/my/me | 12:47 |
LordVan | pokoli, well the thing is we are a producing company | 12:47 |
pokoli | LordVan: could you explain your case? | 12:47 |
LordVan | and have lots of individual orders with no prior price | 12:47 |
LordVan | and also quite often customers call up in the middle of production and say they need more of article XY or less or whatever | 12:47 |
LordVan | so until everything is shipped things can always change | 12:48 |
LordVan | and the final price is nearly always calculated after the whole order is shipped | 12: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 |
pokoli | LordVan: you should have a look at the sale_amendment module: https://docs.tryton.org/projects/modules-sale-amendment/en/latest/ | 12:48 |
LordVan | so invoices will always be done manually | 12:48 |
pokoli | LordVan: this allows you to have all the history of the sale (initial stte and all the ammendments) | 12:49 |
LordVan | delviery notes probably too | 12:49 |
LordVan | hm i hadn'T noticed that . thanks I will look | 12:49 |
LordVan | btw | 12:49 |
LordVan | about delivery notes | 12:49 |
LordVan | I need delivery notes also for sale lines that are not linked to article/products | 12:49 |
LordVan | is that possible to generate automatically? | 12:49 |
pokoli | LordVan: about prices: https://discuss.tryton.org/t/setting-product-unit-price-from-production-cost/3574 | 12:49 |
pokoli | We implemeted this for a customer recently (indeed we need to test it) | 12:50 |
LordVan | pokoli, haha fun fact .. | 12:50 |
LordVan | we make steel/stainless steel/aluminium/.. parts too | 12:51 |
pokoli | LordVan: which kind of lines are you talking about? | 12:51 |
LordVan | well i add a sale_line for a customer position XY with name "bla" which i will add in description | 12:51 |
LordVan | (i have a module which re-adds description in the list of positions) | 12:51 |
LordVan | since a lot of our parts are one off orders and never come again creating articles for everythign is just not worth it | 12:52 |
LordVan | and 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 |
pokoli | LordVan: if you want purchase and production planning to work you will need to create a product. | 12:56 |
LordVan | pokoli, that is nearly impossible to do for us | 12:56 |
LordVan | we do a lot of small parts in small quantities, on short notice often and with materials we have in stock | 12:57 |
pokoli | LordVan: 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/3323 | 12:57 |
LordVan | but managing all that in tryton is not feasible | 12:57 |
LordVan | yes creating a generic product was my go-to workaround | 12:57 |
pokoli | LordVan: stock moves require a product, so if you want them on delivery notes you should use a generic product | 12:58 |
pokoli | LordVan: the report can be customized to print the text of the sale as the outgoing moves will be linked to the sale line | 12:58 |
LordVan | yes the report is not the issue too much | 12:58 |
LordVan | but i would like the delivery note and invoice to be generated correctly ;) | 12:59 |
pokoli | LordVan: what does correcly mean for you? | 12:59 |
LordVan | btw https://github.com/LordVan/tryton-modules/tree/master/sale_list_description <- is what I use for having decription back | 12:59 |
LordVan | pokoli, well delivery notes containing the final amounts and also handle partial deliveries | 12:59 |
LordVan | if i did use a generic product .. would it not list it ont he delivery note as just one ? | 13:00 |
LordVan | since i would only change the description | 13:00 |
LordVan | (i have not yet tested this just thought of it) | 13:00 |
pokoli | LordVan: if you use a generic product but enter 3 lines (with same product) tryton will generate 3 lines on the delivery note | 13:00 |
LordVan | good | 13:01 |
LordVan | but | 13:01 |
LordVan | if i change my sale lines to be editable later states | 13:01 |
pokoli | LordVan: main issue probably is sale_ammendment because it does not support to add new lines by default | 13:01 |
LordVan | would that update the delivery notes? | 13:01 |
LordVan | (not sale_ammendment i mean) | 13:01 |
pokoli | LordVan: but you can use the sale_shipment_grouping and sale_invoice_grouping to group all shipments, invoices of diferent sales | 13:02 |
LordVan | I need those anyway | 13:02 |
pokoli | LordVan: so you eneter a new sale for the customer once more products are ordered | 13:02 |
LordVan | but I really do not want to (and probably can't) just crete more sales every time | 13:02 |
LordVan | there are just too many changes by customers all the time (or even just mistakes in lists) | 13:02 |
LordVan | We would end up with 50% (probably) more sales / orders in the system than needed | 13:03 |
pokoli | LordVan: what is the problem on having more sales if this allows the system generate the correct shipments/invoices? | 13:04 |
LordVan | pokoli, management/employee acceptance mostly | 13:04 |
LordVan | ^^ | 13:04 |
LordVan | also | 13:04 |
LordVan | how would I handle mistakes that cause amounts to be less than the initial order then.. | 13:04 |
LordVan | to be honest | 13:05 |
LordVan | I really need to be able to just change things until it is done | 13:05 |
LordVan | or 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 too | 13:06 |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 13:06 | |
LordVan | the thing is | 13:06 |
LordVan | Invocies I need to create manually anyway when everything is ready (and has final prices) | 13:07 |
LordVan | but delivery notes that are updated when the sale lines change would be nice | 13:07 |
pokoli | LordVan: mistakes should be handled using amemdnemts | 13:07 |
LordVan | (not finished/printed ones of course but the remainder) | 13:07 |
LordVan | pokoli, yes that is what I thought | 13:08 |
LordVan | pokoli, also I do not have a problem with creating a new sale for actual new items ordered | 13:08 |
LordVan | it is mostly when the customer changes amounts/descriptions/.. | 13:08 |
pokoli | LordVan: 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 improvement | 13:08 |
LordVan | pokoli, 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 fine | 13:09 |
LordVan | that said | 13:10 |
pokoli | LordVan: how do you calculate prices? | 13:10 |
LordVan | by getting the project documents that had been printed out on order , adding up hours, taking the material used and other cost and sum it up | 13:10 |
LordVan | but that is pretty much all manual (the workers won't enter their times,.. in tryton) | 13:10 |
LordVan | most of them are computer illiterate or close to that | 13:11 |
LordVan | so things are filled out on paper | 13:11 |
LordVan | which is fine (for the time being anyway) | 13:11 |
LordVan | and that is also the reason i do not need (or rather can't) use the production module for now | 13: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 |
pokoli | LordVan: production module is used to compute all your costs | 13:12 |
LordVan | yes but that would be too hard to implement (right now at least) | 13:12 |
LordVan | that might be an option some years in the future | 13:12 |
LordVan | right 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 template | 13:13 |
pokoli | LordVan: as you do not want to use most of the system probably will be easier to just use the account_invoice and accounting moduels | 13:13 |
pokoli | LordVan: because if you do not want to manage supply, nor production then it does not make so much sense to enter sale orders | 13:14 |
pokoli | LordVan: 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 document | 13:14 |
LordVan | I do want to manage offer document generation, project document generation [the stuff the workers fill out by hand later], delviery notes and invoices | 13:14 |
LordVan | pokoli, yes i was going to use manual most likely | 13:15 |
LordVan | but | 13:15 |
LordVan | correct 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 |
pokoli | LordVan: is there any time frame that you allow to update the orders? I.e: An order can only be updated upt to 30 days | 13:15 |
LordVan | pokoli, not really some projects are rather long running while most are short | 13:16 |
pokoli | LordVan: yes, you chosed to manage everything manually :) | 13:16 |
LordVan | pokoli, 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 |
pokoli | LordVan: Why you need delivery notes? To inform customer what has actually been shipped? Or whatelse? | 13:17 |
LordVan | later 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 not | 13:17 |
LordVan | pokoli, to have them sign it if they pick it up that they have it or to put it in the parcel if it is sent | 13:17 |
LordVan | basically more a shipping list / confirmation of receipt in case of pickup | 13:17 |
LordVan | or if we deliver it to the customer then they also sign off on it | 13:17 |
pokoli | LordVan: how do you know which quantities the user has to pick? Everything that is already produced? | 13:27 |
LordVan | well 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 |
LordVan | so usually | 13:29 |
LordVan | we would try to send/deliver y complete order | 13:29 |
LordVan | but quite often it is only a part of it - most of the time what is done already by then | 13:29 |
LordVan | so i need to manually be able to adjust the quantities per line of course | 13:30 |
LordVan | preferrably 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 anyway | 13:30 |
pokoli | LordVan: in order to know what has been already produced on tryton you will need a production order | 13:39 |
LordVan | that would be entered manually | 13:39 |
pokoli | LordVan: Then you can have a wizard to generate the shipment based on what has been produced | 13:39 |
LordVan | right before printing | 13:39 |
LordVan | basically 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 print | 13:40 |
LordVan | then at a later point (if it is not completed) run te wizard again for the remainder of products | 13:40 |
LordVan | does 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 |
pokoli | LordVan: main problem with this wizard it that you will need to properly link shipments with sales, so know what has been delivered or not | 13:47 |
LordVan | pokoli, yes that is what I think too .. I have not looked at the code yet .. ist hat difficult to link correctly? | 13:47 |
pokoli | LordVan: this means that you need a one (or more in case of partial shipment) delivery note line for each sale line | 13:48 |
LordVan | yes potentially | 13:48 |
LordVan | some could be 0 for a specific delivery not of course | 13:48 |
pokoli | LordVan: You just have to set the origin of the delivery move to a sale line | 13:48 |
LordVan | hm | 13:49 |
LordVan | not sure what you mean .. gotta look at the code.. | 13:49 |
LordVan | I was just going to make the wizard so that it looks at the sale lines and the existing delivery notes lines | 13:49 |
LordVan | compares and creates one with the difference | 13:49 |
LordVan | since i do not need stock movements or anything | 13:49 |
LordVan | as we rarely have any finsihed products in stock | 13:50 |
LordVan | (with a few small exceptions) | 13:50 |
pokoli | LordVan: delivery note lines are stock moves :) | 13:50 |
LordVan | ok | 13:50 |
LordVan | even if there is nothing i stock (in tryton) to move ^^ | 13:50 |
LordVan | fair | 13:50 |
LordVan | but 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 now | 13:51 |
pokoli | LordVan: but you can configure Tryton to avoid the picking process. | 13:51 |
LordVan | ACTION has no clue about picking process,.. in tryton (yet) | 13:52 |
pokoli | LordVan: indeed you don't need to care as you are not using the stock. So just configure tryton to ignore it | 13:53 |
LordVan | but 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 |
pokoli | LordVan: 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 |
pokoli | LordVan: and then process the sale once it's fully delivered, so nothing else can be changed | 13:55 |
LordVan | pokoli, but (in latest tryton) .. if i click confirm it will go to state processing automatically not confirmed | 13:55 |
LordVan | so i cannot go back | 13:55 |
LordVan | i don'T want to leave them in the Offer state either though | 13:56 |
pokoli | LordVan: automatically processing can be avoided ;) | 13:57 |
LordVan | ah wait | 13:57 |
LordVan | i forgot to set to manual | 13:57 |
pokoli | LordVan: if you set boht manual for invoice and delivery methods the sale will go from confirmed to finished directly | 13:58 |
LordVan | yes i jsut noticed | 13:58 |
LordVan | not .. desireable | 13:58 |
LordVan | haha | 13:58 |
LordVan | but how do i avoid that? | 13:59 |
pokoli | LordVan: we've done some times by setting a context flag on confirm button and skipping the task queue when the flag is set | 14:00 |
LordVan | ah so doing it without changing that is not possible with just settings then? | 14:01 |
LordVan | so the only way for me to do this right now would be to stay in the quotation state | 14:02 |
LordVan | (that would surely not confuse everyone at all .. haha) | 14:02 |
LordVan | preferrably i'd like it to be in processing and be able to edit it | 14:03 |
LordVan | but to generate delivery notes and sales manually (on button press with wizard) | 14:03 |
LordVan | or confirmed | 14:04 |
LordVan | i don't mind that | 14:04 |
LordVan | but from a usuability point of view it can'T be in quotation or finished state when it is actually being produced right now | 14:04 |
LordVan | so .. would it be difficult to stop tryton from "automagically" clicking the processing/finished button for me after i confirm? | 14:08 |
LordVan | in fact i shall go read the code now | 14:08 |
LordVan | (while i reset my db and re-run the import) | 14:09 |
LordVan | hmm | 14:14 |
LordVan | I think best would be if i could just stay at "confirmed" until i process / finish manually | 14:14 |
LordVan | i just noticed this in sale.py: cls._states_cached = ['confirmed', 'processing', 'done', 'cancelled'] | 14:14 |
LordVan | so there is more to consider if i made things read-write again in confrimed/.. | 14:15 |
LordVan | hmm 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 |
LordVan | pokoli, i assume i would need to do something like you mentioned bout skipping some task queue | 14:23 |
LordVan | sale.py:942 cls.__queue__.process(sales) | 14:23 |
LordVan | ir probably the culprit | 14:23 |
LordVan | methinks | 14:24 |
LordVan | but .. where is defined what the queue has to do .. | 14:25 |
LordVan | (line 949 actually but whatver) | 14:27 |
LordVan | so 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 |
pokoli | LordVan: there is a setting to delay the processing but not possible to delay it indefinently. Also you need to setup workers | 14:36 |
LordVan | workers? | 14:38 |
pokoli | LordVan: yes, that line is the culprit. | 14:38 |
pokoli | LordVan: or a single worker | 14:38 |
pokoli | LordVan: to process sales and purchases in background | 14:38 |
LordVan | but i don'T need it to process anything at this point | 14:38 |
LordVan | ? | 14:38 |
pokoli | LordVan: this is really usefull for doing computations on background without forcing the user to wait them | 14:38 |
LordVan | i just want to change the state to confirmed | 14:39 |
LordVan | so it is listed as such adn not quotation | 14:39 |
LordVan | and that way i can go back to draft too, change stuff and bck to confirmed | 14:39 |
LordVan | and when all is done to done | 14:39 |
pokoli | LordVan: when some products are delivered do you require to update the sale? Or not? | 14:44 |
LordVan | pokoli, what do you mean update the sale? i just want the delivery notes to be linked to the sale | 14:44 |
pokoli | LordVan: update sale products to add new lines or modify quantities | 14:45 |
LordVan | ah 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 |
LordVan | but the order was still fro 10 | 14:47 |
LordVan | for | 14:47 |
LordVan | but | 14:47 |
LordVan | then again | 14:47 |
LordVan | i do not think that would matter fo rme | 14:47 |
LordVan | in 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 /less | 14:48 |
LordVan | so there is a record of it but it shouldn'T interfere (nor be on any usual reports) | 14:48 |
LordVan | pokoli, should that not "skip" the queue and go from quotation to confirmed ? | 14:50 |
LordVan | https://dpaste.org/Pm24 | 14:50 |
LordVan | (there is probably some obvious and stupid mistake I am not seeing) | 14:50 |
pokoli | LordVan: yes, this will skip any code on the confirm transition | 14:52 |
LordVan | but | 14:52 |
pokoli | (which is not probably a good idea) | 14:52 |
LordVan | it still goes to finished | 14:52 |
LordVan | pokoli, i was mostly testing | 14:52 |
pokoli | LordVan: maybe you did not added the Sale class in the register function of the __init__.py file of your module | 14:52 |
LordVan | i did | 14:52 |
LordVan | but let me re-check and make sure the module is upgraded | 14:53 |
LordVan | ah | 14:54 |
LordVan | i got an error | 14:54 |
LordVan | due to missing imports like for the@ModelView ., | 14:54 |
LordVan | ah now that works | 14:57 |
LordVan | pokoli, 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 |
LordVan | since at first glance | 14:58 |
pokoli | LordVan: looking at the code of the sale module | 14:58 |
LordVan | things seem to work | 14:58 |
LordVan | pokoli, yes but it only says someting about __queue__ | 14:58 |
LordVan | which i couldnt't figure out tbh | 14:58 |
LordVan | ah wait | 14:59 |
pokoli | LordVan: it does something more: | 14:59 |
pokoli | https://hg.tryton.org/modules/sale/file/4c7b8b0d9060/sale.py#l930 | 14:59 |
LordVan | the .process () module | 14:59 |
pokoli | LordVan: process is the one that craetes shipments and invoices and updates the shipment_state and invoice_state | 14:59 |
LordVan | yes | 15:00 |
pokoli | LordVan: when you see __queue__ it means that it is called in background using the workers | 15:00 |
LordVan | confirm only sets the sale date, does soemthing with cache then starts that queue | 15:00 |
LordVan | ah | 15:00 |
LordVan | so it calls process straight after | 15:00 |
LordVan | but | 15:00 |
LordVan | if all i do is "skip" confirm | 15:01 |
LordVan | then click process later | 15:01 |
LordVan | (which i do) | 15:01 |
LordVan | then I should be good? | 15:01 |
pokoli | LordVan: but depending on the modules it can do more: https://hg.tryton.org/modules/sale_stock_quantity/file/879b7e44b276/sale.py#l29 | 15:01 |
LordVan | of course other modules could overwrite this | 15:01 |
LordVan | I am very unlikely to use that one though | 15:02 |
LordVan | but 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 |
LordVan | If i did have anything else taht overwrites confirm(..) .. in what order would the various modules be checked? | 15:04 |
pokoli | LordVan: in the order of dependencies | 15:06 |
LordVan | but what if my module depends on sale and that one too? | 15:06 |
LordVan | I mean yes i can then change mine to depend on that other module but if i "forget" ? | 15:07 |
pokoli | LordVan: we normally have a module with all customization that have all the dependencies listed | 15:07 |
pokoli | LordVan: so this module is always executed last | 15:07 |
LordVan | that is actually a great idea ^^ | 15:07 |
LordVan | and makes a lot of sense and avoids me having to sort all the modules manually | 15:07 |
pokoli | LordVan: normally it's easier to maintain if you have a module with all the customizations | 15:08 |
LordVan | yeah i think i will merge my sale_line_description module into that one too actually | 15:08 |
pokoli | LordVan: probably it's worth a talk on an unconference (or a webinar on covid times) to explain how to maintan all customizations | 15:08 |
LordVan | since it is super small | 15:08 |
LordVan | pokoli, i'd be (vritually) present | 15:09 |
LordVan | I was wondering anyway .. if in these times it has been considered to do a conference online | 15:09 |
pokoli | LordVan: I'm not fan of small modules. I prefer customziation modules | 15:10 |
LordVan | i understand .. it was basically the very first module i wrote for tryton | 15:11 |
LordVan | and it could be considered to be fairly generic | 15:11 |
pokoli | LordVan: normally customziation modules evolve to become big | 15:11 |
LordVan | I think others could find a use for that too (all it does is add a column anyway) | 15:11 |
LordVan | but | 15:11 |
pokoli | LordVan: and also can be used to easly create a testing environment as you only need to install the module and all of its dependencies | 15:11 |
LordVan | pokoli, yepp though for testing i just drop and re-create the DB with soem basic settings at the moment | 15:11 |
LordVan | that is even quicker | 15:11 |
LordVan | re-create being restore backup/pg_dump | 15:12 |
LordVan | but .. that is great .. just this - a few lines long - module that overwrites confirm solves my issue about editing without doing anything particularily complicated | 15:13 |
pokoli | LordVan: then you are only missing the wizard | 15:14 |
LordVan | yes | 15:14 |
pokoli | which should be part of the same customization module :) | 15:14 |
LordVan | of course | 15:14 |
LordVan | well and my extra fields | 15:14 |
LordVan | but | 15:14 |
LordVan | those i do not need for monday | 15:14 |
LordVan | ^^ | 15:14 |
pokoli | LordVan: this wizard should create the outgoing move, and set the related sale_line on the origin field of the stock move | 15:15 |
LordVan | yes i will have to look into that | 15:16 |
LordVan | the good thing | 15:16 |
pokoli | LordVan: then the sale process method will correctly compute the shipped quantities | 15:16 |
LordVan | I do not need the wizard right now either i have a bit of time for that | 15:16 |
LordVan | what I did need was to stop at "confirmed" to be able to go back and adjust stuff | 15:16 |
pokoli | LordVan: so you can even use the "on_shipment" invoice method | 15:16 |
LordVan | and create reports | 15:16 |
LordVan | pokoli, nice | 15:16 |
LordVan | I gotta look into how to make the templates for reports .. been ages since i read up on that | 15:17 |
pokoli | LordVan: you should look at https://docs.tryton.org/projects/server/en/latest/topics/reports/index.html?highlight=reports | 15:18 |
pokoli | LordVan: and also the relatorio examples: https://relatorio.readthedocs.io/en/latest/quickexample.html | 15:18 |
LordVan | thank you! | 15:19 |
LordVan | btw | 15:19 |
LordVan | something that is a bit of an annoyance | 15:19 |
LordVan | when i add a sale line without product | 15:19 |
LordVan | and enter an amount, a price then change the unit | 15:19 |
LordVan | it always clears the amount (but not the total amount) | 15:19 |
LordVan | is 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 #tryton | 15:20 | |
pokoli | LordVan: changing the unit triggers the recomputed based on the product | 15:21 |
pokoli | LordVan: but as you do not have product it is emptied | 15:21 |
pokoli | LordVan: probably a missing feature | 15:21 |
pokoli | LordVan: the same happens if you set a product, change the unit price and then update the unit. The product unit price will be set | 15:22 |
LordVan | so | 15:23 |
LordVan | I 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 |
pokoli | LordVan: then the price will be set to zero each time you update the quantity or the unit | 15:23 |
LordVan | ok that is also annoying | 15:25 |
LordVan | probably better to leave as-is then | 15:25 |
LordVan | because that generates an error | 15:25 |
LordVan | though | 15:25 |
LordVan | 99% of the time when the sale line is first entered there will be no price so | 15:25 |
LordVan | that really only matters when the invoice is created | 15:26 |
LordVan | hm | 15:26 |
LordVan | pokoli, or i overwrite the recomputation method to leave the price field alone if there is no product | 15:26 |
-!- lucascastro(~lucascast@177-185-133-174.dynamic.isotelco.net.br) has joined #tryton | 15:27 | |
pokoli | LordVan: probably the best is to set 0 as unit price for sales | 15:27 |
LordVan | though .. https://hg.tryton.org/modules/sale/file/4c7b8b0d9060/sale.py#l1308 | 15:28 |
LordVan | so it should return if there is no product associated | 15:29 |
LordVan | weird | 15:29 |
LordVan | because on_change_unit calls on_change_quantity() which calls compute_unit_price | 15:29 |
LordVan | which should do nothing if there is no product assigned | 15:30 |
LordVan | unless i am missing something | 15:30 |
LordVan | pokoli, but I will just make a product "Standard" with the usual tax rate, unit set to pieces and price 0 | 15:44 |
LordVan | that seems to be the most useful solution that does nto require a lot of effort/development | 15:44 |
LordVan | now the only thing is | 15:44 |
LordVan | can i set it up so that when adding a new line that one article is selected by default? | 15:45 |
LordVan | I guess .. i could overwrite setup .. and select a product if none is selected yet | 15:51 |
LordVan | ah | 15:52 |
LordVan | i just noticed something while playing around with proteus | 15:52 |
LordVan | i 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 |
LordVan | but | 15:53 |
LordVan | if i create a sale | 15:53 |
LordVan | even 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 |
LordVan | also i guess it won't let me just create a sale with state 'done' ? | 15:54 |
LordVan | ok i figured out how to do that with .click() | 15:56 |
LordVan | but | 15:56 |
LordVan | if i want to import historical sale data | 15:56 |
LordVan | i need the numbers to be from the previous years | 15:56 |
LordVan | can I even do that using proteus? | 15:56 |
pokoli | LordVan: maybe we can update on_change_quantity to not update unit_price when it returns None | 15:58 |
LordVan | pokoli, yes that would be an option | 15:58 |
pokoli | LordVan: but we should keep the current behaviour for on_change product | 15:58 |
LordVan | but I would need to change on_change_unit to not do anything to the other fields | 15:58 |
pokoli | LordVan: sound like an easy patch for a first time contributor :) | 15:58 |
LordVan | pokoli, you know what my biggest hurdle is to contribute to the official code base? | 15:58 |
LordVan | mercurial ^^ | 15:59 |
LordVan | (never really used it) | 15:59 |
pokoli | LordVan: well, it's very similar to git | 15:59 |
LordVan | yeah i still need to read some docs first | 15:59 |
LordVan | and i am sitll a git n00b | 15:59 |
LordVan | i am old school CVS , SVN | 15:59 |
LordVan | though I am using git for stuff now | 15:59 |
pokoli | LordVan: but as far as you create the issue and upload a patch I may take care of uploading the codereview | 15:59 |
LordVan | and like it | 15:59 |
pokoli | LordVan: but you should lear about mercurial | 16:00 |
LordVan | i should | 16:00 |
pokoli | LordVan: mercurial is the natural evolution of SVN. So if you are familiar with svn it won't be to hard | 16:00 |
LordVan | nice | 16:00 |
pokoli | LordVan: at least it will be great to create the feature request on the bug tracker | 16:01 |
LordVan | btw 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 |
LordVan | i shall do that on the bug tracker tomorrow (i reported stuff before but been a while) | 16:02 |
pokoli | LordVan: about the sales import there should be some issue on your code because I imported some historicall data using proteus | 16:02 |
LordVan | well all i did was Sale() .. sale.number= 'old number', sale.party = myparty ; sale.save() ; sale.click('draft'), quote, confirm | 16:02 |
LordVan | but as soon as I do sale.click('draft') it overwrites the number with the next sequence | 16:03 |
pokoli | LordVan: Oh, I did not this way. I just created the sale in the done state | 16:04 |
LordVan | ah you can do that? cool | 16:04 |
pokoli | LordVan: now that I remember I was using proteus but not directly. Just calling the API from proteus | 16:04 |
LordVan | that would be all i need | 16:04 |
LordVan | since i don't need sale lines or anything | 16:05 |
pokoli | LordVan: you can use trytond-console to call a script directly from the server | 16:07 |
pokoli | LordVan: in your case will be easier | 16:07 |
-!- rpit(~rpit@p200300c88f4cbb00cea2955fb3b32f1a.dip0.t-ipconnect.de) has left #tryton | 16:15 | |
LordVan | well | 16:32 |
LordVan | how is it easier? | 16:33 |
LordVan | and where are the differences? | 16:33 |
pokoli | LordVan: proteus mimics the clients so it call on_changes and so one | 16:33 |
pokoli | LordVan: trytond-console is pure server side so you just have to use the API and set a value for all fields | 16:33 |
LordVan | ok | 16:34 |
LordVan | that is what i thought | 16:34 |
LordVan | but can i also do that in proteus or will it not let me create done state sale? | 16:35 |
LordVan | ok i tested | 16:38 |
LordVan | proteus won'T let me do that | 16:39 |
LordVan | so i guess i need trytond-console | 16:39 |
pokoli | LordVan: the problem is that proteus understand that the number and the state are readonly | 16:45 |
pokoli | LordVan: so won't allow you to modify them | 16:45 |
LordVan | yeah | 16:46 |
LordVan | pokoli, are there any issues with creating historical entries without any sale lines,.. ? | 16:46 |
LordVan | (that you know of) | 16:46 |
pokoli | LordVan: no, as far as the sale does not have any line it does not trigger any other workflow | 16:48 |
LordVan | good | 16:49 |
LordVan | pokoli, did you add historical invoice (numbers) too ? | 16:49 |
pokoli | LordVan: yes, we migrated all the numbers party, data and the lines information | 16:53 |
pokoli | LordVan: also linked invoices | 16:54 |
pokoli | LordVan: not an easy task and not something that I would recommend | 16:54 |
pokoli | LordVan: but the customer wanted it and paid the price. So we just did it. | 16:54 |
LordVan | well i want the sale numbers | 17:03 |
LordVan | the invoice numbers are currently not in dolibarr | 17:03 |
LordVan | so would have to be manually copied to a csv to import or so | 17:03 |
LordVan | now i am not talking invoice lines | 17:03 |
LordVan | just the numbers | 17:03 |
LordVan | but i recon that is probably difficult | 17:03 |
pokoli | LordVan: why you need *just* the numbers? | 17:05 |
pokoli | LordVan: you can always keep dolibarr in a readonly mode to search for historicall data | 17:05 |
LordVan | dolibarr has no invoice numbes | 17:05 |
LordVan | they are in spreadsheet documents | 17:05 |
pokoli | LordVan: i'm asking about sale numbers | 17:06 |
pokoli | LordVan: you need to start thinking in unify everything on Tryton | 17:07 |
LordVan | so far | 17:11 |
LordVan | most 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 |
LordVan | i am going to try to unify as much as possible | 17:12 |
LordVan | but it will take time | 17:12 |
LordVan | for now i want to replace dolibarr with tryton and then slowly add more and more | 17:12 |
LordVan | also will help with user acceptance over tiem | 17:12 |
-!- thaneor(~ldlc6@r167-61-78-190.dialup.adsl.anteldata.net.uy) has joined #tryton | 17:15 | |
pokoli | LordVan: i'm leaving for today. Will read you once back online! | 17:15 |
LordVan | sure i am going to have dinner soon too anyway | 17:19 |
-!- lucascastro(~lucascast@177.125.20.159) has joined #tryton | 18:57 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 19:25 | |
LordVan | hmm .. I don't get it | 19:54 |
LordVan | how can I search for a specific party / company/ sale with trytond-console ? | 19:54 |
LordVan | there is no find() like wiht proteus? | 19:54 |
LordVan | ah never mind | 19:57 |
LordVan | .search there | 19:57 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!