I was trying to inject some custom code on logout event. My code was never executed though. Finally I got it working thanks to Xavier Morel (see my question on stackoverflow).
Here is the clue: you can “easily” inject an handler for a given event (openerp-web specific ones) by doing like this:
openerp.yourmodule = function(openerp) {
openerp.webclient.on_logout.add_first(
function () {
alert('thatsme!');
}
);
}
You must pay attention to 2 things particularly:
This last point is among the few informations you find in the not-so-official docs contained into the web module (see my previous blogpost on how to get them).
Using “add_first” I’m adding an event handler for the logout event which will be executed before any existing handler.
If you look at the original code of the web module you’ll find other “hooks” like “add_last” which in turns add your handler at the end of the queue.
Even if it’s not yet available on the web (don’t ask why…. :S) you can view the new OpenERP web client documentation on your machine. That’s what you have to do in order to get it:
first of all install sphinx if you don’t have it in your system (assuming you are using a linux system):
$ sudo pip install sphinx
or
$ sudo easy_install sphinx
then you have to compile the docs. Go to the web package doc folder:
$ cd web/trunk/doc
(if you have downloaded OpenERP trunk following elbati’s how-to you’ll have the web client in this path)
and run
$ make source html
That’s it! Now you can browse the docs by going to the newly generated folder web/trunk/doc/build/html and opening index.html into your favorite web browser.
As any other OpenERP documentation is quite un-finished but it’s a good starting point for skimming trough the new web client capabilities.
UPDATE: docs are now available here: http://planet.domsense.com/docs/openerp-web/en/index.html
To help you open the 2012 fiscal year with OpenERP, Camptocamp just made a video!
Should you need further information on this process, please do not hesitate to contact our team!
On November 24th I had the pleasure to explain our experience in the creation and development of our company at Tecnocampus de Mataró in the production and operations course, invited by Diego Bartolomé from tauyou.
It was an encouraging experience which I hope I can repeat in the future. We must also thank the collaboration of Alex from Planetronic who answered the questions of some students who made an excellent work studying NaN·tic's case. By the way, you can watch their presentation here.
There, I also met Alex Araujo who recorded and edited the talk and a small interview (in Catalan) that you can see below (announcement here). Also you can see the original video that was streamed live!
We have been rather busy implementing OpenERP for a number of our customers and I have been tweaking and customising and extending it all over the place. It is a great fun product to work with, very flexible and Python is a really nice language to use. One thing I have been finding is that as a developer I really want to know more about the fieldnames and field values that are stored behind the scenes on an object, I want a command line utility to allow me to inspect a particular document and figure out why it displays what it displays etc. There might be one out there somewhere, but I figured it would be more fun to write my own, so I did. The best way to show how it works is with an example
./erppeek.py -d testdb -u admin -p admin -m res.users 1
in it’s simplist form that will connect to an openerp server running on localhost, (port 8069) with username admin and password admin to a database called testdb. It will then return all fields for the model res.users with id 1 (which will be the admin user)
./erppeek.py --server 'http://myserver.com:8069' -d testdb -u admin -p admin -m res.partner 1 3 5
This connects to a remote server called myserver.com and returns all fields from partners 1, 3 and 5
./erppeek.py --server 'http://myserver.com:8069' -d testdb -u admin -p admin -m res.partner -f name -f city 1 3 5
and now we are using the -f field parameter to return just the name and city (and it always returns the id as well) of those partners
./erppeek.py --server 'http://myserver.com:8069' -d testdb -u admin -p admin -m res.partner -f name -f city -s "name like School" -s "city = Southampton"
This time it is not relying on us passing in a list of object IDs, but it is doing a search of the res.partner objects where the name field contains ‘School’ and the city field is equal to Southampton.
To grab a copy of this small but handy little utility please download it from launchpad and make it executable. It works fine on Ubuntu, and should work on most platforms with Python. Do let me know in the comments what you think of it and what else you would like it to do.
Security note – this does at the moment get you to enter a password on the command line, which means the password will be available in your bash history and other users on your computer looking at processes you are running. This doesn’t bother me much as I am only using it on local development databases with trivial passwords anyway, but you have been warned. If someone wants to help fix that then great.
Bien, antes que nada quiero agradecer a Ezequiel Fernandez en Argentina por compartir con la comunidad Hispana, sobre el uso de Aeroo Reports
http://openerpargentina.com.ar/EzequielFernandez/Report_aeroo
Y Sobre todo a el increíble trabajo de Allistek(http://www.alistek.com), ya que gracias a ellos tenemos una alternativa mas sencilla de configurar nuestros reportes que el motor de reportes RML.
En el foro en ingles se indica como compilar el instalador de OpenERP para Windows con la versión 2.6 de Python, para ser sincero tuve que escarbar unos cuantos días para lograr hacerlo, con algunos tropiezos y frustraciones…, pero bueno voy a tratar de dar una guía de como habilitar aeroo reports para los usuarios de Windows
Básicamente el problema de la instalación en Windows, es que el instalador all-in-one o el del server que encontramos en la pagina de openerp esta compilado con Python 2.5, para poder conectarse con la librería de PyUNO(Necesario por el Aeroo Reports), es necesario que las versión sobre la que corre el Open sea las misma que la de la libreria y ademas debemos agregar en las librerias necesarias para el modulo(https://launchpad.net/aeroolib, Genshi, entre otras)
Primero para poder lograr compilar el instalador de openerp necesitan instalar las siguientes dependencias, que las pueden encontrar en este link
https://code.launchpad.net/~openerp-groupes/openerp/win-installer-trunk
Pueden bajarlo por medio del Bazaar, o descargar cada una de las dependencias en la carpeta 2.6.
Les recomiendo usar windows XP SP3 para este procedimiento.
Instalan Todas las librerías
Ahora, hay que corregir un error en la libreria PyXML que fue escrita antes de la aparición de python26, que usa un nombre de variable que es una palabra reservada en python26, asi que deben corregir dos archivos, que se encuentran en esta ruta
C:\Python26\Lib\site-packages\_xmlplus\xpath\ParsedAbbreviatedAbsoluteLocationPath.py -> en la linea 27 y 28 es necesario reemplazar la palabra “as” por cualquier otro nombre, en mi caso solo coloque un 1 adelante de la palabra
C:\Python26\Lib\site-packages\_xmlplus\xpath\ParsedAbbreviatedRelativeLocationPath.py -> en este archivo esta en la linea 31,32
Algo que también cabe recalcar antes de compilar, es que la libreria nativa de Python26 de xml tiene unas clases en una carpeta que se llama etree, el PyXML no usa esta librería por defecto así que debemos copiarla en la carpeta para poder tener la librería al momento de ejecutar openerp
En esta carpeta C:\Python26\Lib\site-packages\_xmlplus, debemos pegar la carpte “etree” que esta en la ruta C:\Python26\Lib\xml, asi no tendremos problemas con nuestra instalación
Descargamos los Fuentes, desde el sitio de openerp o pueden realizarlo a través del bazaar
http://www.openerp.com/download/stable/source/openerp-server-6.0.3.tar.gz
Descomprimimos los fuentes, preferiblemente en la raiz(C:\).
Luego desde la consola, entramos a la carpeta donde esta descompreso los fuentes del open-erp ejecutamos este comando “c:\Python26\python.exe setup.py py2exe”
Despues dentro de la carpeta win32 ejecutamos el mismo comando
Debido a que el el script de open procesa las dependencias de sus librerías, no incluye a genshi ni a aeroolib, así que tenemos que agregarlas manualmente. Luego de ejecutar los comandos de arriba, en nuestra carpeta se debe haber creado una llamada “dist”, dentro esta lo que son los ejecutables como tal del openerp para windows, existe un archivo library.zip que es donde estan algunas librerias, debemos agregar a este zip las carpetas de nuestras librerías que para mi ejemplo estan en:
Luego de esto, ya estamos listos para generar el instalador para el server, esto lo hace el programa NSIS, lo abrimos y damos clic en “Compile Script”, luego de esto el software se encargara de crear el programa instalador para windows
Bueno después de esto tenemos que copiar nuestros módulos dentro de la carpeta addons en windows, o la podemos agregar a nuestro instalador, como sea, ya podemos usar los módulos en https://launchpad.net/aeroo.
En una segunda entrega espero poder hacer una guia de como conectarse con PyUNO para convertir en PDF y otros formatos los reportes de Aeroo Reports
Y para los que no quieren pasar por todo este tramite, les dejo es link donde pueden encontrar el instalador del ejercicio https://rapidshare.com/files/2332288264/openerp-server-setup-6.0.3.exe(Corregido)
Saludos
Christopher Ormaza
Ecuadorenlinea.net
Thanks to Olivier Dony (and lep who indicated it to me), here you have a quick way to setup a development environment with the current trunk version of OpenERP (6.1).
Download the script:
$ bzr cat -d lp:~openerp-dev/openerp-tools/trunk setup.sh | sh
Run the script:
$ make init-trunk
Wait…
Run:
$ make server
Go to http://localhost:8069
Or to localhost:8069/mobile if you want to try the mobile interface (or even to localhost:8069/?kitten=1…)
In standard OpenERP, you can choose a fiscal position for every partner, and your choice will be used when you select a Partner in an Invoice or Sale Order. In many situations it’s convenient to set a default position for all partners belonging to a specific country.
The module we developed is called account_fiscal_position_country, and can be found on apps.openerp.com.
Configuration
Go to Sales > Configuration > Address Book > Localisation > Countries.
Choose a country, and enter the default Fiscal Position for that country.
Usage
Done that, when you create a Sale or Purchase Invoice and select a Partner, the Fiscal Position you defined for the country of the Partner will be selected. Note that the standard OpenERP behaviour is still defined: if you set a specific Fiscal Position for that Partner, that one (and not the one from the Country) will be used.
Sale Orders
To get the same functionality in Sale Orders, install the module account_fiscal_position_country_sale as well. The modules are kept separate to minimize dependencies.
Of course, feedback is welcome! You can use the bug tracker in launchpad for that:
OpenERP is all the rage among open source ERP’s but its native import/export have limitations when it comes to data integration. Server side OpenERP import/export is powerful but not so easy to get started and get interfaced. On the contrary, the famous Kettle open source ETL from Pentaho connects to almost anything, any SGBD thanks to the JDBC connectors, any CSV, Excell files…
With TerminatOOOR you have all the power of the full OpenERP API right inside your ETL data in/out flow. You can do any Create Read Update Delete operation enforcing the access rights of OpenERP. But you are absolutely not imited to that, in fact you can just do anything you would do with your OpenERP client: click buttons, perform workflow actions, trigger on_change events… This is because OOOR gives you the full access to OpenERP API.

We created TerminatOOOR back in late 2009 for a customer doing ecommerce sales on several different channels: Magento, OSCommerce, Amazon, Ebay, using several payments gateways and bank interfaces. Later we continued to use it in similar projects where integration with other systems would make the difference. It’s also used a lot for loading your data into OpenERP when you migrate to it. But those are just a few possibilities… We finally got the time to package TerminatOOOR for an easier installation and we also documented it extensively.
All right, so don’t wait any longer and read the detailed documentation You might also be interested in downloading it or looking at its source code
We would also here thank all the great people who made this possible: the Kettle guys, Slawomir Chodnicki who revolutionized the Ruby Kettle plugin, all the JRuby team and specially people like Charles Headius Nutter, Yannick Buron for helping in the first doc version a year ago, CampToCamp and Ting.es for their testing and patches on OOOR and all the people who tested and helped in a way or another.
Enjoy!
We developed a new module to better handle the follow-ups. Its name is account_followup_choose_payment and it is configurable through account_followup but, unlike account_followup, it allows to send follow-ups selecting the single (overdue) payments you want to notify to customers.
The module provides two main macro-functionalities:
Let’s see how to configure and use the module.
First of all, you have to configure the follow-up levels. Going to
Accounting > Configuration > Miscellaneous > Follow-Ups
you open the follow-ups list and can create a new one.
For instance, my follow-up has three levels. This is one of them:
Also, I configured the following two payment terms
I issued four invoices:
For Thomas Winteler, I used the first payment term (’25% at 14 net days, remaining 30 days end of month’). For Domsense Srl, the ’30 Days End of Month’.
Thanks to account_due_list, you can see the list of payments with their due date, if any. You can find the list at
Accounting > Journal Entries > Payments
Now we can follow-up some payment. Go to
Accounting > Periodical Processing > Billing > Open Follow-Ups
If you print the follow-up at 30 November 2011, you’ll find the following situation:
We developed a new module to better handle the follow-ups. Its name is account_followup_choose_payment and it is configurable through account_followup but, unlike account_followup, it allows to send follow-ups selecting the single (overdue) payments you want to notify to customers.
The module provides two main macro-functionalities:
Let’s see how to configure and use the module.
First of all, you have to configure the follow-up levels. Going to
Accounting > Configuration > Miscellaneous > Follow-Ups
you open the follow-ups list and can create a new one.
For instance, my follow-up has three levels. This is one of them:
Also, I configured the following two payment terms
I issued four invoices:
For Thomas Winteler, I used the first payment term (’25% at 14 net days, remaining 30 days end of month’). For Domsense Srl, the ’30 Days End of Month’.
Thanks to account_due_list, you can see the list of payments with their due date, if any. You can find the list at
Accounting > Journal Entries > Payments
Now we can follow-up some payment. Go to
Accounting > Periodical Processing > Billing > Open Follow-Ups
If you print the follow-up at 30 November 2011, you’ll find the following situation:
Now, you can select which payment to follow-up. I select them all, and run the wizard Follow-UP. Here is the result.
Moreover, opening Sent Follow-Ups, you can see the list of previously sent follow-ups, with date and level. By that list, at any time, you can select and re-print the follow-ups, through the Sent Follow-Up wizard.
| From 15:30 | Arrival and Coffee | ||
| 16:00 | Welcome by Luc De Meyer, Managing Partner, Noviat nv/sa | ||
| 16:15 | OpenERP Business Model presentation by Marnix Coenaerts, OpenERP | ||
| 16:30 | Introduction OpenERP V6 by Marnix Coenaerts, OpenERP | ||
| 17:00 | Coffee Break | ||
| 17:20 | OpenERP Customer Cases by Luc De Meyer | ||
| 17:40 | Business Case ecoworks by Sander De Kegel, CFO ecoworks | ||
| 18:00 | Questions and Answers | ||
| 18:30 | Networking & Refreshments |
| From 15:30 | Arrival and Coffee | ||
| 16:00 | Welcome by Marc Pirenne, Managing Partner, Noviat nv/sa | ||
| 16:15 | OpenERP Business Model presentation | ||
| 16:30 | Introduction OpenERP V6 | ||
| 17:00 | Coffee Break | ||
| 17:20 | OpenERP Customer Cases by Luc De Meyer | ||
| 17:40 | Cash Management with OpenERP | ||
| 18:00 | Questions and Answers | ||
| 18:30 | Networking & Refreshments |