Odoo Help

1

Best practice for major changes in reports

By
Kenneth Hansen
on 4/19/16, 5:44 AM 528 views

Hi

As part of customizing the reports in Odoo to match our current layout for invoices,I have to make some major structural changes to the default invoice report template.

As I understand I have to write an addon for Odoo and use xpath to replace the parts I want to change.

Since I have to move multiple parts of the report to a different positon, I figured the easiest way would be to just create an xpath expression that targeted the entire template and the copy the contents of the original invoice template and modify the contents from there.

Another solution would be to target the individual parts of the report and create blank replacements for the parts that require it, which I think gives a lot of code that would not make sense.

My question is now what the best practice is when I have to move multiple parts of the report to a different location?        

0

Ray Carnes

--Ray Carnes--
17486
| 9 7 9
Atlanta, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0.

Completed Odoo Functional and Technical Training.

Major Skills:

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 2/10/17, 11:24 AM

You don't necessarily have to write something if all you want to do is make changes to an existing report.

You can do it via the UI (create a new QWEB view that inherits and extends the base view).  Conceptually it is doing what your addon would do, but it may be easier.

See http://ursainfosystems.com/homesite/upgrade-safe-changes-to-odoo-views/ for the same strategy for regular views.

Your approach depends on what other modules may change the same report.

It is more polite to change just the parts you need, even if this means twelve indivudual xpath changes over one big one.  If you are the only one changing the report, and you won't install other moduels that will, then one big change is fine.

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 4/19/16, 5:44 AM
Seen: 528 times
Last updated: 2/10/17, 11:24 AM