IRC logs of #tryton for Tuesday, 2021-07-13

irc.libera.chat #tryton log beginning Tue Jul 13 12:00:01 AM CEST 2021
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:54
-!- ChanServ changed mode/#tryton -> +o cedk 22:54
-!- springwurm(~springwur@5.104.149.54) has joined #tryton05:40
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton05:47
-!- ChanServ changed mode/#tryton -> +o cedk 05:47
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton06:21
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton06:39
-!- udono(~udono@083-136-067-156.ip-addr.inexio.net) has joined #tryton06:48
-!- rpit(~rpit@p200300c88f365000db48e182b4ab3144.dip0.t-ipconnect.de) has joined #tryton07:14
mrichezhi, in a proteus script i try to get product quantities with Product.products_by_location and i get this error: AttributeError: type object 'product.product' has no attribute 'products_by_location'08:37
cedkmrichez: in proteus you can only access methods defined in __rpc__08:55
mrichezcedk: so i have to do a custo to add this method in __rpc__ to use with proteus ?08:56
cedkmrichez: yes but normally you should not need to call such method08:58
mrichezcedk: i need to get a listing of our stocks (location, product, lot, quantity) used in tryton 5.6 to migrate to another database on tryton 6.0... any other way than proteus ?09:00
cedkmrichez: you can use the product.quantity or lot.quantity field with the proper context09:02
mrichezcedk: i will try this way... thanks09:04
mrichezcedk: in this case i will have to loop on all locations/lots available 09:22
mrichezcedk: we have 12000 lots and 1400 locations... 09:23
cedkmrichez: well you have to loop on each location and instantiate all the lots at once09:53
mrichezcedk: ok... :-)09:54
cedkmrichez: now maybe it is simpler to add products_by_location to __rpc__ (at least temporary)10:07
mrichezcedk: maybe... it will be a one shot... 10:08
-!- springwurm(~springwur@5.104.149.54) has joined #tryton12:07
mrichezcedk: so i just add : cls.__rpc__.update({ 'products_by_location': RPC(instantiate=0),  })  but got this error: TypeError: __call__() got an unexpected keyword argument 'with_childs'12:13
cedkmrichez: the method does not need any instantiate12:26
mrichezcedk: ok12:27
mrichezcedk: still the same error... Product.products_by_location([storage.id], config.context, with_childs=True, grouping=grouping)12:37
cedkmrichez: I do not think proteus works with keyword arguments12:38
mrichezcedk: ok12:39
-!- rs[m](~rsinframa@2001:470:69fc:105::ea2) has joined #tryton20:52

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