Skip to content

Instantly share code, notes, and snippets.


Daniel Blanco Danisan

View GitHub Profile
View Odoo - Rename an addon without losing

Odoo - Rename an addon without losing data

Rename addon

  • Change addon name field
  • Change README.rst file
Danisan /
Created Jan 7, 2016 — forked from bealdav/
Odoo csv / xml converter
# -*- coding: utf-8 -*-
# based on this code
# convert Odoo csv files in xml files
# csv is easy to maintain but xml data have noupdate feature
# Limitations:
# - relation field One2many is NOT supported
# - csv should have 'id' as first column
#### Check does system use upstart
echo '' && whereis upstart | grep -q 'upstart: /' && echo 'You can use UPSTART' || echo 'There is no upstart in your system. Use SUPERVISORCTL instead'
env | grep LANG
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
dpkg-reconfigure locales
View odoo-api.markdown


from openerp import models, fields, api, _

class MyModel(models.Model):
    _name = 'mymodule.mymodel'
    # Fields are declared as class attributes:
    char = fields.Char('Char', 64)        # name, size
    text = fields.Text('Text')
View script.php
// get the webhook response
$body = @file_get_contents('php://input');
// decode the json data into a php object
$response = json_decode($body);
// the webhook property tells us exactly which webhook event was fired
// so let's create a case for a few webhooks