Nov 27, 2018

odoo manual hide validate movement when "double-post" initial demand operations.

odoo manual hide validate movement when "double-post" initial demand operations.



<script>
        if (odoo.session_info["is_superuser"]==false) {
        $(document).bind('DOMSubtreeModified', function () {
               $('.o_list_number').each(function() {
                   if ($(this).data('field')=="weigh_pcs"){
                       if ($(this).text()=="1,000") {
                           $('span:contains("Validate")').parent().addClass("o_form_invisible");
                           alert("Mohon di check ulang data yang double, lalu refresh sebelum  validate ");
                       }
                   }
        
               });
        });
        }
        </script>
Read more ...

Sep 22, 2018

solved install nodejs but can not update npm module

the solution is
install nodejs without npm

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.
Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.
Run the following commands to remove all existing global npm modules, uninstall node & npm, re-install node with the correct defaults, configure the location for global npm modules to be installed, and then install npm as its own pacakge.
rm -rf /usr/local/lib/node_modules
brew uninstall node
brew install node --without-npm
echo prefix=~/.npm-packages >> ~/.npmrc
curl -L https://www.npmjs.com/install.sh | sh
Node and npm should be correctly installed at this point. The final step is to add ~/.npm-packages/bin to your PATH so npm and global npm packages are usable. To do this, add the following line to your ~/.bash_profile:
export PATH="$HOME/.npm-packages/bin:$PATH"
Now you can re-install any global npm packages you need without any problems.

Explanation of the issue

If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:
$ npm update npm -g
npm http GET https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/1.4.4
npm http 304 https://registry.npmjs.org/npm/1.4.4
npm ERR! error rolling back Error: Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node_modules/npm
npm ERR! error rolling back     at clobberFail (/usr/local/Cellar/node/0.10.26/lib/node_modules/npm/lib/utils/gently-rm.js:57:12)
npm ERR! error rolling back     at next (/usr/local/Cellar/node/0.10.26/lib/node_modules/npm/lib/utils/gently-rm.js:43:14)
npm ERR! error rolling back     at /usr/local/Cellar/node/0.10.26/lib/node_modules/npm/lib/utils/gently-rm.js:52:12
npm ERR! error rolling back     at Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back  npm@1.4.4 { [Error: Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node_modules/npm] code: 'EEXIST', path: '/usr/local/bin/npm' }
npm ERR! Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node_modules/npm
File exists: /usr/local/bin/npm
Move it away, and try again. 

npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node" "/usr/local/bin/npm" "update" "npm" "-g"
npm ERR! cwd /Users/dan/Google Drive/Projects/dotfiles
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /usr/local/bin/npm
npm ERR! code EEXIST
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/dan/Google Drive/Projects/dotfiles/npm-debug.log
npm ERR! not ok code 0

There's an NPM bug for this exact problem. The bug has been "fixed" by Homebrew installing npm in a way that allows it to manage itself once the install is complete. However, this is error-prone and still seems to cause problems for some people. The root of the the issue is really that npm is its own package manager and it is therefore better to have npm manage itself and its packages completely on its own instead of letting Homebrew do it.

Also, using the Homebrew installation of npm will require you to use sudo when installing global packages. Since one of the core ideas behind Homebrew is that apps can be installed without giving them root access, this is a bad idea.

about rimraf, this is solution :



# Create a script somewhere in your $PATH
echo 'exec rm -rf "$@"' >> /usr/local/bin/rimraf

# Make it executable
chmod +x /usr/local/bin/rimraf


taken from : https://gist.github.com/DanHerbert/9520689 

Read more ...

Sep 21, 2018

[SOLVED] Error: EACCES: permission denied



the issue are :

oh oh Error: EACCES: permission denied, open '/usr/lib/node_modules/serverless/node_modules/tabtab/.completions/serverless.bash'


npm package fails to install "npm ERR! Error: EACCES: permission denied"


can not install serverless on Mac Os


the solution is : 



sudo ln -sf /usr/local/Cellar/node/6.0.0/lib/node_modules/serverless/bin/serverless /usr/local/bin/serverless



Read more ...

Sep 2, 2018

create manual tabs on odoo 11 without snippet

just put this code to your view



<div>
                    <!-- Thumbnail -->
                    <div class="oe_snippet_thumbnail">
                        <img class="oe_snippet_thumbnail_img" src="/website_tabs/static/src/img/thumbnail.png" />
                        <span class="oe_snippet_thumbnail_title">Tabs</span>
                    </div>

                    <!-- Snippet Body -->
                    <section class="oe_snippet_body cst mt16 mb16">
                        <div class="container">
                            <div class="row">
                                <div role="tabpanel">
                                    <!-- Nav tabs -->
                                    <ul class="nav nav-tabs" role="tablist">
                                        <li role="presentation" class="active"><a href="#tab1" aria-controls="tab1" role="tab" data-toggle="tab">Text Block</a></li>
                                        <li role="presentation"><a href="#tab2" aria-controls="tab2" role="tab" data-toggle="tab">Text-Image</a></li>
                                        <li role="presentation"><a href="#tab3" aria-controls="tab3" role="tab" data-toggle="tab">Image-Text</a></li>
                                    </ul>
                                    <!-- Tab panes -->
                                    <div class="tab-content">
                                        <div role="tabpanel" class="oe_structure oe_empty tab-pane active" id="tab1">
                                            <section class="mb16">
                                                <!-- Text Block snippet -->
                                                <div class="container">
                                                    <div class="row">
                                                        <div class="col-md-12 text-center mt16 mb32">
                                                            <h2>A Great Headline</h2>

                                                            <h3 class="text-muted">A good subtitle</h3>
                                                        </div>

                                                        <div class="col-md-12 mb16 mt16">
                                                            <p>A great way to catch your reader's attention is to tell a
                                                            story. Everything you consider writing can be told as a
                                                            story.</p>

                                                            <p><b>Great stories have personality.</b> Consider telling a
                                                            great story that provides personality. Writing a story with
                                                            personality for potential clients will asist with making a
                                                            relationship connection. This shows up in small quirks like
                                                            word choices or phrases. Write from your point of view, not
                                                            from someone else's experience.</p>

                                                            <p><b>Great stories are for everyone even when only written for
                                                            just one person.</b> If you try to write with a wide general
                                                            audience in mind, your story will ring false and be bland. No
                                                            one will be interested. Write for one person. If it’s genuine
                                                            for the one, it’s genuine for the rest.</p>
                                                        </div>
                                                    </div>
                                                </div>
                                            </section>
                                        </div>
                                        <div role="tabpanel" class="oe_structure oe_empty tab-pane" id="tab2">
                                            <section class="mt16 mb16">
                                                <!-- Text-Image snippet -->
                                                <div class="container">
                                                    <div class="row">
                                                        <div class="col-md-6 mt16">
                                                            <h3>A Section Subtitle</h3>

                                                            <p>Write one or two paragraphs describing your product or
                                                            services. To be successful your content needs to be useful to
                                                            your readers.</p>

                                                            <p>Start with the customer – find out what they want and give
                                                            it to them.</p>
                                                        </div>

                                                        <div class="col-md-6 mt16"><img alt="Odoo text and image block"
                                                        class="img img-responsive shadow mb16" src=
                                                        "/website/static/src/img/text_image.png"/></div>
                                                    </div>
                                                </div>
                                            </section>
                                        </div>
                                        <div role="tabpanel" class="oe_structure oe_empty tab-pane" id="tab3">
                                            <!-- Image-Text snippet -->
                                            <section class="mt16 mb16">
                                                <div class="container">
                                                    <div class="row">
                                                        <div class="col-md-6 mt16"><img alt="Odoo image and text block"
                                                        class="img img-responsive shadow mb16" src=
                                                        "/website/static/src/img/image_text.jpg"/></div>

                                                        <div class="col-md-6 mt16">
                                                            <h3>A Section Subtitle</h3>

                                                            <p>Write one or two paragraphs describing your product,
                                                            services or a specific feature. To be successful your content
                                                            needs to be useful to your readers.</p>

                                                            <p>Start with the customer – find out what they want and give
                                                            it to them.</p>
                                                        </div>
                                                    </div>
                                                </div>
                                            </section>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
Read more ...

Aug 7, 2018

spynner vs pyppeteer vs requests vs firefox headless

memory usage : spynner vs pyppeteer vs requests vs firefox headless

febru@ubuntu:~$ ps_mem -p 41293
 Private  +   Shared  =  RAM used Program

  5.9 MiB + 394.5 KiB =   6.3 MiB python2.7
---------------------------------
                          6.3 MiB
=================================
febru@ubuntu:~$ ps_mem -p 41603
 Private  +   Shared  =  RAM used Program

 16.2 MiB +   2.3 MiB =  18.5 MiB python3.5
---------------------------------
                         18.5 MiB
=================================
febru@ubuntu:~$ ps_mem -p 41699
 Private  +   Shared  =  RAM used Program

 11.9 MiB + 538.5 KiB =  12.5 MiB python2.7
---------------------------------
                         12.5 MiB

=================================
febru@ubuntu:~ps_mem -p 22208
 Private  +   Shared  =  RAM used Program

  9.0 MiB +   1.6 MiB =  10.6 MiB python2.7
---------------------------------
                         10.6 MiB
=================================


the winner is SPYNNER ... yeeaaaaa  
Read more ...

Jul 18, 2018

SOLVED InsecurePlatformWarning: A true SSLContext object is not available.

in my case, its solved by :

sudo su :

pip install -U pip
pip install -U pyopenssl ndg-httpsclient pyasn1


Read more ...

Jul 17, 2018

just simple ocr

$ sudo apt-get update
$ sudo apt-get install autoconf automake libtool
$ sudo apt-get install libpng12-dev
$ sudo apt-get install libjpeg62-dev
$ sudo apt-get install g++
$ sudo apt-get install libtiff4-dev
$ sudo apt-get install libopencv-dev libtesseract-dev
$ sudo apt-get install git
$ sudo apt-get install cmake
$ sudo apt-get install build-essential
$ sudo apt-get install libleptonica-dev
$ sudo apt-get install liblog4cplus-dev
$ sudo apt-get install libcurl3-dev
$ sudo apt-get install python2.7-dev
$ sudo apt-get install tk8.5 tcl8.5 tk8.5-dev tcl8.5-dev
$ sudo apt-get build-dep python-imaging --fix-missing
$ sudo apt-get install imagemagick

sudo apt-get build-dep python-imaging --fix-missing



$ wget http://www.leptonica.com/source/leptonica-1.76.0.tar.gz
tar -zxvf leptonica-1.76.0.tar.gz
$ cd leptonica-1.76.0/
$ ./autobuild
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig


wget https://github.com/tesseract-ocr/tesseract/archive/3.05.02.tar.gz
$ tar -zxvf 3.05.02.tar.gz
$ cd tesseract-3.05.02/
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig

export TESSDATA_PREFIX=/usr/local/share/
sudo cp -r tessdata $TESSDATA_PREFIX

wget http://tessdata.projectnaptha.com/3.02/eng.traineddata.gz
gunzip eng.traineddata.gz
sudo cp -r eng.traineddata $TESSDATA_PREFIX


wget https://github.com/rhgraysonii/ocr_tutorial/archive/v0.tar.gz
$ tar -xf v0.tar.gz
cd python_ocr_tutorial-0/
sudo apt-get install python-virtualenv
$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt


ocr.py
===================
import pytesseract
import requests
from PIL import Image
from PIL import ImageFilter
from StringIO import StringIO


def process_image(url):
    image = _get_image(url)
    image.filter(ImageFilter.SHARPEN)
    return pytesseract.image_to_string(image)


def _get_image(url):
    return Image.open(StringIO(requests.get(url, verify=False).content))




curl -X POST http://localhost:5000/v1/ocr -d '{"image_url": "https://ecs7.tokopedia.net/img/product-1/2015/5/6/329033/329033_ea3477c4-f38e-11e4-ba78-9dda64efb121.jpg" }' -H "Content-Type: application/json"


cli.py
====================



import sys
import requests
import pytesseract
from PIL import Image
from StringIO import StringIO


def get_image(url):
    return Image.open(StringIO(requests.get(url).content))


if __name__ == '__main__':
    """Tool to test the raw output of pytesseract with a given input URL"""
    sys.stdout.write("""
===OOOO=====CCCCC===RRRRRR=====\n
==OO==OO===CC=======RR===RR====\n
==OO==OO===CC=======RR===RR====\n
==OO==OO===CC=======RRRRRR=====\n
==OO==OO===CC=======RR==RR=====\n
==OO==OO===CC=======RR== RR====\n
===OOOO=====CCCCC===RR====RR===\n\n
""")
    sys.stdout.write("A simple OCR utility\n")
    url = raw_input("What is the url of the image you would like to analyze?\n")
    image = get_image(url)
    sys.stdout.write("The raw output from tesseract with no processing is:\n\n")
    sys.stdout.write("-----------------BEGIN-----------------\n")
    sys.stdout.write(pytesseract.image_to_string(image) + "\n")
    sys.stdout.write("------------------END------------------\n")



source : https://realpython.com/setting-up-a-simple-ocr-server/


Read more ...

Jul 15, 2018

playing with socat

liat komunikasi header (request + response)
    sudo socat -v TCP-LISTEN:8001,fork  TCP:192.168.100.100:8069  

lihat komunikasi data  (request + response)
    socat -u tcp4-listen:1934,fork SYSTEM:'tee in.txt |socat - "TCP:192.168.100.100:8069" |tee out.txt'

check header request
    socat -u tcp4-listen:1934 -

forward to 2 destination, just first
    socat -u tcp4-listen:1934 - | tee >(socat - tcp4:127.0.0.1:1935) >(socat - tcp4:127.0.0.1:1936) > /dev/null

Read more ...

Jul 4, 2018

moving odoo 10 from site to other site


simple summary steps
0. turn off all websites traffic, and restart the postgres
1. backup source file
2. backup filestore
3. backup database via psql

let's rock the job!!!

1.
BACKUP SOURCE FILE
make zip file under Odoo folder

2. BACKUP filestore
the location usually here  ".local/share/Odoo/filestore"

3. BACKUP Database
DATABASE BACKUP
pg_dump esti > esti_o10_jul_4_18.out

DATABASE RESTORE
psql
create database esti owner odoo;

postgres@weskadung:/home/febru/backup_esti$ psql -f esti_o10_jul_4_18.out esti

postgres=# \l
                                   List of databases
    Name     |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges  
-------------+----------+----------+-------------+-------------+-----------------------
 esti    | odoo     | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
Read more ...

Jun 5, 2018

solved erpnext help doesn't exist

error is :

ProgrammingError: (1146, u"Table 'xxxxx .help' doesn't exist")
SOLUTION is  : 
bench setup-help
Read more ...

Jun 4, 2018

SOLVED erpnext can not find variables.less

the error :

19:06:15 watch.1          | Error compiling  erpnext.less
19:06:15 watch.1          | { [Error: 'variables.less' wasn't found. Tried - variables.less,/home/frappe/frappe-bench/apps/erpnext/erpnext/public/less/variables.less,/home/frappe/frappe-bench/sites/node_modules/variables.less,variables.less]
19:06:15 watch.1          |   message: '\'variables.less\' wasn\'t found. Tried - variables.less,/home/frappe/frappe-bench/apps/erpnext/erpnext/public/less/variables.less,/home/frappe/frappe-bench/sites/node_modules/variables.less,variables.less',
19:06:15 watch.1          |   stack: undefined,
19:06:15 watch.1          |   type: 'File',

19:06:15 watch.1          |   filename: 'erpnext.less',

solutions :

find . -iname variables.less

then copy the file to one of those location, example  :

frappe@ubuntu:~$ cp frappe-bench/apps/frappe/frappe/public/less/variables.less /home/frappe/frappe-bench/apps/erpnext/erpnext/public/less/variables.less


then bench start 
Read more ...

SOLVED Erpnext throw er Unhandled 'error' event ENOSPC

Error :

18:43:14 watch.1          | events.js:160
18:43:14 watch.1          |       throw er; // Unhandled 'error' event
18:43:14 watch.1          |       ^
18:43:14 watch.1          | 
18:43:14 watch.1          | Error: watch /home/frappe/frappe-bench/apps/erpnext/erpnext/education/doctype/academic_year ENOSPC
18:43:14 watch.1          |     at exports._errnoException (util.js:1020:11)
18:43:14 watch.1          |     at FSWatcher.start (fs.js:1451:19)
18:43:14 watch.1          |     at Object.fs.watch (fs.js:1478:11)
18:43:14 watch.1          |     at createFsWatchInstance (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:37:15)
18:43:14 watch.1          |     at setFsWatchListener (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:80:15)
18:43:14 watch.1          |     at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:229:14)
18:43:14 watch.1          |     at FSWatcher.NodeFsHandler._handleDir (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:408:19)
18:43:14 watch.1          |     at FSWatcher.<anonymous> (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:456:19)
18:43:14 watch.1          |     at FSWatcher.<anonymous> (/home/frappe/frappe-bench/node_modules/chokidar/lib/nodefs-handler.js:461:16)

18:43:14 watch.1          |     at FSReqWrap.oncomplete (fs.js:123:15)


solutions :

frappe@ubuntu:~/frappe-bench$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
fs.inotify.max_user_watches=524288
fs.inotify.max_user_watches = 524288
frappe@ubuntu:~/frappe-bench$ sudo sysctl --system
* Applying /etc/sysctl.d/10-console-messages.conf ...
kernel.printk = 4 4 1 7
* Applying /etc/sysctl.d/10-ipv6-privacy.conf ...
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
* Applying /etc/sysctl.d/10-kernel-hardening.conf ...
kernel.kptr_restrict = 1
* Applying /etc/sysctl.d/10-link-restrictions.conf ...
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/10-magic-sysrq.conf ...
kernel.sysrq = 176
* Applying /etc/sysctl.d/10-network-security.conf ...
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
* Applying /etc/sysctl.d/10-ptrace.conf ...
kernel.yama.ptrace_scope = 1
* Applying /etc/sysctl.d/10-zeropage.conf ...
vm.mmap_min_addr = 65536
* Applying /etc/sysctl.d/99-sysctl.conf ...
fs.inotify.max_user_watches = 524288
* Applying /etc/sysctl.conf ...

fs.inotify.max_user_watches = 524288


Read more ...

SOLVED erpnext Error: Cannot find module 'babel-core'


the error :
18:36:54 socketio.1       | listening on *: 9001
18:36:56 watch.1          | module.js:478
18:36:56 watch.1          |     throw err;
18:36:56 watch.1          |     ^
18:36:56 watch.1          | 
18:36:56 watch.1          | Error: Cannot find module 'babel-core'
18:36:56 watch.1          |     at Function.Module._resolveFilename (module.js:476:15)
18:36:56 watch.1          |     at Function.Module._load (module.js:424:25)
18:36:56 watch.1          |     at Module.require (module.js:504:17)
18:36:56 watch.1          |     at require (internal/module.js:20:19)
18:36:56 watch.1          |     at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/frappe/build.js:4:15)
18:36:56 watch.1          |     at Module._compile (module.js:577:32)
18:36:56 watch.1          |     at Object.Module._extensions..js (module.js:586:10)
18:36:56 watch.1          |     at Module.load (module.js:494:32)
18:36:56 watch.1          |     at tryModuleLoad (module.js:453:12)

18:36:56 watch.1          |     at Function.Module._load (module.js:445:3)

solutions :

npm install babel-core less chokidar babel-preset-es2015 babel-preset-es2016 babel-preset-es2017 babel-preset-babili


Read more ...

SOLVED : pymysql.err.IntegrityError: (1048, u"Column 'translatable' cannot be null")

the error is  :

  File "<string>", line 1, in <module>
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 695, in reload_doc
    return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py", line 155, in reload_doc
    return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 19, in import_files
    reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 24, in import_file
    ret = import_file_by_path(path, force, pre_process=pre_process, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 58, in import_file_by_path
    ignore_version=ignore_version, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 132, in import_doc
    doc.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 240, in insert
    d.db_insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 303, in db_insert
    ), list(d.values()))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 166, in sql
    self._cursor.execute(query, values)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 893, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1103, in _read_query_result
    result.read()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1396, in read
    first_packet = self.connection._read_packet()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1059, in _read_packet
    packet.check_error()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 384, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)

pymysql.err.IntegrityError: (1048, u"Column 'translatable' cannot be null")


just simple solutions for this errors are :

~/frappe-bench$ bench mysql
MariaDB [xxxxxxxxxxxxxxx]> ALTER TABLE tabDocField modify column translatable int(1) NULL default 0;
Query OK, 0 rows affected (0.62 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [xxxxxxxxxxxxxxx]>  alter table tabDocField modify column allow_in_quick_entry int(1) NULL default 0;
Query OK, 0 rows affected (0.16 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [xxxxxxxxxxxxxxx]> Ctrl-C -- exit!
Aborted
frappe@ubuntu:~/frappe-bench$ bench update --patch
Read more ...

Apr 4, 2018

SOLVED ERPNEXT 11 not create json after create doctype


related to this issues :


Folders not created for doctype even when developer_mode is set to 1


or 

Custom field on doctype can not be un-checked


or 

docType folder not created on frappe 11 and erpnext 11


or 

doctype folder change to custom folder


or 

developer_mode change custom doctype to json file 


The solution is  :

1. set developer_mode 1, dont forget to restart the bech
2. goto your doctype, then Customize Form
3. export customization, the json will be store on custom folder, then you're ready to migrate if you want.






Read more ...