Developing against the bleeding edge – Odoo 8.0 (before release)

I’ve been working on a project using Odoo 8.0 which at the time of writing isn’t fully released yet (the Odoo).  These are some notes on working at the bleeding edge as the release stabilises.

Working with a git version that is changing frequently means you need to upgrade your database on a fairly regular basis.  To do that the -u all command to openerp is very handy.

./openerp-server -d mydatabase -u all --stop-after-init --config=/etc/openerp/openerp-server.conf

The one feature we found caught us out initially was with the new reports.  The QWeb and bootstrap 3 were fine, it was the caching that surprised us.  As developers we tend to be trying lots of incremental changes on reports and at first it looked like our changes weren’t working.  Luckily we realised it was actually a new feature, caching.  This can be turned off against the reports assuming you have the access to the technical features.  It’s not on against every report, but invoices are one area it is used.  Partly because the reports are intended to be legal documents that shouldn’t change once they have been printed.

At the moment these are the open bugs on github I’m tracking.  If you need to apply one of the patches to get on with things just stick ‘.patch’ onto the github url and you will have a patch file you can apply in the usual fashion, i.e. patch -p1 < nnnn.patch

Some of these are caused by constant upgrading on the bleeding edge, others are things I hope get fixed before the final cut.  Note that these pull requests may not be the best way to fix the issues, but they do generally fix the symptoms so I have found them useful for getting on with my own development.

Issue 1110

Error context:
View `product.template.form`
[view_id: 259, xml_id: product.product_template_form_view_variant_button, model: product.template, parent_id: 252]

https://github.com/odoo/odoo/issues/1110

Issue 1267 – Fixed

KeyError: 'section_id'

https://github.com/odoo/odoo/pull/1267

Issue 1187

This one is just a tweak to the writeability of a few fields.

https://github.com/odoo/odoo/pull/1187

Issue 1284 – Fixed

XML RPC and None values

https://github.com/odoo/odoo/pull/1284

About these ads
Tagged ,

2 thoughts on “Developing against the bleeding edge – Odoo 8.0 (before release)

  1. Dario says:

    Hey! I’m working on a project on Odoo 8 now as well. I’d like to know (if you figured out) how to start the server on debug mode in order to use python’s pdb. I can’t find a way to do so, and no one seems to be talking about it!

    Thank you for your time.

    • colinnewell says:

      That’s actually pretty easy. You just run the server with the --debug flag. That will cause it to step into the debugger when an unhandled exception is thrown. You can also put your own break point into the code by inserting a ‘import pdb; pdb.set_trace()‘. Remember to remove those when you have finished with them however as they will cause the server running normally to die.

      The details may vary depending on the exact setup of your users/file locations, but in principle you just stop the service running normally and su to be user odoo runs as normally to run it.

      service stop openerp
      su - openerp -s /bin/bash
      /opt/odoo/openerp-server --config=/etc/openerp/openerp.conf --debug
      

      Run it with –help to see all the configuration options. There is lots of logging that can be cranked up that can be very helpful.

      This is actually the same as the previous versions. I’ve been using this feature since version 6.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 64 other followers