IRC logs of #tryton for Tuesday, 2013-03-05

chat.freenode.net #tryton log beginning Tue Mar 5 00:00:02 CET 2013
iamnoobgood day, i still cant figure out why i cant make the report work on my module.. really need help :(08:52
iamnoobthis is the files of my modules anyone please check it out, why report still dont work. .py = http://pastebin.com/kW03XFwC     ,     .xml = http://pastebin.com/eUDL37se        , __init__ = http://pastebin.com/u9TxUtm4     , tryton.cfg = http://pastebin.com/5Bqh6WiQ08:58
iamnoobjcav: hi , can you help me please.. still cant get reports to work. i had pastebin my modules can you please check it out09:05
jcaviamnoob: where are your pastebin ?09:06
iamnoobthis is the files of my modules anyone please check it out, why report still dont work. .py = http://pastebin.com/kW03XFwC     ,     .xml = http://pastebin.com/eUDL37se        , __init__ = http://pastebin.com/u9TxUtm4     , tryton.cfg = http://pastebin.com/5Bqh6WiQ09:06
iamnoobjcav: i had tried updating the database, still the report button is disabled, idk what else is missing09:07
jcaviamnoob: you got to have a special entry with type_="report" in your xml to register your report class09:08
iamnoobjcav: can you please teach me how to add a special entry, like the one you said.09:09
jcaviamnoob: you need to create a UPRReport which inherits from Report. you can just pass and let it void, but you need to create it, and register it under type_="report"09:10
iamnoobjcav: umm do you mean the .odt file?09:12
jcaviamnoob: py:09:13
jcavfrom ir.report import Report09:13
jcavclass UPRReport(Report):09:13
jcav    __name__ = 'upr.report'09:13
jcav__init__:09:13
jcavin register :09:13
jcavPool.register(09:13
jcav    UPRReport,09:13
jcav    module='upr', type_="report"09:13
jcavxml:09:13
jcav<record model="ir.action.report" id="report_upr">09:13
jcav            <field name="name">Unit_Procurement_Request</field>09:13
jcav            <field name="model">upr.upr</field>09:13
jcav<!--  HERE Change -->09:13
jcaviamnoob: http://pastebin.com/KB4xvGuY09:14
iamnoobjcav: will try it out, i have not yet made anything like this.. nor know about this until know.. thanks.. feed you back in a while..09:16
iamnoobjcav: until now*09:16
jcaviamnoob: no problem09:16
iamnoobjcav: umm do i need to add the new class under __all__ ?09:18
jcaviamnoob: yeah of course09:18
iamnoobjcav: ok thanks09:18
jonanAverage costing not working here. Always updates to the unit price of last stock received. Poking around stock/move.py I find the existing product_qty calculated in _update_product_cost_price is always 0 so existing stock is missing from average. Running an inventory shows non-zero stock quantity. Am I missing something or is this a bug ?09:19
iamnoobjcav: hi im having a problem on a missing ir.report module, i checked out the trytond folder and it is not there, how or where can i get it please?09:33
jcaviamnoob: wry, it was "from trytond.report import Report"09:34
jcaviamnoob: sry*09:34
iamnoobjcav: oh ok, still checking if i miss something09:37
iamnoobjcav: hi i have updated the module. but somehow it still doesnt enable the report, here's is the updated pastebin's    im sure i did what you taught me.. .py = http://pastebin.com/kW03XFwC     ,     .xml = http://pastebin.com/eUDL37se        , __init__ = http://pastebin.com/u9TxUtm4     , tryton.cfg = http://pastebin.com/5Bqh6WiQ10:24
jcaviamnoob: Did you update the database ? And usually, i use -1 rather than 0 in the model name of the ir.Action.keyword (xml)10:28
iamnoobjcav: yes i updated it, also tried creating a new one, ill try the -110:30
iamnoobjcav: hi it ok now! the -1 did it10:33
iamnoobjcav: umm what the -1 for? i used 0 for without knowing it what its for.. saw it on the helloworld tuts10:34
cedkiamnoob: -1 means any records10:38
jcavcedk: always thought it was "append to the end of the list" :)10:41
jcaviamnoob: so that must help. You can also check in Administration > UI > Actions > Report and look for your report in here10:42
iamnoobjcav: really helped me alot. thank you soo much, been running in circle's since yesterday with it10:43
jcaviamnoob: you're welcome10:44
iamnoobcedk: i see so thats what -1 is10:44
jonanHaving trouble with average costing. cost_price always updates to the unit price of last stock received. Looking at stock/move.py I find the existing product_qty calculated in _update_product_cost_price is always 0 so existing stock is missing from average. Listing inventory shows non-zero stock quantity. Is something missing or is this a bug ?13:36
cedkjonan: need to be more explicit about your issue14:22
jonancedk: ok what details do you need ? Average cost computation is wrong on stock receive.14:26
cedkjonan: provide a scenario that shows what is wrong14:27
jonanOk I have a product in stock configured for average cost method. Qty: 1 Cost Price: $100 . I receive some stock of same product: Qty: 1 Unit_Price: $200.  Now the cost price has updated but is $200 instead of $15014:32
cedkjonan: could you write a test scenario14:33
jonanlooking into it the function _update_product_cost_price in stock/move.py always thinks my currennt stock is 0.14:34
jonanyou mean unit test scenario ?14:34
cedkjonan: yes14:35
jonannever wrote one. Will need to figure it out first.14:40
cedkjonan: are you sure about the dates of your moves?14:46
jonanplanned date and effective are both today.14:53
cedkjonan: ok, it is a bug15:04
cedkjonan: you could fill an issue and it will be great if you can also include a test scenario15:05
-!- MadsL(~MadsL@91.214.20.132) has left #tryton16:33
plantiancedk: Hi. If I just remove all the ir action reports will they be created again?  I am getting this error for the reports -- https://gist.github.com/ianjosephwilson/509401122:36

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