chat.freenode.net #tryton log beginning Fri Feb 1 00:00:01 CET 2013 | ||
2013-02-01 00:17 <plantian> cedk: Thanks | ||
2013-02-01 00:19 <plantian> I'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? | ||
2013-02-01 00:19 <cedk> plantian: no it is the data for the action | ||
2013-02-01 00:22 <cedk> plantian: for example, the ids on which a report must be run | ||
2013-02-01 00:26 <plantian> cedk: 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} ? | ||
2013-02-01 00:29 <cedk> plantian: it will create one document containing quantity times the report | ||
2013-02-01 11:05 <shalabhaggarwal> cedk: Hi, I was going through the sale_shipment_cost method and I have a few questions regarding this | ||
2013-02-01 11:06 <shalabhaggarwal> cedk: 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 services | ||
2013-02-01 11:06 <cedk> shalabhaggarwal: don't ask to ask | ||
2013-02-01 11:08 <shalabhaggarwal> cedk: IMO it might be better to have this process happen when the sale goes from draft to quotation | ||
2013-02-01 11:08 <cedk> shalabhaggarwal: don't see why it will be faster | ||
2013-02-01 11:09 <shalabhaggarwal> cedk: in on_change_lines the cost will be loaded every time a line is added or modified | ||
2013-02-01 11:10 <cedk> shalabhaggarwal: yeps but it is in case of manual operation, don't think it is an issue | ||
2013-02-01 11:13 <sharoonthomas> cedk: so have a special behavior for cost computations where the computation is expensive ? | ||
2013-02-01 11:15 <cedk> sharoonthomas: why not | ||
2013-02-01 11:16 <sharoonthomas> shalabhaggarwal: 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 quotation | ||
2013-02-01 11:20 <shalabhaggarwal> sharoonthomas: cedk: ok, i understand | ||
2013-02-01 11:21 <cedk> sharoonthomas, sharoonthomas: by the way, there is already in the sale module an on_change on lines so the module doesn't add any extra calls | ||
2013-02-01 11:22 <sharoonthomas> cedk: i am not sure we understood this correctly | ||
2013-02-01 11:23 <sharoonthomas> shalabhaggarwal: the problem you are trying to say is like a shipment cost computation where the cost comes from a third party web service ? | ||
2013-02-01 11:23 <shalabhaggarwal> sharoonthomas: exactly | ||
2013-02-01 11:25 <sharoonthomas> shalabhaggarwal: 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 calls | ||
2013-02-01 11:25 <shalabhaggarwal> so take a case where an order has 5 lines, then the least possible number of third party calls will be 5, thats expensive :( | ||
2013-02-01 11:26 <sharoonthomas> shalabhaggarwal: and only the last call is really useful | ||
2013-02-01 11:26 <shalabhaggarwal> sharoonthomas: true | ||
2013-02-01 11:26 <sharoonthomas> cedk: one solution is what i said before, though it will be inconsistent with the standard behavior of the module | ||
2013-02-01 11:27 <sharoonthomas> shalabhaggarwal: 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 state | ||
2013-02-01 11:29 <shalabhaggarwal> sharoonthomas: 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 feature | ||
2013-02-01 11:30 <cedk> sharoonthomas: yes you can | ||
2013-02-01 11:30 <cedk> shalabhaggarwal: don't agree because the current behavior allow to customize the shipment cost | ||
2013-02-01 11:30 <sharoonthomas> shalabhaggarwal: that would be a major change from previous versions too | ||
2013-02-01 11:31 <cedk> shalabhaggarwal: so the user could decide to set the cost to zero etc. | ||
2013-02-01 11:31 <sharoonthomas> cedk: shalabhaggarwal: but a button which recomputes shipping in the base module and shown in the draft state may be better | ||
2013-02-01 11:31 <shalabhaggarwal> cedk: sharoonthomas: yes, i understand this | ||
2013-02-01 11:31 <cedk> sharoonthomas: and what if the user forget to press it ? | ||
2013-02-01 11:32 <sharoonthomas> cedk: its a recompute button | ||
2013-02-01 11:33 <sharoonthomas> cedk: the automatic draft - > quotation transition recompute will do the automatic part ? | ||
2013-02-01 11:33 <sharoonthomas> cedk: 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) | ||
2013-02-01 11:34 <cedk> sharoonthomas: don't care | ||
2013-02-01 11:35 <cedk> sharoonthomas: you have to do what you announced to the customer | ||
2013-02-01 12:20 <sisalp> cedk: about your proposal on __inherit, do you mean we shouldn't modify aclass in an extra module ? Or am I far from the truth ? | ||
2013-02-01 12:21 <cedk> sisalp: this is not inherit but extension | ||
2013-02-01 12:21 <sisalp> cedk: Iiuc, you mean : add new fields and don't spoil existing ones ? | ||
2013-02-01 12:24 <cedk> sisalp: if it is how you understand it :-) | ||
2013-02-01 12:25 <sisalp> cedk: wouldn't it ease desintallation of modules ? | ||
2013-02-01 12:26 <cedk> sisalp: not really | ||
2013-02-01 12:26 <sisalp> cedk: too bad | ||
2013-02-01 17:58 -!- calbasi(~joan@161.44.14.37.dynamic.jazztel.es) has left #tryton | ||
2013-02-01 18:19 <sharoonthomas> has anybody written any HR or Payroll module for tryton ? | ||
2013-02-01 18:19 <sharoonthomas> rather, has there been any effort into that direction | ||
2013-02-01 21:11 <plantian> Is it possible to pass data between states in a wizard? |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!