Posts

Contact Us

Contact Details : E-mail : codeconcate@gmail.com

Postgres DB Backup & Restore

How to restore postgres db in terminal DB BACKUP: pg_dump -U user_role db_name > archive_name.sql DB RESTORE: psql -U user_role db_name < /directory/archive.sql or .dump or .tar

Display weekday of given date in Python

Display Week Day of Given Date : Getting Started:     * First We have to import  module such as datetime and calendar.           * Create new variable to store the string date.      * Convert the string date into datetime.datetime type using following code               datetime.strptime(<Date>,"%d/%m/%Y")      *  Call this function                 calendar.day_name[my_date.weekday()] > day_name :            1.An array that represents the days of the week in the current locale. >weekday :              1. The weekday() method is used to returns the day of the week (0 is Monday) for year (1970–...), month (1–12), day (1–31). Code :     >>> from datetime import datetime >>> imp...

Find System IP Using Python

⤷Find IP Address Using Python Open Terminal Goto pyton console Enter Following Codes. Source Code: Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.gethostbyname(socket.gethostname()) '127.0.1.1' * For find you ip u need socket package import that *  socket. gethostbyname ( hostname ) Translate a host name to IPv4 address format. The IPv4 address is returned as a string, such as  '127.0.1.1' . If the host name is an IPv4 address itself it is returned unchanged.  gethostbyname()  does not support IPv6 name resolution.

Google Drive Integration

Image
Google Drive Integration in ODOO Install Google Drive Module from apps. Goto settings and select General Settings. At the Bottom you can see Google Integrations. click Generate Google Authorization Code and it will navigate to gmail account and login your account . click allow to give access copy the following code and pase inside of odoo>general settings>google drive> After that u have to configure template For that create one Document file or PPT or Google sheet in Google Drive Save the file .Right click one the file u can see Share option click that and copy the link in Odoo click Configure u r template or goto settings>google drive>templates>add Enter Template name and choose module name like sale.order or crm.lead paste the link in template url.Save it and Goto that model Click Action(On the Top-Middle Form) You can see your google drive template name. Click That At first Time You w...

Learn Python

Websites for learn Python 1) https://supportuae.wordpress.com/ 2) http://www.wikihow.com/Open-Ports-in-Linux-Server-Firewall 3) http://www.nevprobusinesssolutions.com/odoo-how-to-overide-orm-method-name_get/ 4) https://stackoverflow.com/questions/36729200/hide-some-lines-in-odoo- treeview 5)http://databit-odoo-technical.readthedocs.io/en/latest/howtos/themes.html

How to update or reset password in odoo

How to update or reset password in odoo: Step 1:            # Goto Python terminal. Or Type ctrl+alt+t . Step 2:             # Goto postgres user.                       ⇛ sudo su postgres Step 3:             #Goto your Database(DB)                      ⇛ psql database_name Step 4:            #Enter a Query                        ⇛ select * from res_users; Step 5:            # Find Your username from the results and note it down Your  id            Result:                      id     bool     username      ...