Monday, January 29, 2018

Keepass + KeeAnywhere plugin

I used KeePass long time ago and until now I'm still using it.

It's a great tool to save your password encrypted. At my home, I saved the database file in my google drive. But when I'm outside I can't retrieve my password without opening the database file in my google drive.

For this, I want to explore how to run KeePass on my USB stick and at the same time synchronize it in my google drive where my database file is located.

I found a way to succeed my idea through the help of plugin called KeeAnywhere
https://keepass.info/plugins.html#keeanywhere

you just download the zip file, unzip it and load everything on the plugin folder in your keepass.
click KeeAnywhere


Add google drive

Open from Cloud Drive


and Voila, is it stupendous! 


Saturday, January 27, 2018

How to change report.pdf in Odoo


from Delivery Report.pdf to PO00001.pdf



class report_controller(main.ReportController):
        @http.route(['/report/download'], type='http', auth="user")
        def report_download(self, data, token):
            order_obj = http.request.env['stock.picking']
            normalize_obj = unicodedata.normalize('NFKD', data).encode('ascii','ignore')
            if 'delivery_report' in normalize_obj:
                reportname = normalize_obj.split('/report/pdf/')[1].split('?')[0]
                reportname, docids = reportname.split('/')
                assert docids
                object = order_obj.browse(int(docids))
                response = super(report_controller, self).report_download(data, token)
                response.headers.set('Content-Disposition', 'attachment; filename=%s.pdf;' % object.origin)
                return response


fixed bug:
pls see on red

Reference:

Friday, January 26, 2018

How to install Docker compose



STEP 1: Download Docker compose

sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose


STEP 2: Execute permission

sudo chmod +x /usr/local/bin/docker-compose



docker-compose --version

Thursday, January 25, 2018

Next level Kubernetes

I was thinking to learn something new today and I've got this feeling to take a look again with Kubernetes.

I found this tutorial that is very good and he demonstrates from start zero to finish.

Here's the link
https://www.youtube.com/watch?v=b_fOIELGMDY


updated: 2/11/2018
https://www.youtube.com/watch?v=gpmerrSpbHg

Sunday, January 14, 2018

Docker issue


1. I had experience once in a blue moon and there's nothing way than to stop/start the docker service. Viola!

Issue:
Error response from daemon: cannot stop container: odoo9: Cannot kill container 0a08b9aefcaa2db053330cbd2b80591a81e68e4027cf6183338fc2700dd940bb: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused": unknown



solution:
sudo /etc/init.d/docker stop
sudo /etc/init.d/docker start





2. When I tried to run latest odoo11 and postgres 10 using docker-compose , I knew I perfectly copied from my configuration in odoo 9 setup but when I hit enter. Bang! issue found.
After a few googling for answers, I think there's some problem with volume. I guess. :)

Issue:

psycopg2.OperationalError: FATAL:  password authentication failed for user "odoo"


Solution:
docker volume rm malphi_malphi_odoo-db-data

Reference:
https://stackoverflow.com/questions/29580798/docker-compose-environment-variables




3. When I installed a new fresh centos environment in vbox. Everything is new, even docker :)
I have this issue everytime I open the virtual box that docker is not running.


Solution:
sudo systemctl start docker
sudo systemctl enable docker

Reference:
https://docs.docker.com/install/linux/linux-postinstall//

Friday, January 12, 2018

Print output does not reflecting in the log

It took me a couple of days just to figure out this problem. I know its a simple as you think but I'm wondering why can't show the print output in the log.

For many test attempt that I have done, I finally figure it out.

Simple.

environment:
      - PYTHONUNBUFFERED=1

that's it, just add this to docker-compose yml file.
Eureka!

Sunday, January 7, 2018

We will talk about NGINX

I have heard this NGINX a long time ago when I got here in my recent job but I don't know what exactly it is. I had a little knowledge that it will manage the proxy and that's it.

When I deployed docker in our SIT environment (my boss give me the opportunity to use my skill in docker). I heard again NGINX in our discussion and I asked this question. "What is exactly is NGINX?" my boss replied. "Boy, it's a good time to learn something new" and so he explains.

We end up with docker deployed in SIT and installed Odoo environment as well but no NGINX.

Today, I learn this technology by watching youtube.

This link from Quentin Stafford-Fraser who explains very clearly about NGINX

free online comma separating tool

https://delim.co/#