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 ...

Apr 3, 2018

SOLVED ERPNEXT login success but not permitted


Solution 1 : 

ensure your vm / erpnext server can access to internet, by checking /etc/resolv.conf or any routing.
once its going proper, everything will run smoothly.

erpnext need to run some scheduled job which need internet connection.

Solution 2 : 


bench stop
bench --site all clear-cache
bench --site all clear-website-cache
sudo reboot


related to these : 

ERPNext not permitted

Not Permitted message

Read more ...

Feb 27, 2018

[SOLVED] ERROR odoo.modules.registry: Failed to load registry

First time we got error as below :

ERROR test odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
  File "/opt/odoo/odoo-10.0/odoo/modules/registry.py", line 82, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 335, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 95, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/opt/odoo/odoo-10.0/odoo/tools/convert.py", line 845, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/opt/odoo/odoo-10.0/odoo/tools/convert.py", line 898, in convert_xml_import
    doc = etree.parse(xmlfile)
  File "src/lxml/etree.pyx", line 3444, in lxml.etree.parse (src/lxml/etree.c:83185)
  File "src/lxml/parser.pxi", line 1855, in lxml.etree._parseDocument (src/lxml/etree.c:121025)
  File "src/lxml/parser.pxi", line 1875, in lxml.etree._parseFilelikeDocument (src/lxml/etree.c:121308)
  File "src/lxml/parser.pxi", line 1770, in lxml.etree._parseDocFromFilelike (src/lxml/etree.c:120092)
  File "src/lxml/parser.pxi", line 1185, in lxml.etree._BaseParser._parseDocFromFilelike (src/lxml/etree.c:114820)
  File "src/lxml/parser.pxi", line 598, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/etree.c:107738)
  File "src/lxml/parser.pxi", line 709, in lxml.etree._handleParseResult (src/lxml/etree.c:109447)
  File "src/lxml/parser.pxi", line 638, in lxml.etree._raiseParseError (src/lxml/etree.c:108301)
XMLSyntaxError: EntityRef: expecting ';', line 476, column 94 (line 476)
2018-02-27 07:38:31,330 12176 INFO test werkzeug: 192.168.100.100 - - [27/Feb/2018 07:38:31] "GET / HTTP/1.0" 500 -
2018-02-27 07:38:31,334 12176 ERROR test werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 209, in run_wsgi
    execute(self.server.app)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 197, in execute
    application_iter = app(environ, start_response)
  File "/opt/odoo/odoo-10.0/odoo/service/server.py", line 249, in app
    return self.app(e, s)
  File "/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py", line 186, in application
    return application_unproxied(environ, start_response)
  File "/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py", line 172, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/odoo/odoo-10.0/odoo/http.py", line 1308, in __call__
    return self.dispatch(environ, start_response)
  File "/opt/odoo/odoo-10.0/odoo/http.py", line 1282, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 600, in __call__
    return self.app(environ, start_response)
  File "/opt/odoo/odoo-10.0/odoo/http.py", line 1464, in dispatch
    odoo.registry(db).check_signaling()
  File "/opt/odoo/odoo-10.0/odoo/__init__.py", line 52, in registry
    return modules.registry.Registry(database_name)
  File "/opt/odoo/odoo-10.0/odoo/modules/registry.py", line 59, in __new__
    return cls.new(db_name)
  File "/opt/odoo/odoo-10.0/odoo/modules/registry.py", line 82, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 335, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 156, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 95, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/opt/odoo/odoo-10.0/odoo/tools/convert.py", line 845, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/opt/odoo/odoo-10.0/odoo/tools/convert.py", line 898, in convert_xml_import
    doc = etree.parse(xmlfile)
  File "src/lxml/etree.pyx", line 3444, in lxml.etree.parse (src/lxml/etree.c:83185)
    
  File "src/lxml/parser.pxi", line 1855, in lxml.etree._parseDocument (src/lxml/etree.c:121025)
    
  File "src/lxml/parser.pxi", line 1875, in lxml.etree._parseFilelikeDocument (src/lxml/etree.c:121308)
    
  File "src/lxml/parser.pxi", line 1770, in lxml.etree._parseDocFromFilelike (src/lxml/etree.c:120092)
    
  File "src/lxml/parser.pxi", line 1185, in lxml.etree._BaseParser._parseDocFromFilelike (src/lxml/etree.c:114820)
    
  File "src/lxml/parser.pxi", line 598, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/etree.c:107738)
    
  File "src/lxml/parser.pxi", line 709, in lxml.etree._handleParseResult (src/lxml/etree.c:109447)
    
  File "src/lxml/parser.pxi", line 638, in lxml.etree._raiseParseError (src/lxml/etree.c:108301)
    
XMLSyntaxError: EntityRef: expecting ';', line 476, column 94 (line 476)


THE SOLUTION IS :

if error was produced after you install some module, so remove the module from addons folder then remove its data from database :

# delete from ir_module_module where name ilike '%marketplace%ebay';
DELETE 1

# delete from ir_module_module where name ilike '%marketplace%amazon';

DELETE 1

# delete from ir_module_module where name ilike '%marketplace%ebay';

DELETE 1

# delete from ir_module_module where name ilike '%marketplace%taobao';

DELETE 1

# delete from ir_module_module where name ilike '%marketplace%alibaba';

DELETE 1

if error was produced after you update / upgrade some existing module / installed module, so change back its registry from database : 

update ir_module_module  set state='installed' where name ilike '%website_sale%' and state='to upgrade';
UPDATE 4

after that, you can restart the odoo. 

Read more ...

Jan 22, 2018

install odoo 11 on ubuntu 14.04

sudo apt-get update
sudo adduser --system --home=/opt/odoo --group odoo

wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
tar xfvJ Python-3.5.1.tar.xz
cd Python-3.5.1
./configure --prefix=/usr
make
# To make idle3.5, you need tk's development to produce tkinter
sudo apt-get install tk8.6-dev
sudo make install



sudo apt-get install -y postgresql
sudo apt-get install postgresql-server-dev-9.3
sudo service postgresql start
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
exit

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev libssl-dev

sudo apt-get install python3-pip
sudo apt install libxml2-dev libxslt1-dev
sudo apt-get install -y python3-lxml
sudo apt-get install libjpeg-dev
sudo pip3 install Babel decorator docutils ebaysdk feedparser gevent greenlet html2text Jinja2 lxml Mako MarkupSafe mock num2words ofxparse passlib Pillow psutil psycogreen psycopg2 pydot pyparsing PyPDF2 pyserial python-dateutil python-openid pytz pyusb PyYAML qrcode reportlab requests six suds-jurko vatnumber vobject Werkzeug XlsxWriter xlwt xlrd

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

sudo su - postgres

psql

update pg_database set encoding = pg_char_to_encoding('UTF8');

\q
exit

locale-gen en_US.UTF-8

export LANG=en_US.UTF-8 LANGUAGE=en_US.en LC_ALL=en_US.UTF-8
sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
npm config set strict-ssl false
sudo apt-get install -y node-less

cd /opt/odoo
sudo wget https://pypi.python.org/packages/a8/70/bd554151443fe9e89d9a934a7891aaffc63b9cb5c7d608972919a002c03c/gdata-2.0.18.tar.gz
sudo tar zxvf gdata-2.0.18.tar.gz
sudo chown -R odoo: gdata-2.0.18
sudo -s
cd gdata-2.0.18/
python setup.py install
exit

sudo apt-get install git
sudo su - odoo -s /bin/bash
git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 --single-branch
exit

sudo mkdir /var/log/odoo
sudo chown -R odoo:root /var/log/odoo


sudo vim /etc/odoo-server.conf

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False <== your password here
logfile = /var/log/odoo/odoo-server.log
addons_path = /opt/odoo/odoo/addons


sudo chown odoo: /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf

sudo wget https://raw.githubusercontent.com/mohitg1213/odoo_scripts/master/odoo-server
sudo mv odoo-server /etc/init.d/
sudo chmod 755 /etc/init.d/odoo-server
sudo chown root: /etc/init.d/odoo-server
# you may need to change some lines of code there..

Read more ...

Nov 30, 2017

search to json api

just simple to access :

from Javascript 

<html>
<head>


  <script>
    var HttpClient = function() {

      this.post = function(aUrl, data, aCallback) {
        var httpRequest = new XMLHttpRequest();
        httpRequest.open("POST", aUrl, true);
        httpRequest.onreadystatechange = function() {
          if (httpRequest.readyState == 4 && httpRequest.status == 200)
            aCallback(httpRequest.responseText);
        };
        httpRequest.send(JSON.stringify(data));
      };
    };

    var req = new HttpClient();
    var rURL = 'http://search.rajatrepik.in/d/';
    req.post(rURL, {"query" : 'novanto site:http://detik.com'}, function(response) {
      document.getElementById('main').innerHTML = response;
    });

</script>
</head>
<body>

<div>
Hello world</div>
<div id="main">
</div>
</body>

</html></pre>

from Curl

curl -H "Content-Type: application/json" -X POST -d '{"query":"tangga lagu terbaru site:joox.com"}' http://search.rajatrepik.in/d/

from PHP

$data = array("query" => "kisah kasih pipik sunu");                                                                    
$data_string = json_encode($data);                                                                $ch = curl_init('http://search.rajatrepik.in/d/');                                                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                  curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);                                               curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                   curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($data_string)));                                                                            $result = curl_exec($ch);
print($result);
{ "status" : "ok", "result" :  [{"url": "https://www.youtube.com/watch?v=GY6N_h0Jjbc", "desc": "Mau tahu gosip terpanas seputar selebriti tanah air lainnya? Langsung aja klik http://www.cumicumi ...", "title": "Jalan Panjang Kisah Cinta Rahasia Umi Pipik dan Sunu Matta ..."}, {"url": "https://www.youtube.com/watch?v=0bJ8YaVshSM", "desc": "Kisah Dibalik Kedekatan, Sunu & Umi Pipik Hingga Akhirnya Nikah Siri Nama Sunu Haramain atau ...", "title": "Kisah Dibalik Kedekatan, Sunu & Umi Pipik Hingga Akhirnya Nikah ..."}, {"url": "http://wartakota.tribunnews.com/2017/11/16/dikabarkan-dekat-umi-pipik-sunu-matta-berterima-kasihi", "desc": "16 Nov 2017 - WARTA KOTA, JAKARTA- Pipik Dian Irawati diduga memiliki hubungan asmara dengan mantan vokalis grup band Matta, Sunnu Hermaen.", "title": "Dikabarkan Dekat Umi Pipik, Sunu Matta Berterima Kasih - Wartakota"}, {"url": "https://www.linggars.com/video/mkknpL2ZMQU/pagi-pagi-pasti-happy-ust-derry-klarifikasi-hubungan-umi-pipik-dengan-sunu-131117-part-3.html", "desc": "awalnya sunu pipik nikah siri buat urusan bawah aja, yang penting halalan toyiban, ..... jujur feeling Q ...", "title": "PAGI PAGI PASTI HAPPY - Ust. Derry Klarifikasi Hubungan Umi Pipik ..."}, {"url": "http://www.melodlist.com/index.php?a=search&q=Tangisan%20Istri", "desc": "22 Nov 2017 - Kisah Tauladan, Penyesalan Seorang Istri Yang Menyia-siakan Suami .... BEREDAR FOTO UMI PIPIK DAN USTAD SUNU MENIKAH ~ Gosip Artis .... Renungan,,, Inilah Cerita Sedih Kasih Sayang Istri Untuk Suaminya Yang...", "title": "Tangisan Istri - Melodlist - Online Songs & Music Playlists"}, {"url": "http://hmongbuy.net/video/S-mfLF2obSs", "desc": "Kisah perjalanan Ustadz Jeffry Al Buchory dan Pipik - Was Was 30 April 2013. Share to Facebook HOT ...", "title": "hmongbuy.net - Kisah perjalanan Ustadz Jeffry Al Buchory dan Pipik ..."}, {"url": "http://dreamcareservice.com/video?q=berita-artis-indonesia-terkini-hari-ini", "desc": "02 April 2017 KASIH KABAR ... jangan lupa subscribe dan like ya :) ,cerita artis terkini dan gosip artis terkini hingga gosip panas, selebriti berita dan ... GOSIP NIKAH SIRI UMI PIPIK DAN SUNU TERJAWAB @Gosip Artis Indonesia Terbaru", "title": "Download Full Video Berita Artis Indonesia Terkini Hari Ini Mp3, 3GP ..."}, {"url": "https://www.pinterest.cl/supernewsid/gosip-artis-indonesia/", "desc": "Dikabarkan Menikah Siri Dengan Umi Pipik, Sunu Matta Band Angkat Bicara .... Ahmad Dhani: Habib Rizieq Terlalu Kelamaan, Cukup Kasih Tujuh Hari ... Sinopsis Mohabbatein Episode 1-100 ANTV | Trailer, Rilis, Pemain, Cerita dan .... Nos ponemos en manos de los profesionales para que nos indiquen cmo disimular...", "title": "14 mejores imgenes de Gosip Artis Indonesia en Pinterest | Bikini ..."}, {"url": "http://mediascreenmusic.com/music/sunu.html", "desc": "Download Songs Sunu only for review course, Buy Cassette or CD / VCD original from the album Sunu or use Personal Tone / I-RING / Ring Back Tone in.", "title": "Sunu | MediaScreenMusic.com"}, {"url": "http://www.sitefavori.com/bintang-com/", "desc": "... Pipik Syahnaz Sadiqah Rina Nose Rachmawati Soekarnoputri Cerita Baru SCTV ... Sophia Latjuba Panen Pujian16 Nov 2017 19:25Tony Q Rastafara Apresiasi ... Istri16 Nov 2017 18:15Saran Aura Kasih Sebelum Nonton Film Keluarga Tak ... Pernikahan Siri Umi Pipik dan SunuFoto Mesra dengan Sunu, Umi Pipik: Itu...", "title": "bintang.com - Mes sites favoris"}, {"url": "http://connectyoutube.com/search?q=Berita+infotainment", "desc": "2 months ago - KASIH KABAR ... connectYoutube - SUDAH NIKAHI UMI PIPIK SETAHUN LALU,SUNU MINTA MAAF KE ISTRINYA SUDAH POLIGAMI.", "title": "connectYoutube.com - Search video Berita infotainment"}, {"url": "https://www.pinterest.com.au/pin/664492119989264301/", "desc": "Menanti Kelahiran, Cerita Istri Stefan William soal Calon Bayi .... ada kejadian Kiwil hidup di dunia entertain, glamor, tapi Allah putus yang Dia kasih. Semua ... 6 coisas que voc pode cortar da sua festa de casamento para economizar dinheiro ... Dikabarkan Menikah Siri Dengan Umi Pipik, Sunu Matta Band Angkat Bicara.", "title": "Pernikahan Gilang Dirga - Tampil Mewah Di Pelaminan, Sang ..."}, {"url": "https://www.pinterest.com.mx/pin/664492119989350704/", "desc": "Ahmad Dhani: Habib Rizieq Terlalu Kelamaan, Cukup Kasih Tujuh Hari. MulanBali .... Menanti Kelahiran, Cerita Istri Stefan William soal Calon Bayi .... Dikabarkan Menikah Siri Dengan Umi Pipik, Sunu Matta Band Angkat Bicara  Indonesia ... 10 Clbrits qui prouvent que les amourettes de la vie tudiante peuvent durer.", "title": "Waduh, Zack Lee Adu Jotos dengan Iko Uwais, Ada Apa, ya? - Pinterest"}, {"url": "https://www.pinterest.com.mx/pin/664492119989266847/", "desc": "Ahmad Dhani: Habib Rizieq Terlalu Kelamaan, Cukup Kasih Tujuh Hari ..... 10 Clbrits qui prouvent que les amourettes de la vie tudiante peuvent durer .... Dikabarkan Menikah Siri Dengan Umi Pipik, Sunu Matta Band Angkat Bicara ... Mirip Kisah Jessica, Renata Tak Sadarkan Diri Setelah Minum Kopi Mirip Kisah...", "title": "Ahmad Dhani Calonkan Diri Jadi Wakil Bupati Bekasi, Begini ..."}, {"url": "http://wapka.cakap.biz/site_search.html?get-q=Heboh-Umi-Pipik-Istri-Alm-Uje-Dugem-Tertangkap-Kamera", "desc": "Dapatkan Heboh Umi Pipik Istri Alm Uje Dugem Tertangkap Kamera oleh oleh ... download lagu Kisah perjalanan Ustadz Jeffry Al Buchory dan Pipik - Was Was ... Adik Uje Bocorkan Kabar Pernikahan Umi Pipik Dengan Sunu Selama Ini gratis ... lagu all of me by vjr , dugaan kasih haikal , chunin acoustic cover aremania...", "title": "Heboh Umi Pipik Istri Alm Uje Dugem Tertangkap Kamera Lagu MP3 ..."}, {"url": "http://jpnn.com/index.php?mib=video_detail&video_id=10924&page=898", "desc": "Pemprov Kepulauan Riau Ucapkan Terima Kasih Pada MPR. Kepala Dinas ... Sahabat Umi Pipik-Sunu gak Berani Ngomong - JPNN.COM. Gosip Sabtu, 18...", "title": "Berita Terbaru, Terkini dan Terpopuler Hari Ini - JPNN.COM"}, {"url": "http://m.viva.co.id/sitemap/web/showbiz.xml", "desc": "... .co.id/showbiz/gosip/981193-foto-ini-heboh-aura-kasih-disebut-sedang-merokok .... .id/showbiz/gosip/980853-isu-nikah-siri-dengan-sunu-begini-pesan-umi-pipik ... .co.id/showbiz/serial/980833-terangkanlah-kisah-inspiratif-terbaru-dari-antv ... http://www.viva.co.id/showbiz/musik/980774-kejutan-tony-q-rastarafa-di-jatim-...", "title": "http://www.viva.co.id/showbiz/gosip/981804-amarah-tsania-untuk ..."}] }






all about scrapy 
scrapy crawl keywordSpider -a keyword=Man-midle-attack -a se=google -a pages=2


 ======  :  =================  :   ==================
deploy : scrapyd-deploy default  -p seCrawler 
Packing version 1512005704
Deploying to project "seCrawler" in http://localhost:6800/addversion.json
Server response (200):
{"status": "ok", "project": "seCrawler", "version": "1512005704", "spiders": 2, "node_name": "seceng"}



list project : curl http://localhost:6800/listprojects.json 
{"status": "ok", "projects": ["seCrawler"], "node_name": "seceng"}

run project : curl http://localhost:6800/schedule.json -d project=seCrawler -d spider=keywordSpider -d keyword=Spider-Man -d se=google -d pages=2

del project : curl http://localhost:6800/delproject.json -d project=seCrawler

 
 curl http://localhost:6800/schedule.json -d project=seCrawler -d spider=keywordSpider -a keyword=Spider-Man -a se=google -a pages=2
 
 

Read more ...