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

chat.freenode.net #tryton log beginning Tue Mar 5 00:00:02 CET 2013
2013-03-05 08:52 <iamnoob> good day, i still cant figure out why i cant make the report work on my module.. really need help :(
2013-03-05 08:58 <iamnoob> this 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/5Bqh6WiQ
2013-03-05 09:05 <iamnoob> jcav: hi , can you help me please.. still cant get reports to work. i had pastebin my modules can you please check it out
2013-03-05 09:06 <jcav> iamnoob: where are your pastebin ?
2013-03-05 09:06 <iamnoob> this 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/5Bqh6WiQ
2013-03-05 09:07 <iamnoob> jcav: i had tried updating the database, still the report button is disabled, idk what else is missing
2013-03-05 09:08 <jcav> iamnoob: you got to have a special entry with type_="report" in your xml to register your report class
2013-03-05 09:09 <iamnoob> jcav: can you please teach me how to add a special entry, like the one you said.
2013-03-05 09:10 <jcav> iamnoob: 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"
2013-03-05 09:12 <iamnoob> jcav: umm do you mean the .odt file?
2013-03-05 09:13 <jcav> iamnoob: py:
2013-03-05 09:13 <jcav> from ir.report import Report
2013-03-05 09:13 <jcav> class UPRReport(Report):
2013-03-05 09:13 <jcav> __name__ = 'upr.report'
2013-03-05 09:13 <jcav> __init__:
2013-03-05 09:13 <jcav> in register :
2013-03-05 09:13 <jcav> Pool.register(
2013-03-05 09:13 <jcav> UPRReport,
2013-03-05 09:13 <jcav> module='upr', type_="report"
2013-03-05 09:13 <jcav> xml:
2013-03-05 09:13 <jcav> <record model="ir.action.report" id="report_upr">
2013-03-05 09:13 <jcav> <field name="name">Unit_Procurement_Request</field>
2013-03-05 09:13 <jcav> <field name="model">upr.upr</field>
2013-03-05 09:13 <jcav> <!-- HERE Change -->
2013-03-05 09:14 <jcav> iamnoob: http://pastebin.com/KB4xvGuY
2013-03-05 09:16 <iamnoob> jcav: 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..
2013-03-05 09:16 <iamnoob> jcav: until now*
2013-03-05 09:16 <jcav> iamnoob: no problem
2013-03-05 09:18 <iamnoob> jcav: umm do i need to add the new class under __all__ ?
2013-03-05 09:18 <jcav> iamnoob: yeah of course
2013-03-05 09:18 <iamnoob> jcav: ok thanks
2013-03-05 09:19 <jonan> Average 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 ?
2013-03-05 09:33 <iamnoob> jcav: 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?
2013-03-05 09:34 <jcav> iamnoob: wry, it was "from trytond.report import Report"
2013-03-05 09:34 <jcav> iamnoob: sry*
2013-03-05 09:37 <iamnoob> jcav: oh ok, still checking if i miss something
2013-03-05 10:24 <iamnoob> jcav: 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/5Bqh6WiQ
2013-03-05 10:28 <jcav> iamnoob: Did you update the database ? And usually, i use -1 rather than 0 in the model name of the ir.Action.keyword (xml)
2013-03-05 10:30 <iamnoob> jcav: yes i updated it, also tried creating a new one, ill try the -1
2013-03-05 10:33 <iamnoob> jcav: hi it ok now! the -1 did it
2013-03-05 10:34 <iamnoob> jcav: umm what the -1 for? i used 0 for without knowing it what its for.. saw it on the helloworld tuts
2013-03-05 10:38 <cedk> iamnoob: -1 means any records
2013-03-05 10:41 <jcav> cedk: always thought it was "append to the end of the list" :)
2013-03-05 10:42 <jcav> iamnoob: so that must help. You can also check in Administration > UI > Actions > Report and look for your report in here
2013-03-05 10:43 <iamnoob> jcav: really helped me alot. thank you soo much, been running in circle's since yesterday with it
2013-03-05 10:44 <jcav> iamnoob: you're welcome
2013-03-05 10:44 <iamnoob> cedk: i see so thats what -1 is
2013-03-05 13:36 <jonan> Having 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 ?
2013-03-05 14:22 <cedk> jonan: need to be more explicit about your issue
2013-03-05 14:26 <jonan> cedk: ok what details do you need ? Average cost computation is wrong on stock receive.
2013-03-05 14:27 <cedk> jonan: provide a scenario that shows what is wrong
2013-03-05 14:32 <jonan> Ok 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 $150
2013-03-05 14:33 <cedk> jonan: could you write a test scenario
2013-03-05 14:34 <jonan> looking into it the function _update_product_cost_price in stock/move.py always thinks my currennt stock is 0.
2013-03-05 14:34 <jonan> you mean unit test scenario ?
2013-03-05 14:35 <cedk> jonan: yes
2013-03-05 14:40 <jonan> never wrote one. Will need to figure it out first.
2013-03-05 14:46 <cedk> jonan: are you sure about the dates of your moves?
2013-03-05 14:53 <jonan> planned date and effective are both today.
2013-03-05 15:04 <cedk> jonan: ok, it is a bug
2013-03-05 15:05 <cedk> jonan: you could fill an issue and it will be great if you can also include a test scenario
2013-03-05 16:33 -!- MadsL(~MadsL@91.214.20.132) has left #tryton
2013-03-05 22:36 <plantian> cedk: 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/5094011

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!