This question has been flagged
1 Reply
3171 Views

I am good at writing rml code......If .sxw file is not required for creating a report module then what files should be created in report module.please

Avatar
Discard
Best Answer

SXW file is not required for creating a module report, it is used to generate RML file. RML file is required in report module.

In this url you find a report module, so, you can find out how to create a report module

www.nextma.com/download/montant/7/nextma_facture_montant_lettres.tar.gz

Avatar
Discard
Author

the example which you sent has got invoice.sxw file....in report module.my question is wiith out .sxw file can we create module?????

YES, without SXW file you can create a report module. In fact, the server uses the RML file to generate your report. I think that SXW file will be used when you modify the report using base_report_designer and OpenOffice

Author

I created rml code using report lab guide...i created report module i do not have any sxw files..how should we continue

I am not sure that there is a solution to convert RML to SXW. But, your module will work normally, and your report will be printed even there is no SXW file. SXW file will be used to edit your report using OpenOffice report designer.

Author

K thank you.....but in py files of report module there is report_sxw.rml_parse and report_sxw.report_sxw terms....my doubt if i dont have sxw file in my report module then should use report_sxw.report_sxw and report_sxw.rml_parse in py file.....i am confused regarding this matter

No no, don't be confused, report_sxw is name of a py file located in " /server/openerp/report ", OpenERP uses the function "rml_parse " which is the report_sxw py file. SO, forget the report_sxw and look to report_sxw.RML_PARSE :D

Author

Andromida.....please can you look at this link https://www.dropbox.com/sh/8i8wld985fs7yb1/QJPOIGuIjW and tell me if my py file is correct or not....its a deep request...

Ok, but I am in work now, I will take a look this night. please mark my answer as correct.

Hi R.sridevi. I want to know what's the object you are working on it, and what kind of report you wanna generate( invoice, sale order ...) ??

Author

Andromida....thanks a lot.....i understood very well.....i created a report module for a module to print a form with out fetching any objects.....my issue is when i try to install a module xml architecture error i do not know where i am going wrong....please view this link and help me https://www.dropbox.com/sh/x90ykrocworffkz/rusLpiXGVE

Author

Andromida Thanks a lot my module is working beautifully with your warmest help...I have an another request to you....i have two other rml codes with me....can put those two in my report module creating two .py files for it?????

Your module is working because you worked hard to fix it, I did not help you much. KEEP going ! I don't know if you can put two reports in the same module, you can try it by yourself.

Author

thanks. andromida in sale order when i click print button i get dropdowns like quotation/order....how to create drop downs in print button???

You have to create another module( we need just the report, so you change the name of py file of your existing py files and report.xml), when you install it, another report will be added to your print dropdown.

Author

oh is it...you mean to say that i create another report module huh?? Andromida i hope that i am not irritating you..forgive a novice

Author

oh is it....you mean that i should create an another report module??? Andromida i hope that i am irritating you....forgive a novice

You are welcome R.sridevi, I am a beginner too but I try to help. YES you have to create another eport module with different py files names then the second report will appear in the dropdown print list.

Author

oh sweet of you......so when i create a new report module with other name..then i ll be having .py ,.rml,.xml,__init__.py files in the each of the report module no???

yes but just files of the report, no business logic files. and don't forget to add the dependencies to your __openerp__.py

Author

Andromida.....what do you mean by "no business logic files"??? when once i created another report module then should i create a common .xml file for it huh??

Do like in the example which I gave to you http://www.nextma.com/download/montant/7/nextma_facture_montant_lettres.tar.gz (www.nextma.com/download/montant/7/nextma_facture_montant_lettres.tar.gz)

Author

Definetly i will try it and get back to you

Hi Andromida....i tried out creating another following your examples...ny problem is module is getting updated with out any issues but i cant see my new form name at my print button.....dono what is happening please help me out dear...view this link it has main module https://www.dropbox.com/sh/x90ykrocworffkz/rusLpiXGVE and new module https://www.dropbox.com/sh/77wq6foe8lj4t9p/2zX34QU3ui please check it

Sorry I can't do this now, I am working now. May be this night, I will take a look

Author

Andromida I fixed my errors....it is working now.....I heartily thank you for giving me best example

Hi R.sridevi, I am sorry for being late. I have fixed your report module and it works fine. http://www.mediafire.com/download/rw4huxbjb6piz8k/dhl_clearence.zip