This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rules for M2O fields, three possibilities: | |
uom_id => the value has to be the exact name of the record (e.g. "Units") | |
uom_id/id => the value has to be what we called an external ID (e.g. "uom.product_uom_unit") | |
uom_id/.id => the value has to be the integer ID of the record (e.g. 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/odoorpc/error.py b/odoorpc/error.py | |
index d359d7f..1ade192 100644 | |
--- a/odoorpc/error.py | |
+++ b/odoorpc/error.py | |
@@ -21,6 +21,16 @@ | |
"""This module contains all exceptions raised by `OdooRPC` when an error | |
occurred. | |
""" | |
+import sys | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Copyright 2016 ABF OSIELL <http://osiell.com> | |
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | |
import sys | |
from openerp import models, fields, SUPERUSER_ID | |
from openerp.modules.registry import RegistryManager | |
MODELS = ['my.model1', 'my.model2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Script to bootstrap an Odoo database (8.0).""" | |
import odoorpc | |
# Odoo connection | |
SUPER_PWD = 'admin' | |
HOST = 'localhost' | |
PORT = 8069 | |
DB = 'my_db' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
account.payment | |
cancel | |
post | |
account.move.line | |
process_reconciliations | |
process_reconciliation | |
reconcile | |
create_analytic_lines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Script to fetch the schema of all data models from an Odoo server. | |
Then, it can compare two schema to show the differences between them (fields | |
added, modified or removed). | |
""" | |
import sys | |
import json | |
import oerplib |