frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
17.68k stars 6.75k forks source link

Bugs in latest production version 10.1.8 #13289

Closed raghukovvuru closed 6 years ago

raghukovvuru commented 6 years ago

Hi, I noticed 2 bugs in latest version after updating,

  1. Duplicate name Custom Field section_break_0 in various DocTypes.
  2. Company already exists error while creating a new company company_error

`Traceback (most recent call last): File "/home/blueair/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs doc.save() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 256, in save return self._save(*args, kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 279, in _save self.insert() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 245, in insert self.run_post_save_methods() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods self.run_method("on_update") File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method out = Document.hook(fn)(self, *args, *kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in composer return composed(self, method, args, kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 1007, in runner add_to_return_value(self, fn(self, *args, kwargs)) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in fn = lambda self, *args, *kwargs: getattr(self, method)(args, kwargs) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/setup/doctype/company/company.py", line 89, in on_update install_country_fixtures(self.name) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/setup/doctype/company/company.py", line 357, in install_country_fixtures .format(frappe.scrub(company_doc.country)))(company_doc) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 12, in setup make_custom_fields() File "/home/blueair/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 186, in make_custom_fields create_custom_fields(custom_fields) File "/home/blueair/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 123, in create_custom_fields create_custom_field(doctype, df) File "/home/blueair/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 108, in create_custom_field "hidden": df.hidden or 0 File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 233, in insert raise e DuplicateEntryError: (u'Custom Field', u'Purchase Invoice-section_break_0', IntegrityError(1062, u"Duplicate entry 'Purchase Invoice-section_break_0' for key 'PRIMARY'"))

desk.min.js?ver=1520860351.0:1649 Traceback (most recent call last): File "/home/blueair/frappe-bench/apps/frappe/frappe/app.py", line 62, in application response = frappe.handler.handle() File "/home/blueair/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle data = execute_cmd(cmd) File "/home/blueair/frappe-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd return frappe.call(method, frappe.form_dict) File "/home/blueair/frappe-bench/apps/frappe/frappe/init.py", line 939, in call return fn(*args, *newargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs doc.save() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 256, in save return self._save(args, kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 279, in _save self.insert() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 245, in insert self.run_post_save_methods() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods self.run_method("on_update") File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method out = Document.hook(fn)(self, *args, kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in composer return composed(self, method, *args, *kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 1007, in runner add_to_return_value(self, fn(self, args, kwargs)) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in fn = lambda self, *args, *kwargs: getattr(self, method)(args, **kwargs) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/setup/doctype/company/company.py", line 89, in on_update install_country_fixtures(self.name) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/setup/doctype/company/company.py", line 357, in install_country_fixtures .format(frappe.scrub(company_doc.country)))(company_doc) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 12, in setup make_custom_fields() File "/home/blueair/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 186, in make_custom_fields create_custom_fields(custom_fields) File "/home/blueair/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 123, in create_custom_fields create_custom_field(doctype, df) File "/home/blueair/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 108, in create_custom_field "hidden": df.hidden or 0 File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 233, in insert raise e DuplicateEntryError: (u'Custom Field', u'Purchase Invoice-section_break_0', IntegrityError(1062, u"Duplicate entry 'Purchase Invoice-section_break_0' for key 'PRIMARY'"))

Failed to load resource: the server responded with a status of 409 (CONFLICT) desk.min.js?ver=1520860351.0:1649 Traceback (most recent call last): File "/home/blueair/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs doc.save() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 256, in save return self._save(*args, kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 279, in _save self.insert() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 245, in insert self.run_post_save_methods() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods self.run_method("on_update") File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method out = Document.hook(fn)(self, *args, *kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in composer return composed(self, method, args, kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 1007, in runner add_to_return_value(self, fn(self, *args, kwargs)) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in fn = lambda self, *args, *kwargs: getattr(self, method)(args, kwargs) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/setup/doctype/company/company.py", line 89, in on_update install_country_fixtures(self.name) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/setup/doctype/company/company.py", line 357, in install_country_fixtures .format(frappe.scrub(company_doc.country)))(company_doc) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 12, in setup make_custom_fields() File "/home/blueair/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 186, in make_custom_fields create_custom_fields(custom_fields) File "/home/blueair/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 123, in create_custom_fields create_custom_field(doctype, df) File "/home/blueair/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 108, in create_custom_field "hidden": df.hidden or 0 File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 233, in insert raise e DuplicateEntryError: (u'Custom Field', u'Purchase Invoice-section_break_0', IntegrityError(1062, u"Duplicate entry 'Purchase Invoice-section_break_0' for key 'PRIMARY'"))

desk.min.js?ver=1520860351.0:1649 Traceback (most recent call last): File "/home/blueair/frappe-bench/apps/frappe/frappe/app.py", line 62, in application response = frappe.handler.handle() File "/home/blueair/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle data = execute_cmd(cmd) File "/home/blueair/frappe-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd return frappe.call(method, frappe.form_dict) File "/home/blueair/frappe-bench/apps/frappe/frappe/init.py", line 939, in call return fn(*args, *newargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs doc.save() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 256, in save return self._save(args, kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 279, in _save self.insert() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 245, in insert self.run_post_save_methods() File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods self.run_method("on_update") File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method out = Document.hook(fn)(self, *args, kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in composer return composed(self, method, *args, *kwargs) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 1007, in runner add_to_return_value(self, fn(self, args, kwargs)) File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in fn = lambda self, *args, *kwargs: getattr(self, method)(args, **kwargs) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/setup/doctype/company/company.py", line 89, in on_update install_country_fixtures(self.name) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/setup/doctype/company/company.py", line 357, in install_country_fixtures .format(frappe.scrub(company_doc.country)))(company_doc) File "/home/blueair/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 12, in setup make_custom_fields() File "/home/blueair/frappe-bench/apps/erpnext/erpnext/regional/india/setup.py", line 186, in make_custom_fields create_custom_fields(custom_fields) File "/home/blueair/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 123, in create_custom_fields create_custom_field(doctype, df) File "/home/blueair/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 108, in create_custom_field "hidden": df.hidden or 0 File "/home/blueair/frappe-bench/apps/frappe/frappe/model/document.py", line 233, in insert raise e DuplicateEntryError: (u'Custom Field', u'Purchase Invoice-section_break_0', IntegrityError(1062, u"Duplicate entry 'Purchase Invoice-section_break_0' for key 'PRIMARY'"))`

fproldan commented 6 years ago

Same here! The update change custom Sections Break fieldname for section_break_0 and throw an error

umaepoch commented 6 years ago

Hi,

I am also facing this same issue. Is there any resolution to this?

Regards Uma

fproldan commented 6 years ago

@umaepoch With the latest release it seems it's fixed.

nabinhait commented 6 years ago

As per @umaepoch's confirmation, closing this issue. If you still get the issue, please feel free to reopen.