Jun 4, 2018

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

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