Thursday, February 8, 2018

the right way to write docker-compose, charing!

version: '2'

services:

  odoo:
    image: odoo:9
    container_name: myevo_odoo
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./myevo_odoo_addons:/mnt/extra-addons
    environment:
      - PYTHONUNBUFFERED=1
      - user=odoo
      - password=odoo
  db:
    image: postgres:9.5.10
    container_name: myevo_db
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db-data:/var/lib/postgresql/data/pgdata
volumes:
  odoo-web-data:
  odoo-db-data:

VIM in PowerShell

install in admin and select full installation

New to vagrant and its really cool

I always heard this name before and I thought its another technology and not relevant. So I didn't bother to learn.

But now, when I read the documentation its all about development thing, like the docker for containerization and vagrant for virtual machine.... COOL!

So, I hopped in youtube find a nice and easy to learn how to install vagrant. I found this link below.
https://www.youtube.com/watch?v=PmOMc4zfCSw&t=178s


Everything went well until I type the command. vagrant ssh, boom! permission denied. It took me at least 5 hours including lunch time break :)

Finally, I got it working. fix some permission on authentickey and enabling some settings, and blah blah blah..
https://groups.google.com/forum/#!topic/vagrant-up/mUNB182dY24

Eureka!

Finally, I can ssh without opening a real virtual machine. soooooo coooolllll!!!!

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

free online comma separating tool

https://delim.co/#