d634fbd9ab432bf7bb35320fd044c0373ecfda2e
So that was a fun one: mock.patch calls would regularly fail refusing to find the addon in odoo.addon (e.g. essentially getattr(odoo.addon, 'account_budget' deep within the bowels of mock). Turns out the answer is that our import hooks would not be used for many imports: while in Python 2, sys.meta_path is empty and the default finders are run after all meta_path finders fail as noted by the documentation[0]. However when the import system was rewritten in Python 3.3[1] meta_path was "despecialised" and the default finders were moved to meta_path rather than be a hidden part of the import machinery[2]: > sys.meta_path and sys.path_hooks now store all of the meta path > finders and path entry hooks used by import. Previously the finders > were implicit and hidden within the C code of import instead of > being directly exposed. The result of this change is that ``sys.meta_path.append`` means the default finders should take priority and the custom ones should be fallback. This is the exact opposite of what we want. Fix issue by ``sys.meta_path.insert``-ing our finders at the start of the path rather than appending them at the end. This should change nothing in Python 2 but seems to fix the issue in P3. [0] https://docs.python.org/2/library/sys.html?highlight=meta_path#sys.meta_path [1] https://docs.python.org/3/whatsnew/3.3.html#importlib [2] https://docs.python.org/3/whatsnew/3.3.html#visible-changes
…
…
…
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
If you are a developer you may type the following command at your terminal:
wget -O- https://raw.githubusercontent.com/odoo/odoo/master/setup/setup_dev.py | python
Then follow the developer tutorials
For Odoo employees
To add the odoo-dev remote use this command:
$ ./setup/setup_dev.py setup_git_dev
To fetch odoo merge pull requests refs use this command:
$ ./setup/setup_dev.py setup_git_review
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%