IRC Channels

For open discussions, an IRC Channel have been set up for Open ERP and Open Object: irc://irc.freenode.net/#openobject.

Tuesday, 2010-08-10

*** G_O_D1 has quit IRC00:25
*** hjmf has joined #openobject00:29
*** pheller has quit IRC00:30
*** b_52light_ has quit IRC00:32
*** tuxick has quit IRC00:32
*** dba has quit IRC00:32
*** b_52light_ has joined #openobject00:33
*** tuxick has joined #openobject00:33
*** dba has joined #openobject00:33
*** hjmf has joined #openobject00:46
*** hjmf has quit IRC00:50
*** hjmf has joined #openobject00:50
*** hjmf has quit IRC00:55
*** Gavin_Achado has joined #openobject01:14
*** Gavin_Achado has left #openobject01:14
*** pheller has joined #openobject01:39
*** ovnicraft has quit IRC01:39
*** pheller has left #openobject01:39
*** r3c4ll has joined #openobject02:29
*** b_52light_ has quit IRC02:45
*** javivf has quit IRC02:52
*** javivf has joined #openobject02:52
*** javivf has quit IRC02:57
*** javivf has joined #openobject02:58
*** hjmf has joined #openobject03:07
*** ToadP has joined #openobject03:09
*** ToadP1 has joined #openobject03:09
*** ToadP has left #openobject03:11
*** ToadP1 has left #openobject03:11
*** hjmf has quit IRC03:24
*** hjmf has joined #openobject03:25
*** digitalsatori has joined #openobject03:25
*** hjmf has quit IRC03:42
*** hjmf has joined #openobject03:43
*** javivf has quit IRC03:52
*** javivf has joined #openobject03:52
*** hjmf has joined #openobject04:00
*** hjmf has quit IRC04:04
*** hjmf has joined #openobject04:04
*** hjmf has joined #openobject04:22
*** hjmf has joined #openobject04:38
*** hjmf has joined #openobject04:55
*** hjmf has quit IRC05:12
*** hjmf has joined #openobject05:13
*** mozart_ar has left #openobject05:17
*** hjmf has joined #openobject05:30
*** G_O_D1 has joined #openobject05:40
*** hjmf has joined #openobject05:46
*** hjmf has joined #openobject06:04
*** hjmf has quit IRC06:22
*** hjmf has joined #openobject06:22
*** mr_amit has joined #openobject06:24
*** digitalsatori has quit IRC06:33
*** hjmf has joined #openobject06:39
*** hjmf has quit IRC06:44
*** hjmf has joined #openobject06:56
*** hjmf has joined #openobject07:13
*** hjmf has joined #openobject07:31
*** hjmf has quit IRC07:35
*** hjmf has joined #openobject07:35
*** G_O_D1 has quit IRC07:44
*** hjmf has joined #openobject07:52
*** Mark_Neobis has joined #openobject08:05
*** Nyx has joined #openobject08:29
*** Mark_Neobis has quit IRC08:48
*** quodt has joined #openobject08:50
*** mrcast has joined #openobject08:54
*** ecarreras has quit IRC08:58
*** ecarreras has joined #openobject08:58
*** cedk has quit IRC09:00
*** Mark_Neobis has joined #openobject09:09
*** LucaSub has joined #openobject09:17
*** LucaSub has left #openobject09:18
*** enlightx has joined #openobject09:20
*** mr_amit has quit IRC09:25
*** cedk has joined #openobject09:25
*** mrcast has quit IRC09:27
*** r3c4ll has quit IRC09:28
*** mrcast has joined #openobject09:29
*** rationalperseus has joined #openobject09:39
*** edannenbe has joined #openobject09:41
*** KangOl has joined #openobject09:46
*** ChanServ sets mode: +o KangOl09:46
*** eLBati has joined #openobject09:47
*** javivf has quit IRC09:50
*** javivf has joined #openobject09:53
*** jessejames has joined #openobject10:10
*** javivf has quit IRC10:21
*** javivf has joined #openobject10:23
*** b_52light has joined #openobject10:28
*** digitalsatori has joined #openobject10:30
*** dukai has joined #openobject10:32
*** valtere has joined #openobject10:38
valtere#postgresql10:39
ichdasichmoin10:41
ichdasichis there some documentation concerning the fields in the reports? what objects exist there, etc?10:41
canecaHello, how can i do a osv_memory with many steps like "next, next next, finish"? In each step i need to save the information to use in the next step.10:41
jessejamescaneca, take a look at the documentation for a wizard: http://doc.openerp.com/developer/3_10_wizard/index.html10:45
canecajessejames, i checked it but i didnt find a solution... i will check it again...10:46
*** Nyx has left #openobject10:47
canecajessejames, do you know any code example in the web or even in the openerp addon/core core that uses it?10:49
jessejamescaneca, I think that anything in the standard UI that has a gear icon launches a wizard10:51
canecajessejames, yes, i checked the code of many wizards but they are single screen wizards.. not many steps...10:54
valterehello jessesjames10:57
valtereOpenERP can be installed on centos?10:58
*** javivf has quit IRC10:58
*** javivf has joined #openobject10:59
jessejamescaneca, there's a multi-step wizard that runs when you first install accounts. That may be a good place to start. I'm pretty new to openerp and haven't created a wizard10:59
jessejamesvaltere, yes it will work on centos... but ubuntu server is much nicer!11:00
canecajessejames, thanks for the help =) i will try to find the multi-step wizard in the install11:02
*** javivf has quit IRC11:03
jessejamescaneca, if you look in addons/account/installer.py and account_installer.xml that looks like the config wizard11:03
*** javivf has joined #openobject11:04
*** javivf has joined #openobject11:04
*** javivf has quit IRC11:07
*** javivf has joined #openobject11:09
*** hsm has joined #openobject11:17
hsmIs there any documentation how to create an (rml) report via XML and Python? (so not the configuration steps in the OERP interface)11:25
jessejameshsm, have you looked at the developer guide: http://doc.openerp.com/developer/3_11_reports/11_2_XSL-RML_reports.html11:38
*** Red15 has joined #openobject11:43
*** enlightx has quit IRC11:51
*** Mark_Neobis has quit IRC11:53
hsmjessejames: thanks, but that is not technical enough.12:00
hsmDo you always need a report object for a report? many times you see in module/report/theobject.py12:00
hsmjessejames: I have found http://doc.openerp.com/developer/2_7_menu_action/7_2_actions.html?highlight=report%20name%20model%20auto%20rml#report-declaration12:04
hsmwill that piece of XML be sufficient? Or do you still need a specific python object for it?12:04
*** Mark_Neobis has joined #openobject12:06
hsmlets ask it differently: what does this file? addons/sale/report/order.py12:07
jessejameshsm, I don't know for sure but it looks as though the xml should be sufficient12:08
hsmjessejames: ok.. lets try it!12:09
hsmfound more on: http://doc.openerp.com/developer/3_11_reports/11_1_openoffice_report.html#server-pdf-output12:09
jessejameshsm, unless there someone else on this channel would like to speak up (!), that's the only way to find out12:10
hsmjessejames: yes, thanks! :-)12:12
jessejameshsm, looks as though the python code is needed to generate a PDF (according to the link you sent)12:14
hsmjessejames: jup, it seems so.. In my case I want to create a module which slightly changes the RML. In order to do this in a good way, I created a new module which installs this new rml file. Now, I also have to create a new button (the first xml code) and change the initiation of de sxw report so that it loads the other rml file. I'm trying to get this to work, but unfortunately it wont..12:20
Red15hsm, jessejames , if you have no need for localcontext updates you could just call report_sxw.report_sxw('report.sale.order', 'sale.order','addons/sale/report/order.rml',header=True)12:21
Red15and still I do not believe the actualy python file/object should be necessary12:23
Red15the <report> tag in the xml file is the most important one12:23
hsmRed15: Hi, and thanks. but, say that i'm in 'my_module' and I want to specify a new rml: report_sxw.report_sxw('report.sale.order2', 'sale.order','addons/my_module/report/order2.rml',header=True).. is that possible?12:24
jessejameshsm, if you are trying to customise an existing report I think you need to inherit the standard one in your module12:25
hsmRed15: do you mean that I should provide a 'parser' in the initiation?12:25
Red15yes, but if you're not using the parser option ... why bother with the python declaration12:25
Red15hsm, you specify your reports with the xml tag, it will use a default parser then12:26
hsmRed15: thats true.. I ll give it a try12:26
hsmjessejames: in the case I need to inherit the existing report, how would you do that?12:26
Red15hsm, you mean inherit the parser object/class ?12:27
hsmRed15: I think jessejames meant the rml report12:29
jessejamesRed15, no - referring to inheriting the sale_report.py object to create a custom report. Is that the right method?12:29
Red15dont think you can to be honest.12:30
hsmRed15, jessejames: look i did this http://pastebin.com/TgH2Ed4j12:31
jessejamesRed15, what would be the right way to customise a standard report?12:31
Red15hsm, your name tag might collide with another report12:32
Red15jessejames, i would overwrite it by using the same name tag :)12:32
Red15that way you can reuse their parser and supply a different rml file12:33
Red15unless ofcourse you want to edit the parser as well12:33
hsmRed15: no i dont.. so you think what i posted is a good solution?12:34
Red15hsm, yea i think so12:35
hsmRed15: allright, then in the report directory I only have this one rml file, right?12:36
hsmRed15, jessejames: it works with this piece of code. It seems I made things extra complicated by creating my own parser... :P12:43
jessejameshsm, have you added a reference to your custom xml file in your __terp__.py file?12:43
hsmjessejames:12:43
hsmjessejames: yes!12:43
hsmRed15: jessejames: Now there is one topic left, can I inherit the Quotation XML and overwrite it in that way?  Because what I now have are 2 buttons...12:44
Red15hsm, a shortcut for that is to use the same string as the original button12:44
Red15it will then replace it12:44
hsmRed15: string=name, right?12:44
Red15string="Label on client"12:44
hsmRed15: allright!12:45
hsmRed15: jessejames: thanks to you both! Lets have lunch :-)12:45
Red15do make sure your addon depends on the addon that adds this button first12:45
hsmRed15: yes.. sale it is.. I need to import it in __init__, right?12:46
Red15so that the xml definition of this report is read "after" the original one is read, otherwise it might actually replace your button instead of you replacing their button12:46
Red15hsm, it's an xml file, so in update_xml in __terp__12:46
hsmRed15: jup.. i do understand that..12:46
hsmRed15: eh.. terp i use for the report definition and for the dependency, init i use to include sale, otherwise it cannot refer to sale.order it seems..12:47
Red15it should, if you have in __terp__ your 'depends': ['sale']12:48
hsmRed15: or maybe.  maybe that was an error of mine when the depends was still empty..12:48
hsmRed15: yeah i do now..12:48
hsmthanks!12:48
Red15the __init__ can be empty i think12:48
Red15unless you do other things to the sale model itself12:48
hsmRed15: i think so too..12:48
hsmRed15: oh.. thats it, i created another field..12:48
Red15so then yes, you will need to import sale to read your sale.py containing this new field definition12:49
*** Gavin_Achado has joined #openobject13:09
*** Gavin_Achado has left #openobject13:09
*** Taytay has quit IRC13:22
*** Taytay has joined #openobject13:22
hsmRed15: it didn't work after all.. with the code I pasted on pastebin the report still uses the old rml, not my_module/report/myrml.rml13:22
hsmRed15: moreover, using the same string does not overwrite the action.. i guess I need the same ID aswell?13:23
hsmRed15: or de same NAME?13:23
*** Guest_371_ has joined #openobject13:24
hsmjessejames: do you have any idea? it didn't work...13:25
hsmRed15: jessejames: I think it didn't work because the sale.order object uses the specific parser. And in that parser the wrong rml is specified..13:26
*** digitalsatori has quit IRC13:28
*** Marcel|HSD has joined #openobject13:41
*** Marcel|HSD is now known as MrB13:41
*** Guest_371_ has quit IRC13:43
*** Guest_371_ has joined #openobject13:43
hsmRed15: jessejames: can you help me once more, please?13:45
jessejameshsm, best to just ask the question... we don't know till you ask ;)13:49
Red15hsm, afaik the ir.actions.report_xml chooses which rml file is used not the python call...13:50
hsmjessejames: allright, thanks.. What I just created worked because I modified the rml file of the original sales module. Now i reverted this one, it doesnt work anymore.13:51
Red15hsm, so you can try overwriting the <report> tag by using the id "sale.originalid..."13:51
hsmRed15: jessejames: everything points to another rml file, but still OERP tries to read the original report rml... what can this be?13:52
jessejameshsm, did you reload/upgrade your module13:53
hsmjessejames: yes, both.. sale an my_module13:53
*** r3c4ll has joined #openobject13:54
jessejameshsm, try just upgrading your module. It may be the sequence - you may need a higher priority on your customisation to get it loaded last14:00
hsmjessejames: How?14:02
jessejameshsm: to test, you can run ./openerp-server.py -d databasename -u my_module14:04
hsmRed15: in the xml record of a report, what is the 'name' tag supposed to be?14:04
Red15the name of the reporting service14:04
hsmjessejames: yes, thats what I do all the time, with sometimes an update for 'sale'14:04
Red15that is 'report.' + the name of the report as defined in the python14:04
Red15but you might not want to add the report. into this xml record as it will then produce 'report.report.' + ...14:05
hsmRed15: yeah, without the 'report.' the documentation says.. which python report then?]14:05
Red15report_sxw.report_sxw() the one parameter that starts with 'report.'14:05
hsmRed15: ok.. but I thought you just mentioned that this parser is not necessary?14:06
*** MrB has left #openobject14:09
Red15well, that was 'afaik' :D14:11
hsm:-)14:11
Red15but i dont understand why the overwriting of the string didnt work for you14:12
hsmRed15: Ok, normally I could reuse this parser, by typing sale.order as 'name', but now, since the rml differs, i need another parser..14:12
hsmRed15: there was 1 moment when it worked..14:13
*** enlightx has joined #openobject14:14
hsmRed15: what i now did is rewriting the original parser with the other rml file..14:14
hsmRed15: just in order to check if it listens at all..14:15
hsmRed15: by the way, is it possible to create two report_sxw instances in one file? for example:14:16
hsmreport_sxw.report_sxw('report.sale.order','sale.order','addons/sale/report/order.rml',parser=order)14:16
hsmreport_sxw.report_sxw('report.sale.order2','sale.order','addons/sale/report/order_ml.rml',parser=order14:16
hsm)14:17
Red15yes it should14:18
hsmRed15: OK, now I created a second parser in the sale module (so not in my_module yet). It seems to work a little bit. At least it reads the second rml file i created (also in the sale module and not in mine).14:26
*** Mark_Neobis has quit IRC14:30
*** r3c4ll has quit IRC14:33
Red15hsm : from other code : self._obj_report = netsvc.LocalService('report.report.auction.artists')14:34
*** r3c4ll has joined #openobject14:34
*** valtere has quit IRC14:34
Red15hsm take a look at auction/report/artist_lots.py14:35
Red15hsm take a look at auction/report/artists_lots.py14:35
*** r3c4ll has quit IRC14:36
*** r3c4ll has joined #openobject14:36
hsmRed15: what does it do? I'm not too familiar with this..14:37
*** r3c4ll has quit IRC14:40
*** r3c4ll has joined #openobject14:41
*** r3c4ll has quit IRC14:45
*** r3c4ll has joined #openobject14:45
*** r3c4ll has quit IRC14:51
Red15hsm, it calls the original report but feeds it a different set of ids (for the browse function)14:56
*** Marcel|HSD has joined #openobject14:57
hsmRed15: I think I don't need that.. What I basically did is changing o.partner.lang into o.lang (I added a language field to the sale.order model). Thats all I want to do.14:58
Red15ah i see14:59
*** Marcel|HSD has left #openobject14:59
*** digitalsatori has joined #openobject15:05
*** pheller has joined #openobject15:12
*** enlightx has quit IRC15:17
hsmRed15:I think I managed to make it work.. only one difficult thing is that it cannot find the translations anymore because it is now in a new module (i think). Any ideas?15:24
Red15export your module translations ?15:24
hsmRed15: I'd like to reuse the translations of the sale module..15:24
hsmRed15: is that possible?15:24
Red15no unfortunatly not15:24
Red15translations are seperated per module15:25
Red15for good reason tbh15:25
*** enlightx has joined #openobject15:25
hsmRed15: When using _inherit you can still reuse the original translations, right?15:26
Red15not for your newly added fields15:27
hsmok15:27
*** rationalperseus has quit IRC15:27
hsmRed15: so, is it possible to inherit the sale/report/order.py ? it is a report_sxw.rml_parse subclass. Does that accept _inherit too?15:27
*** rationalperseus has joined #openobject15:29
Red15hsm, no not using _inherit15:35
Red15but look at the auctions/report/artists_lot.py15:35
Red15maybe you can see there how they  "inherit" from the original report15:35
*** eLBati has quit IRC15:51
hsmRed15: ok.. the short way is now to export the module translations..15:51
hsmRed15: I will have a look into your suggestion if I have time left..15:52
hsmRed15: going to Utah btw?15:52
hsm:-)15:52
*** digitalsatori has quit IRC15:58
Red15hsm, not planned/responded yet :D15:58
hsmRed15: Can I copy the translations in an easy way? the export function of OERP leaves all translations empty.. I remember there was an easier solution..16:00
*** ecn has quit IRC16:04
Red15hsm, hmm don't think so16:04
hsmRed15: what was that online tool?16:04
hsmRed15: there was a LP feature to help you with this right?16:05
Red15hsm, the translation interface ? don't think this will be able to help you16:05
Red15as it's only for official addons (maybe those in extra-addons as well but not sure)16:05
hsmso.. and copying the PO files?16:05
hsmwell, I thought we used it for Open Academy too?16:06
hsmRed15: rosetta? thats not helpful?16:10
*** under__ has joined #openobject16:18
*** digitalsatori has joined #openobject16:21
Red15anyone know a way to override a method of all objects ?16:31
Red15like any object calls create() i want to override this method16:31
*** cvasquez has joined #openobject16:33
cvasquezhi, does someone knows if I can have a module set as 'active' (auto-installed on db creation) and depend on a non-active module?16:34
cvasquezI have configured this and the second module isn't available on db creation16:35
Red15cvasquez, i think active implies that the dependencies are specifically not checked16:37
Red15because it will be auto-installed16:37
jessejamesRed15, since *everything* inherits from osv.osv, I think you'd need to patch that module. Otherwise you'd need to create a custom class and inherit from that16:38
hsmjessejames: Red15: or a simple super class for osv.osv?16:40
Red15hsm, jessejames , but what _name and what _inherit then ? just "osv.osv" ?16:42
jessejamesRed15, if you are trying to affect every module then I think you'd need to create a custom osv.osv, then you'd need to create a custom module for each openerp you are using e.g. _inherit='res.partner' but the class signature would be: def my_res_partner(my_osv)16:47
*** julian1828 has joined #openobject16:48
*** cvasquez has quit IRC16:48
*** cvasquez has joined #openobject16:48
jessejamesRed15, I don't think there is a simple way of doing it without directly editing osv.py16:48
cvasquezjessejames, you could modify you osv, and then redirect it to your new class16:49
cvasquezwith this method you can build a wrapper, that receives the actual osv and then modify it, returning the correct values16:50
cvasquezRed15, dependencies are checked for active modules, but if one of those dependencies is not an active-module, it isn't available at the time of db creation, so I have an error con db creation16:51
Red15yea you're right cvasquez i've seen examples of overridden field definitions in some modules16:51
cvasquezRed15, let me search for a good example, just a sec16:52
Red15account_analytic_plans/account_analytic_plans.py : 3516:54
cvasquezRed15, ok, there you change the get method of one2many_mod2, but you have to call your modified class in order to use that method, right? I won't be available to all modules16:57
Red15true ... unless somehow you can use a bit of monkey patching ... but i doubt you can do this from inside a module..16:57
cvasquezRed15, you can do something like in base_report_unicode, like this:16:58
Red15like replace the osv module globally with a custom osv module16:58
cvasquezimport report16:58
cvasquezdef wrap_trml2pdf(method):16:58
cvasquez    """Do the new stuff here16:58
cvasquez    """16:58
cvasquez    return value16:58
cvasquezreport.render.rml2pdf.parseString = wrap_trml2pdf(report.render.rml2pdf.parseString)16:58
cvasquezreport.render.rml2pdf.parseNode = wrap_trml2pdf(report.render.rml2pdf.parseNode)16:58
cvasquezthat code replaces the report.render.rml2pdf.parseString and parseNode globally16:59
cvasquezdo the same thing for the method you want to replace16:59
*** digitalsatori has quit IRC17:01
*** hsm has left #openobject17:01
cvasqueznothing about the active module dependencies? I really don't want to change someone else's module (maintainability issues)17:06
*** enlightx has quit IRC17:07
Red15cvasquez, why do you bother with auto-install ?17:09
cvasquezRed15, I am changing the wizard and the default values run on the database creation17:15
Red15the installation wizard you mean ?17:16
*** dukai has quit IRC17:24
*** cvasquez has quit IRC17:26
*** stijnbe has joined #openobject17:26
*** ovnicraft has joined #openobject17:27
*** Mark_Neobis has joined #openobject17:38
*** Billynkid has joined #openobject17:43
*** stijnbe has quit IRC17:43
*** Mark__Neobis has joined #openobject17:59
*** cedk has quit IRC18:01
*** Mark_Neobis has quit IRC18:02
*** quodt has quit IRC18:03
*** mrcast has quit IRC18:15
*** enlightx has joined #openobject18:22
*** edannenbe has quit IRC18:28
*** ToadP has joined #openobject18:29
*** ToadP1 has joined #openobject18:29
*** under__ has quit IRC18:32
*** G_O_D has joined #openobject18:36
*** julian1828 has left #openobject18:39
*** cedk has joined #openobject18:46
*** under__ has joined #openobject18:53
*** ToadP1 has left #openobject19:24
*** ToadP has quit IRC19:26
*** ToadP has joined #openobject19:27
*** ToadP1 has joined #openobject19:27
*** KangOl has quit IRC19:28
*** ToadP1 has left #openobject19:32
*** ToadP has left #openobject19:32
*** ecarreras has quit IRC19:42
*** jessejames has quit IRC19:44
*** ecarreras has joined #openobject19:57
*** KangOl has joined #openobject20:25
*** ChanServ sets mode: +o KangOl20:25
*** Red15 has quit IRC20:44
*** ToadP has joined #openobject20:45
*** ToadP1 has joined #openobject20:45
*** eLBati has joined #openobject20:57
*** under__ has quit IRC21:16
*** ecarreras has quit IRC21:16
*** julian1828 has joined #openobject21:18
*** G_O_D has quit IRC21:18
*** Billynkid has left #openobject21:26
*** G_O_D has joined #openobject21:27
*** synkronized has joined #openobject22:17
*** javivf has quit IRC22:32
*** javivf has joined #openobject22:34
*** pheller has quit IRC22:46
*** rationalperseus has quit IRC23:28
*** eLBati has quit IRC23:29
*** enlightx has quit IRC23:45
*** quodt has joined #openobject23:52
*** synkronized has quit IRC23:59
*** ric has joined #openobject00:03
*** ric has left #openobject00:04