irc.libera.chat #tryton log beginning Tue Jul 13 12:00:01 AM CEST 2021 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 22:54 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 22:54 | |
-!- springwurm(~springwur@5.104.149.54) has joined #tryton | 05:40 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 05:47 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 05:47 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 06:21 | |
-!- acaubet(~Thunderbi@194.224.31.235) has joined #tryton | 06:39 | |
-!- udono(~udono@083-136-067-156.ip-addr.inexio.net) has joined #tryton | 06:48 | |
-!- rpit(~rpit@p200300c88f365000db48e182b4ab3144.dip0.t-ipconnect.de) has joined #tryton | 07:14 | |
mrichez | hi, 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 |
---|---|---|
cedk | mrichez: in proteus you can only access methods defined in __rpc__ | 08:55 |
mrichez | cedk: so i have to do a custo to add this method in __rpc__ to use with proteus ? | 08:56 |
cedk | mrichez: yes but normally you should not need to call such method | 08:58 |
mrichez | cedk: 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 |
cedk | mrichez: you can use the product.quantity or lot.quantity field with the proper context | 09:02 |
mrichez | cedk: i will try this way... thanks | 09:04 |
mrichez | cedk: in this case i will have to loop on all locations/lots available | 09:22 |
mrichez | cedk: we have 12000 lots and 1400 locations... | 09:23 |
cedk | mrichez: well you have to loop on each location and instantiate all the lots at once | 09:53 |
mrichez | cedk: ok... :-) | 09:54 |
cedk | mrichez: now maybe it is simpler to add products_by_location to __rpc__ (at least temporary) | 10:07 |
mrichez | cedk: maybe... it will be a one shot... | 10:08 |
-!- springwurm(~springwur@5.104.149.54) has joined #tryton | 12:07 | |
mrichez | cedk: 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 |
cedk | mrichez: the method does not need any instantiate | 12:26 |
mrichez | cedk: ok | 12:27 |
mrichez | cedk: still the same error... Product.products_by_location([storage.id], config.context, with_childs=True, grouping=grouping) | 12:37 |
cedk | mrichez: I do not think proteus works with keyword arguments | 12:38 |
mrichez | cedk: ok | 12:39 |
-!- rs[m](~rsinframa@2001:470:69fc:105::ea2) has joined #tryton | 20:52 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!