IRC logs of #tryton for Wednesday, 2016-06-15

chat.freenode.net #tryton log beginning Wed Jun 15 00:00:01 CEST 2016
-!- aroncero(~aroncero@cpc91052-lock3-2-0-cust42.6-1.cable.virginm.net) has joined #tryton00:07
-!- frispete(~frispete@p54A902CD.dip0.t-ipconnect.de) has joined #tryton05:40
-!- shrox(shrox@nat/iiit/x-wvjghqivnilwdzco) has left #tryton06:53
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton07:04
-!- ccaz(~ccr@ax313-1-82-66-159-99.fbx.proxad.net) has joined #tryton07:41
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton07:45
-!- rpit(~rpit@2a02:908:e672:9420:56ee:75ff:fe0d:d3c7) has joined #tryton08:22
-!- udono(~udono@ip-178-202-239-138.hsi09.unitymediagroup.de) has joined #tryton08:47
-!- aroncero(~aroncero@cpc91052-lock3-2-0-cust42.6-1.cable.virginm.net) has joined #tryton08:59
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton09:03
-!- rpit(~rpit@2a02:908:e672:9420:56ee:75ff:fe0d:d3c7) has joined #tryton09:10
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton09:12
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton09:22
prayashmWhy are some fields from the fields_get rpc call not shown in CSV Import dialog of GTK Client? I have selected those in Sao here http://imgur.com/SgnrOYk09:42
pokoliprayashm: the readonly fields are not shown. See: http://hg.tryton.org/tryton/file/tip/tryton/gui/window/win_import.py#l6509:51
prayashmpokoli: oops. Thank you10:04
pokoliprayashm: you're welcome10:04
-!- gr8dude(~alex@host-static-188-214-203-7.moldtelecom.md) has joined #tryton10:16
pokolicedk: I have another side effect of changeset 3a17f8e704a7 https://tryton-rietveld.appspot.com/2523100210:57
-!- sisalp(~sisalpuse@boxoo.sisalp.net) has left #tryton11:03
cedkpokoli: what is log quantity?11:06
pokolicedk: lot quantity, fixed :)11:07
silwolWe have suppliers who deliver items (e.g. screws) in different packing sizes (e.g. supplier1 has 200 per pack, supplier2 500 per pack). The Purchase UOM however is defined on the product. Any chance to get that handled with the current 3.8 data model?11:58
silwolbackground information: we have UOMs defined for the pack sizes11:59
-!- gr8dude(~alex@host-static-188-214-203-7.moldtelecom.md) has joined #tryton12:01
pokolisilwol: you should customize the model to add the uom, and then take in account when computing requests12:03
cedkit is not so easy because often we don't know in advance which supplier to use12:04
pokolisilwol: but if you want to use only the purchase uom, there is the https://bitbucket.org/nantic/trytond-stock_supply_multiple from nantic that maybe will help you12:04
cedkbut perhaps PurchaseRequest.compute_purchase_line could be improved to choose a unit12:08
cedkissue5578 should ease this customization12:09
silwolIs there any severe reason to keep the UOM associated with the product and not the supplier?12:10
cedksilwol: see my previous messages12:11
silwolcedk: on what kind of information would you rely for choosing the unit?12:16
prayashmFor CSV Import file parsing, can I use http://papaparse.com/ ? It's MIT Licensed12:23
-!- mariomop(~quassel@181.91.133.50) has joined #tryton12:31
pokoliprayashm: which are the alternatives?12:32
cedksilwol: when a request is converted in purchase, we know the supplier12:33
cedksilwol: so I think a module which adds allowed uom for a supplier could be a good solution12:34
Timitossilwol: we did it like pokoli recommended and put an UOM on the supplier record. but it would be great to have a solution for this problem in core12:43
Timitoscedk: how should the allowed uom for a supplier work. i do not understand your proposal12:44
prayashmpokoli: PapaParse (http://papaparse.com/) it supports options to specify encoding as well12:45
prayashmpokoli: I am trying to find alternatives12:45
cedkprayashm: it must be available on bower12:49
cedkor maybe we could add a wrapper on server side to perform the parsing in Python12:51
cedkTimitos: indeed I don't know12:51
cedkTimitos: The main issue is that UoM and Packaging are different things12:52
cedkfor me supplier has constraint on how they sale12:52
pokoliprayashm: it will be great if you can prepare some text with two alternatives so we can disscuss about the pros and the cons of each option.  You can add the parsing in Python as an option too12:54
pokoliprayashm: and please include your opinion about the pros and the cons of each option :P12:54
prayashmpokoli: Alright, where should I post that? by email?12:55
cedkI'm always afraid to add a JS dependency because this ecosystem is so volatile and imature12:55
Timitoscedk: we have cases where supplier A is selling with uom "pack of 50" and supplier B is selling with uom "pack of 100". for the moment we are not able to handle this with the core modules like silwol already said.12:55
cedkprayashm: you can start a related discussion from the Discuss topic12:55
Timitosfor the moment i see some problems coming up with the purchase uom on the product when handling such cases12:56
cedkTimitos: uom != packaging12:56
Timitoscedk: so you say that for such a case we need a way to define in what type of packaging the supplier sells his goods?12:59
prayashmcedk: should I talk here: https://discuss.tryton.org/t/add-csv-import-export-to-sao/74 or start a new topic?12:59
cedkTimitos: I don't know12:59
-!- akshay_(67fecb7c@gateway/web/freenode/ip.103.254.203.124) has joined #tryton13:01
cedkprayashm: you can start a related topic13:01
-!- jj(67fecb7c@gateway/web/freenode/ip.103.254.203.124) has joined #tryton13:04
akshay_I need a help for JSON RPC call13:11
pokolihi akshay_, please ask what help do you need and use some pastebin service to post the requests/responses you are using13:12
akshay_How can I made request for Write with multiple IDs with different values in a single request?13:12
cedkakshay_: see http://doc.tryton.org/4.0/trytond/doc/ref/models/models.html?#trytond.model.ModelStorage.write13:13
Guest74719check this: https://groups.google.com/forum/#!topic/tryton/bl-28DrtKVg13:16
akshay_I am getting same issue13:16
cedkakshay_: there is no description of the issue, please give information if you want help13:26
pokoliakshay_: have you managed to make a request for wirte with on values?13:27
prayashmUpdated at https://discuss.tryton.org/t/choosing-a-way-of-csv-parsing-for-csv-import-feature-in-sao/14413:27
akshay_cedk: information is given with example13:46
cedkakshay_: I don't understand13:47
Guest74719write takes ids and values to edit13:49
Guest74719values are written to all ids13:50
Guest74719he needed ids should take different values for different id13:50
cedkit is documented in the link I give13:50
-!- akshay_(caa0a538@gateway/web/freenode/ip.202.160.165.56) has joined #tryton13:51
akshay_which one13:52
cedkakshay_: http://doc.tryton.org/4.0/trytond/doc/ref/models/models.html?#trytond.model.ModelStorage.write13:53
-!- Guest___(caa0a538@gateway/web/freenode/ip.202.160.165.56) has joined #tryton13:53
akshay_ok,let me try13:54
akshay_http://pastebin.com/qWc3dbsP14:06
akshay_it gives me error: "'list' object has no attribute 'get'"14:07
-!- shrox(shrox@nat/iiit/x-wvjghqivnilwdzco) has joined #tryton14:07
-!- sisalp(~sisalpuse@boxoo.sisalp.net) has joined #tryton14:13
cedkakshay_: did you read the doc?14:14
akshay_yes14:15
cedkakshay_: where did you see that after the list of ids, you must put an other list?14:15
cedkakshay_: it is: list, dict, list, dict, list, dict etc.14:15
cedkakshay_: and why are you duplicate the list of ids?14:15
akshay_if it is dict then how can I pass multiple values for multiple ids?14:16
akshay_list of ids are duplicate because as per doc, it is [recores,values,[records,values]] as records are duplicate here14:17
cedkakshay_: you can not14:17
cedkakshay_: just follow the API14:17
cedkakshay_: I can not imaging, records is a key word14:18
akshay_so i have to make multiple request to edit multiple contact_mechanism?14:18
cedkakshay_: it is not a duplication, how can you think API requires to duplicate data14:18
cedkakshay_: no you can in a single request but for that you need to read the doc14:19
akshay_can you give me example for that?14:19
cedkakshay_: http://pastebin.com/N6Nphs5A14:24
pokoliakshay_: the first records may have a diferent value from second records (and same for values)14:24
akshay_gives me error http://pastebin.com/jdsP3ybr14:26
Guest___pokoli: yes,exactly14:38
akshay_any feedback?14:54
pokoliakshay_: the number of parameters passed is not pair15:01
pokoliakshay_: it must be a pair of records, values15:01
akshay_http://pastebin.com/L9P8NhKN15:06
akshay_is this right?15:07
pokoliakshay_: you have an extra list surrounding records-values which is not required15:08
pokoliakshay_: so no, this is not right15:08
akshay_can you provide right way?15:08
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton15:13
pokoliakshay_: see cedk previous solution http://pastebin.com/N6Nphs5A15:18
-!- kstenger(~karla@r186-48-32-52.dialup.adsl.anteldata.net.uy) has joined #tryton15:24
akshay_gives me error http://pastebin.com/jdsP3ybr15:25
akshay_okoli: gives me error http://pastebin.com/jdsP3ybr15:25
akshay_pokoli: gives me error http://pastebin.com/jdsP3ybr15:26
cedkakshay_: you miss the context as last params15:26
akshay_sorry for missing character in name15:26
akshay_context?15:26
akshay_context means?15:28
cedkakshay_: http://doc.tryton.org/4.0/trytond/doc/ref/transaction.html?#trytond.transaction.Transaction.context15:29
cedkakshay_: every call must set the context of the Transaction, it is a dictionary15:29
-!- bvillasanti(~bvillasan@138.117.21.154) has joined #tryton15:31
akshay_cedk: tried with context also http://pastebin.com/r2RnpqxX but still give me error "int() argument must be a string or a number, not 'list'"15:31
cedkakshay_: it seems you are unable to reuse correctly example given15:33
cedkhttp://pastebin.com/v9tygRdL15:34
akshay_great Helppppp!!!15:38
akshay_Works!15:38
akshay_Thanks a lot for your help!!!!15:38
akshay_thanks a lot for your support15:39
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton16:26
-!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton16:43
-!- bvillasanti(~bvillasan@138.117.21.154) has joined #tryton16:43
-!- prayashm(~prayashm@103.194.233.147) has joined #tryton16:47
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton16:47
-!- gr8dude(~alex@host-static-188-214-203-7.moldtelecom.md) has joined #tryton16:51
pokolicedk: based on your statement of this morning "Note does not require write access" I understand this line http://hg.tryton.org/trytond/file/tip/trytond/ir/resource.py#l92 is wrong17:10
pokolicedk: and it should only require read access for all operations (create/write/delete) isn't it?17:11
cedkpokoli: indeed, I was wrong17:13
pokolicedk: ok, don't worry. But I understand that I'm able to write a note to a record If I'm able to write on it, is it better?17:15
pokolicedk: so the create should check for write permisions17:15
cedkpokoli: the create check the create17:16
pokolicedk: yes, I have seen. But for me it makes more sense to check write instead of create17:17
pokolicedk: I will open an issue and lets discus there, don't worry :)17:24
cedkpokoli: I find it gives finer grain control like it is now17:30
pokolicedk: we agree to disagree. But don't worry, I think that I can easly customize it and if not I will open an issue to improve customization17:35
-!- JosDzG(~Thunderbi@fixed-203-141-189-203-141-123.iusacell.net) has joined #tryton17:36
cedkprayashm: be careful that discuss is not a chat17:52
cedkprayashm: you should ask questions here17:53
prayashmcedk: oops, I will keep that in mind.17:54
pokoliprayashm: the delimiter caracter is used to encapsulate the values of the same field18:03
pokoliprayashm: for example if you want to import something that have a coma inside and you want to use the coma as separator, you should use a quote caracter to determine when the value starts and when ends18:03
prayashmpokoli: Thanks, I understood that part18:04
pokoliprayashm: so "I import, something, with comas" will be one example using " as quote character and , as separator18:04
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton19:03
-!- prayashm(~prayashm@103.194.233.147) has joined #tryton19:24
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton19:24
-!- kstenger(~karla@r186-55-65-49.dialup.adsl.anteldata.net.uy) has joined #tryton19:31
-!- nicoe(~nicoe@2a02:a03f:302d:1400:ee55:f9ff:fe7b:f7ac) has joined #tryton20:43
prayashmcedk: What characters are generally used as custom quote characters?21:14
-!- frispete(~frispete@p54A902CD.dip0.t-ipconnect.de) has joined #tryton21:30
-!- aroncero(~aroncero@cpc91052-lock3-2-0-cust42.6-1.cable.virginm.net) has joined #tryton21:53
-!- frispete(~frispete@p54A902CD.dip0.t-ipconnect.de) has joined #tryton22:11
-!- bvillasanti(~bvillasan@138.117.21.154) has joined #tryton22:30
-!- shrox(shrox@nat/iiit/x-wvjghqivnilwdzco) has left #tryton23:31

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!