How to Fix the “DNS_PROBE_FINISHED_NXDOMAIN” error on macOS?

I got a brand new MacBook few weeks ago and I have been having an DNS_PROBE_FINISHED_NXDOMAIN  error while trying to access one of our web apps at work.

After some time researching the cause of the error, I found out that it was due the DNS settings on my MacBook for the Wifi network I was using. If you are having the same issue, here is how I solved it:

  • Open System Preferences… 
  • Click on Network

  • With WiFi selected in the service column, click on the Advanced… button.

  • In the Advanced… window, click on the DNS tab. It should look like below

  • Under the DNS Servers column, click on the + icon to add a new DNS server address. Add the 8.8.8.8
  • Add also the 8.8.4.4. address.
  • Reorder the addresses as by dragging and dropping them as below:

  • Click on the OK button
  • To finalise, click on the Apply button.

That’s it! Refresh the web page you are trying to access in your browser and it should not work.

 

 

Tudun Wada, Nassarawa, Nigeria
84°F

Also on:

Installing Third Party Odoo Apps/Modules

Odoo version 11 comes with 31 apps that cover most use cases but they are situations when you will need a feature not offered by these default apps. That’s why you have the Odoo App Store, where you will find all kinds of apps or modules.  In this tutorial we will download and install the Database Cleanup module.

  • Go to the Odoo App Store.
  • Search for the App you want or go directly to Database Cleanup
  • Click on the Download the button.
  • Unzip the database_cleanup-11.0.1.0.0.zip file and copy the folder in the odoo/addons/ directory.
  • Stop ( Ctrl+c ) and restart the Odoo server ( ./odoo-bin )
  • Go to http://localhost:8069/
  • Activate Developer mode by going to Settings > Dashboard. Click on the Activate Developer mode link.

The left sidebar should be updated like this:

Click on “Update Apps List” to update the List.

The newly added module will not appear immediately in the Apps list.

To find it, search it in the search bar as below.

We are not able to find the module. The reason for this is because we are using the “Apps” filter in the search bar. Database Cleanup is a module, and not an app. Remove the filter and search again.

Now, you can click on the Install button to install the newly added module.

Happy Odoo’ing!

 

Odoo – AttributeError: ‘NoneType’ object has no attribute ‘id’

The error  AttributeError: 'NoneType' object has no attribute 'id' occurs when you uninstall one of the apps, most likely the Discuss app. After trying installing and uninstalling different apps (Projects, Inventory Management, Manufacturing, Employee Directory, etc.) I noticed that this error occurs only when you uninstall the Discuss app.

So far, the only solution I found was to drop the database.

Connect to the postgres database: psql postgres (Note: you cannot be connected to the database you want to drop)
Drop the database DROP DATABASE databasename;
Quit postgres \q

Restart the Odoo server with ./odoo-bin  and open localhost:8069 in your browser. Odoo will ask you to create a new database.

Now, this solution worked for me as I just installed Odoo and had only the sample data yet. But for anyone who has live data in the database, a better solution might be recommended.

Update:

A better solution is to make sure you have the Database Cleanup module installed be installing/uninstalling apps. You can see it with this tutorial here.

Assuming that you still have the error occurring, go to Settings > General Settings > Database cleanup > Purge obsolete tables

Click on the Select lines button.

Check the “mail_compose_message” line and click on Purge in the Action drop-down.

This should fix the issue. You should now be able to install new apps.

 

How to Install Odoo on Mac OS using Homebrew

In this tutorial we will look into how to install Odoo on Mac OS using the package manager Homebrew.

Install Homebrew:

If you do not already have Homebrew set up on your system, you can install it by running the command below in the terminal:

To check that Homebrew is installed, run the command:

This should return something like:

Now that Homebrew is set up, let’s start installing the different packages we need to run Odoo.

Installing Python:

Odoo was written in Python so we need to install it. There is a version of Python that comes set up with every macOS installation but it is not supported by Odoo. So we need to install a new one. Run the command:

Installing Postgresql:

Odoo will need a database management system to store its data, we are going to use PostgreSQL.

Start the Postgres server:

This will start Postgres at port 5432. To make sure that it is running you can run the commands lsof -I:5432  or pg_ctl -D /usr/local/var/postgres status

Installing Less:

Less (which stands for Leaner Style Sheets) is a backwards-compatible language extension for CSS. We will be using npm (node package manager) to install it.

The node package manager is set up while installing node.js. We are going to use nvm (node version manager) to install node.js. So here are the steps:

  • Install nvm:  brew install nvm
  • Install node: nvm install node  (to install the latest stable version of node) or nvm install version_number  (to install a specific version of node)
  • Install less globally:  npm install -g less

Installing freetype:

Next, we need to install Freetype and other libraries

Installing the Xcode command line tools:

Installing Odoo:

Clone Odoo from the GitHub Repository.

Next, change directory into the odoo directory ( cd odoo ) and install the dependencies included in the requirements.txt file.

Tip: When working with Python dependencies, it is recommended to use virtualenv to avoid conflicts between different versions. 

Running the Odoo server:

After installing the dependencies, we can now run the Odoo server. Run the command below:

This will start Odoo at port 8069. Open the browser and go to localhost:8069.

You will be presented with this screen:

Setting up the database:

The final step is to create a database by filling out the form. If this is your first time installing Odoo, make sure you check the button “Load demonstration data” to get some sample data to work with.

If everything went right, you should have the screen below:

That’s it! You are all good to go. 

Troubleshooting:

Error 1: ValueError: unknown locale: UTF-8

You might get the error ValueError: unknown locale: UTF-8  when you run the command ./odoo-bin . To fix this issue, add the code below to your ~/.bash_profile

This will these environment variables LC_ALL and LANG.

Error 2: Internal Server Error

The Odoo server is running but when you open localhost:8069 in the browser you get an Internal Server Error. Chances that PostgreSQL is not running. Make sure it’s running with the command  lsof -I:5432  and if it is not you can start it with the command  pg_ctl -D /usr/local/var/postgres status

I hope you found this tutorial useful and please leave a comment below if you have any question.