IRC logs of #tryton for Friday, 2013-04-12 #tryton log beginning Fri Apr 12 00:00:02 CEST 2013
cedkgiedrius: I got the scenario working00:40
cedkgiedrius: my patch was not completly clean, now it is00:40
cedkgiedrius: there was also some issue in the scenario00:40
giedriuscedk: yes, tell me00:41
cedkgiedrius: it is on the codereview00:42
cedkgiedrius: it was really linked to AR migration00:44
cedkgiedrius: but now we have a scenario, it should no more happen00:44
giedriuscedk: ah, i was hurry on test scenarion, now i see the mistakes..00:46
giedriuscedk: now the test scenario runs successfully, thanks00:52
cedkgiedrius: I had to fix when update fifo was called00:53
cedkgiedrius: I think it is now correct but I will be interrested to have peer review00:53
cedkgiedrius: now, it is called each time a product leave the storage00:53
cedkgiedrius: going to sleep, see you tomorrow00:59
giedriuscedk: i'll check deeper on this topic tomorrow and weekend00:59
giedriuscedk: but the code looks a bit complex for what i does01:00
giedriuscedk: i mean things like self.write([self.__class__(], {}) does not look very coder-friendly :-)01:00
cedkgiedrius: which part ?01:00
cedkgiedrius: if it is just that, no worry01:01
cedkgiedrius: it is just a way to update the move because could no more be used because we need to change quantity01:02
giedriuscedk: for me it is a bit not understandable why move.fifo_quantity = .., or self.write([]) didn't work01:02
cedkgiedrius: first one is because I change the move.quantity01:04
cedkgiedrius: second is because write take an instance not an id (id is old fashion)01:04
cedkgiedrius: bye01:04
giedriuscedk: in case of msg13046, i think, it should be possible to select which products (moves), you want to return12:08
giedriuscedk: 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 supplier12:10
giedriuscedk: currently, it will return 100 @ 5€ and not @ 20€12:11
cedkgiedrius: you have to set the unit price12:18
cedkgiedrius: oops no, indeed it takes as fifo12:19
cedkgiedrius: my first comment was right12:20
giedriuscedk: it is not possible to specify unit price on supplier return shipment12:21
cedkgiedrius: that's an issue but you should enter it with a purchase12:23
giedriuscedk: ok, i'll test the return using purchase order12:24
cedkgiedrius: but yes I think unit price should be visible on move to supplier12:27
giedriuscedk: but i'm not sure if this helps for FIFO case, as the first move will be consumed (not tested yet, just an assumption)12:32
cedkgiedrius: normally no, because get_fifo_move search from newer to older12:37
giedriuscedk: better case would be: 100 @ 5€, 100 @ 20€ and 100 @ 10€. And I want to return 100 @ 20€12:39
cedkgiedrius: indeed I think it is something that should not happens in real life12:40
cedkgiedrius: product should have  the property to be equivalent12:41
cedkgiedrius: once in the warehouse you can not distinct them12:41
cedkgiedrius: 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 one12:44
cedkgiedrius: but I would say it is an advanced feature12:45
giedriuscedk: 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 package12:45
cedkgiedrius: defautl behavior is FIFO12:45
cedkgiedrius: I would like to know the supplier that will take back such broken product at cost price12:46
giedriuscedk: broken (faulty) or wrong items by supplier12:48
giedriuscedk: for sure, it is not common case, but sometimes it happens12:48
cedkgiedrius: normally once you acknoledge the receipt, a supplier will be a fool to beleive you about mistakes12:50
cedkgiedrius: and acknowledge the receipt is validate the shipment12:50
cedkgiedrius: any way, as I said for FIFO it is just a matter to update the fifo quantity on the right moves12:51
cedkgiedrius: because the design for now is to be FIFO so it returns the first in12:51
giedriuscedk: i think, it is enough to have the possibilty to update fifo qty manually12:52
giedriuscedk: but in this case, wouldn't it be LIFO?12:53
giedriuscedk: like i want to return it which was last bought12:53
cedkgiedrius: the function is generic, it doesn't know in which cases you are12:54
cedkgiedrius: like you could also have trash products12:54
cedkgiedrius: so the function was design to be resilient12:56
cedkgiedrius: it is a kind design I always try to put in Tryton12:56
cedkbecause at the end any cost method is always an approximation and over time it should tend to the right value12:57
cedkso cost computation should try to forget old errors12:58
giedriuscedk: i like this kind of design12:59
giedriuscedk: just thinking about all possible situations as real world is not perfect :)13:00
cedkgiedrius: of course, but we should also try to keep base as simple as possible13:05
cedkgiedrius: if you get a rare cases, our goal is that it can be managed by extending with a module13:05
giedriuscedk: i understand, but this case is on the thin edge between general FIFO stock managmenet and the specify case13:08
giedriuscedk: 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 :-)13:10
cedkgiedrius: any way, it will be good to describe it on the bugtracker with the possible solution13:11
giedriuscedk: sure, when i get more clear mind, i'll do13:12
giedriuscedk: do i need to create a patch from a review to make this changes commited to hg repository, or do you do it yourself?15:09
cedkgiedrius: yes see the wiki about contribution15:10
giedriuscedk: i see the wiki, but it is not descriptive enough15:11
giedriuscedk: but i guess i need to submit hg patch15:13
cedkgiedrius: yes15:16
cedkgiedrius: but you should wait for my fix to be first commited15:24
giedriuscedk: is it not possible to apply patch on top of other commits in hg?15:34
cedkgiedrius: not if you make the commit before15:35
cedkgiedrius: or I will applied it as a new patch and your clone will diverge15:35
giedriuscedk: you can apply it like that, not a problem for me to re-clone15:36
-!- sisalp( has left #tryton16:16
coepsHi, 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?17:02
coepsthe report should be opened when I press a button (or even better when the state changes a button is attached to)17:03
coepsCan I force the client to send the same request to the server on button-click as when I click report open?17:04
cedkcoeps: yes you can have a button returning a ir.action.report17:07
coepscdek: I tried with <button type="action" name="id_of_my_xml_action". Is that the correct approach?17:09
cedkcoeps: button doesn't have anymore type17:10
cedkcoeps: they are all linked to a method17:10
coepsI will file a but for the docu- its still in there for 2.617:10
cedkcoeps: already fixed in changeset:aa9cd20db0b517:11
coepscdek: can you think about an example where a report is opened by using a method?17:12
cedkoops readthedocs doesn't follow the branches17:16
cedkcoeps: a report I don't know but some run a wizard which is not very different17:17
coepscdek: 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 time17:34
coepsIt works now, I forgot to mention that :)17:35
coepscdek: Thanks again, this button-action tip saved my day.17:48
cedkcoeps: module name can not have '.'17:48
coepscdek: omg forget the question sorry.17:49
coepscoeps: its clear now17:49
_droidhi 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?18:00
cedk_droid: it is the old fashion to register class into the Pool18:01
cedk_droid: by the way, I find the training module better to learn:
_droidcedk: thank you for the link. could you elaborate on what you mean with pool? I come from the Object Oriented Programming (java, pretty mainstream).18:04
cedk_droid: the pool is where the classes are stored18: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 one18:05
cedk_droid: like that we have classes that are constructed by modules18:06
_droidcedk: 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?18:06
cedk_droid: no it is a Tryton specific design18:10
ozmeistercedk: Just saw the recommendation you made to _droid about the training module. is it intended to be a training module for module creators? Thanks.18:25
cedkozmeister: yes18:26
_droidcedk: ok, about that link, can't make anything of it. Could you elaborate18:26
cedk_droid: instructions are in the description of the repository18:28
ozmeistercedk: 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?18:31
cedkozmeister: don't know the module18:32
ozmeistercedk: ok18:32
ozmeistercedk: 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?18:37
coepsozmeister: I have no experience with gnu health but usually: only update the db with -u <module> flag: see here:
ozmeistercedk: just found that page. Thanks :)18:41
ozmeistercedk: 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?18:43
cedkozmeister: yes18:46
ozmeistercedk: Thanks for all your help, Cedric18:47
cedkozmeister: or you can use the cmd line18:48
ozmeistercedk: via proteus?18:50
cedkozmeister: no cmd line18:50
cedkozmeister: see trytond --help18:50
ozmeistercedk: I see18:52
-!- rpit( has left #tryton19:23

Generated by 2.11.0 by Marius Gedminas - find it at!