IRC logs of #tryton for Friday, 2013-02-01

chat.freenode.net #tryton log beginning Fri Feb 1 00:00:01 CET 2013
plantiancedk: Thanks00:17
plantianI'm still trying to port code.  I looked in the wizard docs and I don't really understand it.  When a do_<statename> method is called and passed an action and I return action, data.  Is the `data` just coped into the Transaction context?00:19
cedkplantian: no it is the data for the action00:19
cedkplantian: for example, the ids on which a report must be run00:22
plantiancedk: okay that makes more sense, if I want to print out more than one copy of the same report, can I I just do: return action, {'ids': [invoice.id] * quantity_to_print} ?00:26
cedkplantian: it will create one document containing quantity times the report00:29
shalabhaggarwalcedk: Hi, I was going through the sale_shipment_cost method and I have a few questions regarding this11:05
shalabhaggarwalcedk: the adding/updation of shipping line to sale takes place on on_change_lines, which will be very slow in case the shipping line cost is loaded from a remote call, say web services11:06
cedkshalabhaggarwal: don't ask to ask11:06
shalabhaggarwalcedk: IMO it might be better to have this process happen when the sale goes from draft to quotation11:08
cedkshalabhaggarwal: don't see why it will be faster11:08
shalabhaggarwalcedk: in on_change_lines the cost will be loaded every time a line is added or modified11:09
cedkshalabhaggarwal: yeps but it is in case of manual operation, don't think it is an issue11:10
sharoonthomascedk: so have a special behavior for cost computations where the computation is expensive ?11:13
cedksharoonthomas: why not11:15
sharoonthomasshalabhaggarwal: cedk: in that case the on_change can just ignore for those cost methods which are expensive and do it on the workflow transition from draft to quotation11:16
shalabhaggarwalsharoonthomas: cedk: ok, i understand11:20
cedksharoonthomas, sharoonthomas: by the way, there is already in the sale module an on_change on lines so the module doesn't add any extra calls11:21
sharoonthomascedk: i am not sure we understood this correctly11:22
sharoonthomasshalabhaggarwal: the problem you are trying to say is like a shipment cost computation where the cost comes from a third party web service ?11:23
shalabhaggarwalsharoonthomas: exactly11:23
sharoonthomasshalabhaggarwal: cede: so the problem is that on_change gets triggered for each line, but since percentage and weight based computations are local, its fast while in case of the third party service - it repeatedly makes expensive calls11:25
shalabhaggarwalso take a case where an order has 5 lines, then the least possible number of third party calls will be 5, thats expensive :(11:25
sharoonthomasshalabhaggarwal: and only the last call is really useful11:26
shalabhaggarwalsharoonthomas: true11:26
sharoonthomascedk: one solution is what i said before, though it will be inconsistent with the standard behavior of the module11:26
sharoonthomasshalabhaggarwal: cedk: the cost can be computed just once, when the draft -> quotation transition happens automatically and probably have a button which manually computes the shipping cost again if required in the draft state11:27
shalabhaggarwalsharoonthomas: IMO the behaviour to have the cost computation while transition from draft > quotation should be the default one and the on_change_lines can be an added feature11:29
cedksharoonthomas: yes you can11:30
cedkshalabhaggarwal: don't agree because the current behavior allow to customize the shipment cost11:30
sharoonthomasshalabhaggarwal: that would be a major change from previous versions too11:30
cedkshalabhaggarwal: so the user could decide to set the cost to zero etc.11:31
sharoonthomascedk: shalabhaggarwal: but a button which recomputes shipping in the base module and shown in the draft state may be better11:31
shalabhaggarwalcedk: sharoonthomas: yes, i understand this11:31
cedksharoonthomas: and what if the user forget to press it ?11:31
sharoonthomascedk: its a recompute button11:32
sharoonthomascedk: the automatic draft - > quotation transition recompute will do the automatic part ?11:33
sharoonthomascedk: at the moment there is no option to recompute cost even on the weight and percentage methods too (what if the user updated the rate after the order is in draft state)11:33
cedksharoonthomas: don't care11:34
cedksharoonthomas: you have to do what you announced to the customer11:35
sisalpcedk: about your proposal on __inherit, do you mean we shouldn't modify aclass in an extra module ? Or am I far from the truth ?12:20
cedksisalp: this is not inherit but extension12:21
sisalpcedk: Iiuc, you mean : add new fields and don't spoil existing ones ?12:21
cedksisalp: if it is how you understand it :-)12:24
sisalpcedk: wouldn't it ease desintallation of modules ?12:25
cedksisalp: not really12:26
sisalpcedk: too bad12:26
-!- calbasi(~joan@161.44.14.37.dynamic.jazztel.es) has left #tryton17:58
sharoonthomashas anybody written any HR or Payroll module for tryton ?18:19
sharoonthomasrather, has there been any effort into that direction18:19
plantianIs it possible to pass data between states in a wizard?21:11

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