IRC logs of #tryton for Friday, 2013-04-12 #tryton log beginning Fri Apr 12 00:00:02 CEST 2013
2013-04-12 00:40 <cedk> giedrius: I got the scenario working
2013-04-12 00:40 <cedk> giedrius: my patch was not completly clean, now it is
2013-04-12 00:40 <cedk> giedrius: there was also some issue in the scenario
2013-04-12 00:41 <giedrius> cedk: yes, tell me
2013-04-12 00:42 <cedk> giedrius: it is on the codereview
2013-04-12 00:44 <cedk> giedrius: it was really linked to AR migration
2013-04-12 00:44 <cedk> giedrius: but now we have a scenario, it should no more happen
2013-04-12 00:46 <giedrius> cedk: ah, i was hurry on test scenarion, now i see the mistakes..
2013-04-12 00:52 <giedrius> cedk: now the test scenario runs successfully, thanks
2013-04-12 00:53 <cedk> giedrius: I had to fix when update fifo was called
2013-04-12 00:53 <cedk> giedrius: I think it is now correct but I will be interrested to have peer review
2013-04-12 00:53 <cedk> giedrius: now, it is called each time a product leave the storage
2013-04-12 00:59 <cedk> giedrius: going to sleep, see you tomorrow
2013-04-12 00:59 <giedrius> cedk: i'll check deeper on this topic tomorrow and weekend
2013-04-12 01:00 <giedrius> cedk: but the code looks a bit complex for what i does
2013-04-12 01:00 <giedrius> cedk: i mean things like self.write([self.__class__(], {}) does not look very coder-friendly :-)
2013-04-12 01:00 <cedk> giedrius: which part ?
2013-04-12 01:01 <cedk> giedrius: if it is just that, no worry
2013-04-12 01:02 <cedk> giedrius: it is just a way to update the move because could no more be used because we need to change quantity
2013-04-12 01:02 <giedrius> cedk: for me it is a bit not understandable why move.fifo_quantity = .., or self.write([]) didn't work
2013-04-12 01:04 <cedk> giedrius: first one is because I change the move.quantity
2013-04-12 01:04 <cedk> giedrius: second is because write take an instance not an id (id is old fashion)
2013-04-12 01:04 <cedk> giedrius: bye
2013-04-12 12:08 <giedrius> cedk: in case of msg13046, i think, it should be possible to select which products (moves), you want to return
2013-04-12 12:10 <giedrius> cedk: for example you have 100 items @ 5€, then you order 100 @ 20€, and later you want to return these recently bought products 100 @ 20€ to supplier
2013-04-12 12:11 <giedrius> cedk: currently, it will return 100 @ 5€ and not @ 20€
2013-04-12 12:18 <cedk> giedrius: you have to set the unit price
2013-04-12 12:19 <cedk> giedrius: oops no, indeed it takes as fifo
2013-04-12 12:20 <cedk> giedrius: my first comment was right
2013-04-12 12:21 <giedrius> cedk: it is not possible to specify unit price on supplier return shipment
2013-04-12 12:23 <cedk> giedrius: that's an issue but you should enter it with a purchase
2013-04-12 12:24 <giedrius> cedk: ok, i'll test the return using purchase order
2013-04-12 12:27 <cedk> giedrius: but yes I think unit price should be visible on move to supplier
2013-04-12 12:32 <giedrius> cedk: but i'm not sure if this helps for FIFO case, as the first move will be consumed (not tested yet, just an assumption)
2013-04-12 12:37 <cedk> giedrius: normally no, because get_fifo_move search from newer to older
2013-04-12 12:39 <giedrius> cedk: better case would be: 100 @ 5€, 100 @ 20€ and 100 @ 10€. And I want to return 100 @ 20€
2013-04-12 12:40 <cedk> giedrius: indeed I think it is something that should not happens in real life
2013-04-12 12:41 <cedk> giedrius: product should have the property to be equivalent
2013-04-12 12:41 <cedk> giedrius: once in the warehouse you can not distinct them
2013-04-12 12:44 <cedk> giedrius: but what you can do is to filll the fifo_quantity of the second one to change the default behavior which will always take the first one
2013-04-12 12:45 <cedk> giedrius: but I would say it is an advanced feature
2013-04-12 12:45 <giedrius> cedk: lets say, you get broken products to your input location, later you receive few more packages, and only later when you move the package to storage location, you notice that the items are broken. At this point you can still distinguish the cost price of this package
2013-04-12 12:45 <cedk> giedrius: defautl behavior is FIFO
2013-04-12 12:46 <cedk> giedrius: I would like to know the supplier that will take back such broken product at cost price
2013-04-12 12:48 <giedrius> cedk: broken (faulty) or wrong items by supplier
2013-04-12 12:48 <giedrius> cedk: for sure, it is not common case, but sometimes it happens
2013-04-12 12:50 <cedk> giedrius: normally once you acknoledge the receipt, a supplier will be a fool to beleive you about mistakes
2013-04-12 12:50 <cedk> giedrius: and acknowledge the receipt is validate the shipment
2013-04-12 12:51 <cedk> giedrius: any way, as I said for FIFO it is just a matter to update the fifo quantity on the right moves
2013-04-12 12:51 <cedk> giedrius: because the design for now is to be FIFO so it returns the first in
2013-04-12 12:52 <giedrius> cedk: i think, it is enough to have the possibilty to update fifo qty manually
2013-04-12 12:53 <giedrius> cedk: but in this case, wouldn't it be LIFO?
2013-04-12 12:53 <giedrius> cedk: like i want to return it which was last bought
2013-04-12 12:54 <cedk> giedrius: the function is generic, it doesn't know in which cases you are
2013-04-12 12:54 <cedk> giedrius: like you could also have trash products
2013-04-12 12:56 <cedk> giedrius: so the function was design to be resilient
2013-04-12 12:56 <cedk> giedrius: it is a kind design I always try to put in Tryton
2013-04-12 12:57 <cedk> because at the end any cost method is always an approximation and over time it should tend to the right value
2013-04-12 12:58 <cedk> so cost computation should try to forget old errors
2013-04-12 12:59 <giedrius> cedk: i like this kind of design
2013-04-12 13:00 <giedrius> cedk: just thinking about all possible situations as real world is not perfect :)
2013-04-12 13:05 <cedk> giedrius: of course, but we should also try to keep base as simple as possible
2013-04-12 13:05 <cedk> giedrius: if you get a rare cases, our goal is that it can be managed by extending with a module
2013-04-12 13:08 <giedrius> cedk: i understand, but this case is on the thin edge between general FIFO stock managmenet and the specify case
2013-04-12 13:08 <giedrius> specific*
2013-04-12 13:10 <giedrius> cedk: let's leave this issue for now, i need to do more testing and talk with accountant to be more sure on what i talk :-)
2013-04-12 13:11 <cedk> giedrius: any way, it will be good to describe it on the bugtracker with the possible solution
2013-04-12 13:12 <giedrius> cedk: sure, when i get more clear mind, i'll do
2013-04-12 15:09 <giedrius> cedk: do i need to create a patch from a review to make this changes commited to hg repository, or do you do it yourself?
2013-04-12 15:10 <cedk> giedrius: yes see the wiki about contribution
2013-04-12 15:11 <giedrius> cedk: i see the wiki, but it is not descriptive enough
2013-04-12 15:13 <giedrius> cedk: but i guess i need to submit hg patch
2013-04-12 15:16 <cedk> giedrius: yes
2013-04-12 15:24 <cedk> giedrius: but you should wait for my fix to be first commited
2013-04-12 15:34 <giedrius> cedk: is it not possible to apply patch on top of other commits in hg?
2013-04-12 15:35 <cedk> giedrius: not if you make the commit before
2013-04-12 15:35 <cedk> giedrius: or I will applied it as a new patch and your clone will diverge
2013-04-12 15:36 <giedrius> cedk: you can apply it like that, not a problem for me to re-clone
2013-04-12 16:16 -!- sisalp( has left #tryton
2013-04-12 17:02 <coeps> Hi, I try since hours, to get a report generated and opened office. It shall have the same behavior as using the Icon in the top row (open report). I do not achieve my goal yet. Is it possible at all?
2013-04-12 17:03 <coeps> the report should be opened when I press a button (or even better when the state changes a button is attached to)
2013-04-12 17:04 <coeps> Can I force the client to send the same request to the server on button-click as when I click report open?
2013-04-12 17:07 <cedk> coeps: yes you can have a button returning a
2013-04-12 17:09 <coeps> cdek: I tried with <button type="action" name="id_of_my_xml_action". Is that the correct approach?
2013-04-12 17:10 <cedk> coeps: button doesn't have anymore type
2013-04-12 17:10 <cedk> coeps: they are all linked to a method
2013-04-12 17:10 <coeps> I will file a but for the docu- its still in there for 2.6
2013-04-12 17:11 <cedk> coeps: already fixed in changeset:aa9cd20db0b5
2013-04-12 17:12 <coeps> cdek: can you think about an example where a report is opened by using a method?
2013-04-12 17:14 <cedk> coeps:
2013-04-12 17:16 <cedk> oops readthedocs doesn't follow the branches
2013-04-12 17:17 <cedk> coeps: a report I don't know but some run a wizard which is not very different
2013-04-12 17:24 <cedk> coeps:
2013-04-12 17:34 <coeps> cdek: Grrrr. I tried last night the same but got errors. in account_invoice the id is "account_invoice.wizard_pay" with an underscore. The xml ID only is called Why is there an underscore in account_invoice, when it normaly is used with a dot (like account.invoice)? Thanks for your time
2013-04-12 17:35 <coeps> It works now, I forgot to mention that :)
2013-04-12 17:48 <coeps> cdek: Thanks again, this button-action tip saved my day.
2013-04-12 17:48 <cedk> coeps: module name can not have '.'
2013-04-12 17:49 <coeps> cdek: omg forget the question sorry.
2013-04-12 17:49 <coeps> coeps: its clear now
2013-04-12 18:00 <_droid> hi people, I have a question about the tryton tutorial. I'm new to python also, so excuse little knowledge. At the second step, the last line of code says: "Hello()". What does this line mean?
2013-04-12 18:01 <cedk> _droid: it is the old fashion to register class into the Pool
2013-04-12 18:02 <cedk> _droid: by the way, I find the training module better to learn:
2013-04-12 18:04 <_droid> cedk: thank you for the link. could you elaborate on what you mean with pool? I come from the Object Oriented Programming (java, pretty mainstream).
2013-04-12 18:05 <cedk> _droid: the pool is where the classes are stored
2013-04-12 18:05 <cedk> _droid: each module will replace an class of the pool and replace it by his own that dynamicaly will inherit of the previous one
2013-04-12 18:06 <cedk> _droid: like that we have classes that are constructed by modules
2013-04-12 18:06 <_droid> cedk: is not the constructor? Is it when you enter it in the python console directly you get a hex address where it is stored in memory?
2013-04-12 18:10 <cedk> _droid: no it is a Tryton specific design
2013-04-12 18:25 <ozmeister> cedk: Just saw the recommendation you made to _droid about the training module. is it intended to be a training module for module creators? Thanks.
2013-04-12 18:26 <cedk> ozmeister: yes
2013-04-12 18:26 <_droid> cedk: ok, about that link, can't make anything of it. Could you elaborate
2013-04-12 18:28 <cedk> _droid: instructions are in the description of the repository
2013-04-12 18:31 <ozmeister> cedk: Thanks. I'm looking at 'party_extend'. Is that the recommended way to extend a model? By importing and adding the new fields under the class statement?
2013-04-12 18:32 <cedk> ozmeister: don't know the module
2013-04-12 18:32 <ozmeister> cedk: ok
2013-04-12 18:37 <ozmeister> cedk: I've setup a tryton dev environment to hack on GNU Health. if I make code changes on an already-installed module, do I have to remove it, update the db, then reinstall?
2013-04-12 18:40 <coeps> ozmeister: I have no experience with gnu health but usually: only update the db with -u <module> flag: see here:
2013-04-12 18:41 <ozmeister> cedk: just found that page. Thanks :)
2013-04-12 18:43 <ozmeister> cedk: generally speaking, for tryton modules, after updating the db, do you need to mark for upgrade then launch pending actions in the modules section of the tryton client?
2013-04-12 18:46 <cedk> ozmeister: yes
2013-04-12 18:47 <ozmeister> cedk: Thanks for all your help, Cedric
2013-04-12 18:48 <cedk> ozmeister: or you can use the cmd line
2013-04-12 18:50 <ozmeister> cedk: via proteus?
2013-04-12 18:50 <cedk> ozmeister: no cmd line
2013-04-12 18:50 <cedk> ozmeister: see trytond --help
2013-04-12 18:52 <ozmeister> cedk: I see
2013-04-12 19:23 -!- rpit( has left #tryton

Generated by 2.17.3 by Marius Gedminas - find it at!