Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Want to manually edit rml, but which file

By
Julian Isaac
on 4/23/13, 9:38 AM 3,549 views
/usr/lib/pymodules/python2.7/openerp-server/addons/account_invoice_layout/report/special_message_invoice.rml
/usr/lib/pymodules/python2.7/openerp-server/addons/account_invoice_layout/report/report_account_invoice_layout.rml
/usr/lib/pymodules/python2.7/openerp-server/addons/account/report/account_print_invoice.rml
/usr/lib/pymodules/python2.7/openerp-server/addons/report_intrastat/report/invoice.rml
/usr/lib/pymodules/python2.7/openerp-server/addons/hr_timesheet_invoice/report/cost_ledger.rml
/usr/lib/pymodules/python2.7/openerp-server/addons/hr_timesheet_invoice/report/account_analytic_profit.rml
/usr/share/pyshared/openerp-server/addons/account_invoice_layout/report/special_message_invoice.rml
/usr/share/pyshared/openerp-server/addons/account_invoice_layout/report/report_account_invoice_layout.rml
/usr/share/pyshared/openerp-server/addons/account/report/account_print_invoice.rml
/usr/share/pyshared/openerp-server/addons/report_intrastat/report/invoice.rml
/usr/share/pyshared/openerp-server/addons/hr_timesheet_invoice/report/cost_ledger.rml
/usr/share/pyshared/openerp-server/addons/hr_timesheet_invoice/report/account_analytic_profit.rml

I'd like to work on a better layout for our invoices, but unsure which file to change. Above I've searched for *.rml and then filtered through a grep for 'invoice'. Which of these files would be the one I need to change and do I need to do anything additional after editing the file (compile, build... ??)?

1

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 4/23/13, 10:14 AM

You might want to keep your modified file separate from the default ones.

Procedure you want to follow:

  • Create new module, with your report
  • upload module to /addons directory
  • install the module within openERP
  • change the path for the specific document/report at:

    • Settings -> Actions -> Reports
    • Search for the document you changed and click on it
    • Click on the button 'Edit'
    • Modify the text behind 'Report File'.

    Example: The location is addons/my_module/report/myrep.rml. So you type my_module/report/myrep.rml

Hopefully the above procedures are clear enough for you to fix your issue.

Thanks Patrick, but it's still not clear to me whether I should be starting from the addons folder under "/usr/share/pyshared/openerp-server/" or the one under "/usr/lib/pymodules/python2.7/openerp-server/". It doesn't look like one is a link to the other...

Zeeland Integration Solutions, Julian Isaac
on 4/23/13, 10:23 AM

Seems like you should take that one from: /usr/share/. The other one is for libarys (/usr/lib/)

Andreas Maertens
on 4/23/13, 10:57 AM

I use the addon from /usr/lib/.... All my own modules are placed there, and I don't have any issues. Just use sudo cp -r <source>/ /usr/lib/pymodules/python2.7/openerp/addons/ to copy your own module there.

patrick
on 4/23/13, 1:05 PM

OK, well I tried putting the new module into the /usr/lib... path and it didn't show up. Added the module to /usr/share... path and it appeared after updating the module list. So I guess the answer to the first part of the question (for me at least) is create the new module dir under "/usr/share/pyshared/openerp-server/addons"

Zeeland Integration Solutions, Julian Isaac
on 4/30/13, 6:45 AM

So is my solution correct? Please mark it to help other users find the right things quicker. ;)

Andreas Maertens
on 5/3/13, 11:06 AM

Does anyone have a complete example of a very simple new module that they can share? One that just has a modified report would be ideal. I've looked at what documentation I can find, and learning how to create an add-on seems like a lot of work just to change the text of a report.

Chris Dennis
on 5/3/13, 12:19 PM
0

Andreas Maertens

--Andreas Maertens--
912
| 5 5 7
Finsterwalde, Germany
--Andreas Maertens--

I develop odoo8.0 modules

Andreas Maertens
On 4/23/13, 10:59 AM

The one you search for is: /usr/share/pyshared/openerp-server/addons/account/report/account_print_invoice.rml

As patrik said it is better to create a new addon.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/23/13, 9:38 AM
Seen: 3549 times
Last updated: 8/7/15, 4:44 AM