You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the instant scenario,
a Date field was added in Quotation Doctype to fetch date from the Opportunity doctype-> Opportunity Date.
Upon saving I am getting this long trail of error.
However, prima facie, the custom field is added in the Quotation Doctype even is error is popped up. Later upon saving the Quotation doctype, the dates from opportunity date is fetched as intended without error.
Nevertheless, I am not sure is the entire flow of addition of custom field is triggered or is interrupted due to this error.
Version
ERPNext: v15.31.1 (version-15)
Frappe Framework: v15.36.0 (version-15)
Frappe HR: v15.24.0 (version-15)
India Compliance: v15.11.0 (version-15)
Payments: v0.0.1 (version-15)
Relevant log output / Stack trace / Full Error Message.
Traceback with variables (most recent call last):
File "apps/frappe/frappe/app.py", line 114, in application
response = frappe.api.handle(request)
request = <Request 'https://erp/api/method/run_doc_method' [POST]>
response = None
rollback = True
e = OperationalError(1292, "Incorrect datetime value: 'OPTY-2409001'")
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
request = <Request 'https://erp/api/method/run_doc_method' [POST]>
endpoint = <function handle_rpc_call at 0x7fda3751c940>
arguments = {'method': 'run_doc_method'}
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
returnfrappe.handler.handle()
method = 'run_doc_method'
frappe = <module 'frappe' from 'apps/frappe/frappe/__init__.py'>
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
cmd = 'run_doc_method'
data = None
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
cmd = 'run_doc_method'
from_async = False
server_script = None
method = <function run_doc_method at 0x7fda36f13130>
File "apps/frappe/frappe/__init__.py", line 1768, in call
return fn(*args, **newargs)
fn = <function run_doc_method at 0x7fda36f13130>
args = ()
kwargs = {'docs': '{"name":"Customize Form","istable":0,"is_calendar_and_gantt":0,"editable_grid":1,"quick_entry":0,"track_changes":0,"track_views":0,"allow_auto_repeat":1,"allow_import":1,"queue_in_background":0,"naming_rule":"By \\"Naming Series\\" field","max_attachments":0,"allow_copy":0,"make_attachments_public":0,"show_title_field_in_link":0,"translated_doctype":0,"force_re_route_to_default_view":0,"show_preview_popup":0,"email_append_to":0,"sort_order":"DESC","doctype":"Customize Form","links":[],"fields":[{"docstatus":0,"doctype":"Customize Form Field","name":"new-customize-form-field-lrzsxccoef","__islocal":1,"__unsaved":1,"owner":"erp","is_system_generated":0,"fieldtype":"Section Break","non_negative":0,"reqd":0,"unique":0,"is_virtual":0,"in_list_view":0,"in_standard_filter":0,"in_global_search":0,"in_preview":0,"bold":0,"no_copy":0,"allow_in_quick_entry":0,"translatable":0,"precision":"","sort_options":0,"fetch_if_empty":0,"show_dashboard":0,"permlevel":0,"hidden":0,"read_... newargs = {'docs': '{"name":"Customize Form","istable":0,"is_calendar_and_gantt":0,"editable_grid":1,"quick_entry":0,"track_changes":0,"track_views":0,"allow_auto_repeat":1,"allow_import":1,"queue_in_background":0,"naming_rule":"By \\"Naming Series\\" field","max_attachments":0,"allow_copy":0,"make_attachments_public":0,"show_title_field_in_link":0,"translated_doctype":0,"force_re_route_to_default_view":0,"show_preview_popup":0,"email_append_to":0,"sort_order":"DESC","doctype":"Customize Form","links":[],"fields":[{"docstatus":0,"doctype":"Customize Form Field","name":"new-customize-form-field-lrzsxccoef","__islocal":1,"__unsaved":1,"owner":"erp","is_system_generated":0,"fieldtype":"Section Break","non_negative":0,"reqd":0,"unique":0,"is_virtual":0,"in_list_view":0,"in_standard_filter":0,"in_global_search":0,"in_preview":0,"bold":0,"no_copy":0,"allow_in_quick_entry":0,"translatable":0,"precision":"","sort_options":0,"fetch_if_empty":0,"show_dashboard":0,"permlevel":0,"hidden":0,"read_... File "apps/frappe/frappe/handler.py", line 330, in run_doc_method response = doc.run_method(method) method = 'save_customization' docs = {'name': 'Customize Form', 'istable': 0, 'is_calendar_and_gantt': 0, 'editable_grid': 1, 'quick_entry': 0, 'track_changes': 0, 'track_views': 0, 'allow_auto_repeat': 1, 'allow_import': 1, 'queue_in_background': 0, 'naming_rule': 'By "Naming Series" field', 'max_attachments': 0, 'allow_copy': 0, 'make_attachments_public': 0, 'show_title_field_in_link': 0, 'translated_doctype': 0, 'force_re_route_to_default_view': 0, 'show_preview_popup': 0, 'email_append_to': 0, 'sort_order': 'DESC', 'doctype': 'Customize Form', 'links': [], 'fields': [{'docstatus': 0, 'doctype': 'Customize Form Field', 'name': 'new-customize-form-field-lrzsxccoef', '__islocal': 1, '__unsaved': 1, 'owner': 'erp', 'is_system_generated': 0, 'fieldtype': 'Section Break', 'non_negative': 0, 'reqd': 0, 'unique': 0, 'is_virtual': 0, 'in_list_view': 0, 'in_standard_filter': 0, 'in_global_search': 0, 'in_preview': 0, 'bold': 0, 'no_copy': 0, 'allow_in_quick_entry': 0, 'translatable': 0, 'precision': '', 'sort_options... dt = None dn = None arg = None args = None signature = <function signature at 0x7fda396ec940> doc = <CustomizeForm: Customize Form> method_obj = <bound method CustomizeForm.save_customization of <CustomizeForm: Customize Form>> fn = <function CustomizeForm.save_customization at 0x7fda282204c0> fnargs = [] File "apps/frappe/frappe/model/document.py", line 962, in run_method out = Document.hook(fn)(self, *args, **kwargs) self = <CustomizeForm: Customize Form> args = () kwargs = {} fn = <function Document.run_method.<locals>.fn at 0x7fda2c75dab0> method = 'save_customization' File "apps/frappe/frappe/model/document.py", line 1322, in composer return composed(self, method, *args, **kwargs) self = <CustomizeForm: Customize Form> args = () kwargs = {} hooks = [] method = 'save_customization' doc_events = {'*': {'on_update': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.core.doctype.file.utils.attach_files_to_document', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply', 'frappe.automation.doctype.assignment_rule.assignment_rule.update_due_date', 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type'], 'after_rename': ['frappe.desk.notifications.clear_doctype_notifications'], 'on_cancel': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply'], 'on_trash': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions'], 'on_update_after_submit': ['frappe.workflow.doctype.workflow_action.workflow_action.process_w... composed = <function Document.hook.<locals>.compose.<locals>.runner at 0x7fda2c75ea70> compose = <function Document.hook.<locals>.compose at 0x7fda2c75cee0> f = <function Document.run_method.<locals>.fn at 0x7fda2c75dab0> File "apps/frappe/frappe/model/document.py", line 1304, in runner add_to_return_value(self, fn(self, *args, **kwargs)) self = <CustomizeForm: Customize Form> method = 'save_customization' args = () kwargs = {} add_to_return_value = <function Document.hook.<locals>.add_to_return_value at 0x7fda2c75fd00> fn = <function Document.run_method.<locals>.fn at 0x7fda2c75dab0> hooks = () File "apps/frappe/frappe/model/document.py", line 959, in fn return method_object(*args, **kwargs) self = <CustomizeForm: Customize Form> args = () kwargs = {} method_object = <bound method CustomizeForm.save_customization of <CustomizeForm: Customize Form>> method = 'save_customization' File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper return func(*args, **kwargs) args = (<CustomizeForm: Customize Form>,) kwargs = {} apply_condition = <function whitelist.<locals>.innerfn.<locals>.<lambda> at 0x7fda28221090> func = <function CustomizeForm.save_customization at 0x7fda28221630> File "apps/india_compliance/india_compliance/audit_trail/overrides/customize_form.py", line 28, in save_customization return super().save_customization() self = <CustomizeForm: Customize Form> __class__ = <class 'india_compliance.audit_trail.overrides.customize_form.CustomizeForm'> File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper return func(*args, **kwargs) args = (<CustomizeForm: Customize Form>,) kwargs = {} apply_condition = <function whitelist.<locals>.innerfn.<locals>.<lambda> at 0x7fda1bc5eef0> func = <function CustomizeForm.save_customization at 0x7fda1bc5f490> File "apps/frappe/frappe/custom/doctype/customize_form/customize_form.py", line 230, in save_customization self.update_custom_fields() self = <CustomizeForm: Customize Form> File "apps/frappe/frappe/custom/doctype/customize_form/customize_form.py", line 460, in update_custom_fields self.add_custom_field(df, i) self = <CustomizeForm: Customize Form> i = 129 df = <CustomizeFormField: new-customize-form-field-jffrvleayj parent=Customize Form> File "apps/frappe/frappe/custom/doctype/customize_form/customize_form.py", line 479, in add_custom_field d.insert() self = <CustomizeForm: Customize Form> df = <CustomizeFormField: new-customize-form-field-jffrvleayj parent=Customize Form> i = 129 d = <CustomField: Quotation-custom_opportunity_date> prop = 'link_filters' File "apps/frappe/frappe/model/document.py", line 315, in insert self.run_post_save_methods() self = <CustomField: Quotation-custom_opportunity_date> ignore_permissions = None ignore_links = None ignore_if_duplicate = False ignore_mandatory = None set_name = None set_child_names = True File "apps/frappe/frappe/model/document.py", line 1128, in run_post_save_methods self.run_method("on_update") self = <CustomField: Quotation-custom_opportunity_date> File "apps/frappe/frappe/model/document.py", line 962, in run_method out = Document.hook(fn)(self, *args, **kwargs) self = <CustomField: Quotation-custom_opportunity_date> args = () kwargs = {} fn = <function Document.run_method.<locals>.fn at 0x7fda2a2abf40> method = 'on_update' File "apps/frappe/frappe/model/document.py", line 1322, in composer return composed(self, method, *args, **kwargs) self = <CustomField: Quotation-custom_opportunity_date> args = () kwargs = {} hooks = [<function clear_doctype_notifications at 0x7fda353af1c0>, <function process_workflow_actions at 0x7fda2919da20>, <function attach_files_to_document at 0x7fda380028c0>, <function apply at 0x7fda28fac550>, <function update_due_date at 0x7fda28fac5e0>, <function apply_permissions_for_non_standard_user_type at 0x7fda353ae9e0>] method = 'on_update' doc_events = {'*': {'on_update': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.core.doctype.file.utils.attach_files_to_document', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply', 'frappe.automation.doctype.assignment_rule.assignment_rule.update_due_date', 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type'], 'after_rename': ['frappe.desk.notifications.clear_doctype_notifications'], 'on_cancel': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply'], 'on_trash': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions'], 'on_update_after_submit': ['frappe.workflow.doctype.workflow_action.workflow_action.process_w... handler = 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type' composed = <function Document.hook.<locals>.compose.<locals>.runner at 0x7fda2c75e3b0> compose = <function Document.hook.<locals>.compose at 0x7fda1bee4d30> f = <function Document.run_method.<locals>.fn at 0x7fda2a2abf40> File "apps/frappe/frappe/model/document.py", line 1304, in runner add_to_return_value(self, fn(self, *args, **kwargs)) self = <CustomField: Quotation-custom_opportunity_date> method = 'on_update' args = () kwargs = {} add_to_return_value = <function Document.hook.<locals>.add_to_return_value at 0x7fda29e9b640> fn = <function Document.run_method.<locals>.fn at 0x7fda2a2abf40> hooks = (<function clear_doctype_notifications at 0x7fda353af1c0>, <function process_workflow_actions at 0x7fda2919da20>, <function attach_files_to_document at 0x7fda380028c0>, <function apply at 0x7fda28fac550>, <function update_due_date at 0x7fda28fac5e0>, <function apply_permissions_for_non_standard_user_type at 0x7fda353ae9e0>) File "apps/frappe/frappe/model/document.py", line 959, in fn return method_object(*args, **kwargs) self = <CustomField: Quotation-custom_opportunity_date> args = () kwargs = {} method_object = <bound method CustomField.on_update of <CustomField: Quotation-custom_opportunity_date>> method = 'on_update' File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 212, in on_update frappe.db.updatedb(self.dt) self = <CustomField: Quotation-custom_opportunity_date> validate_fields_for_doctype = <function validate_fields_for_doctype at 0x7fda29abc5e0> File "apps/frappe/frappe/database/mariadb/database.py", line 443, in updatedb db_table.sync() self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7fda29098b80> doctype = 'Quotation' meta = None res = ((0,),) db_table = <frappe.database.mariadb.schema.MariaDBTable object at 0x7fda289a63e0> File "apps/frappe/frappe/database/schema.py", line 44, in sync self.alter() self = <frappe.database.mariadb.schema.MariaDBTable object at 0x7fda289a63e0> File "apps/frappe/frappe/database/mariadb/schema.py", line 111, in alter frappe.db.sql_ddl(query) col = <frappe.database.schema.DbColumn object at 0x7fda29bd65f0> add_column_query = [] columns_to_modify = {<frappe.database.schema.DbColumn object at 0x7fda29bd7880>, <frappe.database.schema.DbColumn object at 0x7fda29bd4970>, <frappe.database.schema.DbColumn object at 0x7fda29bd41c0>, <frappe.database.schema.DbColumn object at 0x7fda29bd5270>, <frappe.database.schema.DbColumn object at 0x7fda29bd6b60>, <frappe.database.schema.DbColumn object at 0x7fda29bd6380>, <frappe.database.schema.DbColumn object at 0x7fda29bd73a0>, <frappe.database.schema.DbColumn object at 0x7fda29bd4bb0>, <frappe.database.schema.DbColumn object at 0x7fda29bd6bf0>, <frappe.database.schema.DbColumn object at 0x7fda29bd6c20>, <frappe.database.schema.DbColumn object at 0x7fda29bd6440>, <frappe.database.schema.DbColumn object at 0x7fda29bd6c50>, <frappe.database.schema.DbColumn object at 0x7fda29bd64a0>, <frappe.database.schema.DbColumn object at 0x7fda29bd4d00>, <frappe.database.schema.DbColumn object at 0x7fda29bd6d70>, <frappe.database.schema.DbColumn object at 0x7fda29bd55a0>, <frappe.database.schema.DbColumn object... modify_column_query = ['MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0', 'MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0', 'MODIFY `grand_total` decimal(21,9) not null default 0', 'MODIFY `base_net_total` decimal(21,9) not null default 0', 'MODIFY `additional_discount_percentage` decimal(21,9) not null default 0', 'MODIFY `discount_amount` decimal(21,9) not null default 0', 'MODIFY `net_total` decimal(21,9) not null default 0', 'MODIFY `rounding_adjustment` decimal(21,9) not null default 0', 'MODIFY `base_grand_total` decimal(21,9) not null default 0', 'MODIFY `base_discount_amount` decimal(21,9) not null default 0', 'MODIFY `total` decimal(21,9) not null default 0', 'MODIFY `rounded_total` decimal(21,9) not null default 0', 'MODIFY `custom_opportunity_date` date', 'MODIFY `base_rounded_total` decimal(21,9) not null default 0', 'MODIFY `base_total` decimal(21,9) not null default 0', 'MODIFY `total_qty` decimal(21,9) not null default 0', 'MODIFY `total_taxes_and_ch... add_index_query = [] drop_index_query = [] query_parts = ['MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0', 'MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0', 'MODIFY `grand_total` decimal(21,9) not null default 0', 'MODIFY `base_net_total` decimal(21,9) not null default 0', 'MODIFY `additional_discount_percentage` decimal(21,9) not null default 0', 'MODIFY `discount_amount` decimal(21,9) not null default 0', 'MODIFY `net_total` decimal(21,9) not null default 0', 'MODIFY `rounding_adjustment` decimal(21,9) not null default 0', 'MODIFY `base_grand_total` decimal(21,9) not null default 0', 'MODIFY `base_discount_amount` decimal(21,9) not null default 0', 'MODIFY `total` decimal(21,9) not null default 0', 'MODIFY `rounded_total` decimal(21,9) not null default 0', 'MODIFY `custom_opportunity_date` date', 'MODIFY `base_rounded_total` decimal(21,9) not null default 0', 'MODIFY `base_total` decimal(21,9) not null default 0', 'MODIFY `total_qty` decimal(21,9) not null default 0', 'MODIFY `total_taxes_and_ch... query_body = 'MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0, MODIFY `grand_total` decimal(21,9) not null default 0, MODIFY `base_net_total` decimal(21,9) not null default 0, MODIFY `additional_discount_percentage` decimal(21,9) not null default 0, MODIFY `discount_amount` decimal(21,9) not null default 0, MODIFY `net_total` decimal(21,9) not null default 0, MODIFY `rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_grand_total` decimal(21,9) not null default 0, MODIFY `base_discount_amount` decimal(21,9) not null default 0, MODIFY `total` decimal(21,9) not null default 0, MODIFY `rounded_total` decimal(21,9) not null default 0, MODIFY `custom_opportunity_date` date, MODIFY `base_rounded_total` decimal(21,9) not null default 0, MODIFY `base_total` decimal(21,9) not null default 0, MODIFY `total_qty` decimal(21,9) not null default 0, MODIFY `total_taxes_and_charges` decimal(21,9) not null def... query = 'ALTER TABLE `tabQuotation` MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0, MODIFY `grand_total` decimal(21,9) not null default 0, MODIFY `base_net_total` decimal(21,9) not null default 0, MODIFY `additional_discount_percentage` decimal(21,9) not null default 0, MODIFY `discount_amount` decimal(21,9) not null default 0, MODIFY `net_total` decimal(21,9) not null default 0, MODIFY `rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_grand_total` decimal(21,9) not null default 0, MODIFY `base_discount_amount` decimal(21,9) not null default 0, MODIFY `total` decimal(21,9) not null default 0, MODIFY `rounded_total` decimal(21,9) not null default 0, MODIFY `custom_opportunity_date` date, MODIFY `base_rounded_total` decimal(21,9) not null default 0, MODIFY `base_total` decimal(21,9) not null default 0, MODIFY `total_qty` decimal(21,9) not null default 0, MODIFY `total_taxes_and_charges`... self = <frappe.database.mariadb.schema.MariaDBTable object at 0x7fda289a63e0> File "apps/frappe/frappe/database/database.py", line 417, in sql_ddl self.sql(query, debug=debug) self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7fda29098b80> query = 'ALTER TABLE `tabQuotation` MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0, MODIFY `grand_total` decimal(21,9) not null default 0, MODIFY `base_net_total` decimal(21,9) not null default 0, MODIFY `additional_discount_percentage` decimal(21,9) not null default 0, MODIFY `discount_amount` decimal(21,9) not null default 0, MODIFY `net_total` decimal(21,9) not null default 0, MODIFY `rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_grand_total` decimal(21,9) not null default 0, MODIFY `base_discount_amount` decimal(21,9) not null default 0, MODIFY `total` decimal(21,9) not null default 0, MODIFY `rounded_total` decimal(21,9) not null default 0, MODIFY `custom_opportunity_date` date, MODIFY `base_rounded_total` decimal(21,9) not null default 0, MODIFY `base_total` decimal(21,9) not null default 0, MODIFY `total_qty` decimal(21,9) not null default 0, MODIFY `total_taxes_and_charges`... debug = False File "apps/frappe/frappe/database/database.py", line 234, in sql self._cursor.execute(query, values) self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7fda29098b80> query = 'ALTER TABLE `tabQuotation` MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0, MODIFY `grand_total` decimal(21,9) not null default 0, MODIFY `base_net_total` decimal(21,9) not null default 0, MODIFY `additional_discount_percentage` decimal(21,9) not null default 0, MODIFY `discount_amount` decimal(21,9) not null default 0, MODIFY `net_total` decimal(21,9) not null default 0, MODIFY `rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_grand_total` decimal(21,9) not null default 0, MODIFY `base_discount_amount` decimal(21,9) not null default 0, MODIFY `total` decimal(21,9) not null default 0, MODIFY `rounded_total` decimal(21,9) not null default 0, MODIFY `custom_opportunity_date` date, MODIFY `base_rounded_total` decimal(21,9) not null default 0, MODIFY `base_total` decimal(21,9) not null default 0, MODIFY `total_qty` decimal(21,9) not null default 0, MODIFY `total_taxes_and_charges`... values = None as_dict = 0 as_list = 0 debug = False ignore_ddl = 0 auto_commit = 0 update = None explain = False run = True pluck = False as_iterator = False trace_id = None File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 153, in execute result = self._query(query) self = <pymysql.cursors.Cursor object at 0x7fda28ad3be0> query = 'ALTER TABLE `tabQuotation` MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0, MODIFY `grand_total` decimal(21,9) not null default 0, MODIFY `base_net_total` decimal(21,9) not null default 0, MODIFY `additional_discount_percentage` decimal(21,9) not null default 0, MODIFY `discount_amount` decimal(21,9) not null default 0, MODIFY `net_total` decimal(21,9) not null default 0, MODIFY `rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_grand_total` decimal(21,9) not null default 0, MODIFY `base_discount_amount` decimal(21,9) not null default 0, MODIFY `total` decimal(21,9) not null default 0, MODIFY `rounded_total` decimal(21,9) not null default 0, MODIFY `custom_opportunity_date` date, MODIFY `base_rounded_total` decimal(21,9) not null default 0, MODIFY `base_total` decimal(21,9) not null default 0, MODIFY `total_qty` decimal(21,9) not null default 0, MODIFY `total_taxes_and_charges`... args = None File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 322, in _query conn.query(q) self = <pymysql.cursors.Cursor object at 0x7fda28ad3be0> q = 'ALTER TABLE `tabQuotation` MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0, MODIFY `grand_total` decimal(21,9) not null default 0, MODIFY `base_net_total` decimal(21,9) not null default 0, MODIFY `additional_discount_percentage` decimal(21,9) not null default 0, MODIFY `discount_amount` decimal(21,9) not null default 0, MODIFY `net_total` decimal(21,9) not null default 0, MODIFY `rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_grand_total` decimal(21,9) not null default 0, MODIFY `base_discount_amount` decimal(21,9) not null default 0, MODIFY `total` decimal(21,9) not null default 0, MODIFY `rounded_total` decimal(21,9) not null default 0, MODIFY `custom_opportunity_date` date, MODIFY `base_rounded_total` decimal(21,9) not null default 0, MODIFY `base_total` decimal(21,9) not null default 0, MODIFY `total_qty` decimal(21,9) not null default 0, MODIFY `total_taxes_and_charges`... conn = <pymysql.connections.Connection object at 0x7fda28ad0820> File "env/lib/python3.10/site-packages/pymysql/connections.py", line 563, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) self = <pymysql.connections.Connection object at 0x7fda28ad0820> sql = b'ALTER TABLE `tabQuotation` MODIFY `base_rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_total_taxes_and_charges` decimal(21,9) not null default 0, MODIFY `grand_total` decimal(21,9) not null default 0, MODIFY `base_net_total` decimal(21,9) not null default 0, MODIFY `additional_discount_percentage` decimal(21,9) not null default 0, MODIFY `discount_amount` decimal(21,9) not null default 0, MODIFY `net_total` decimal(21,9) not null default 0, MODIFY `rounding_adjustment` decimal(21,9) not null default 0, MODIFY `base_grand_total` decimal(21,9) not null default 0, MODIFY `base_discount_amount` decimal(21,9) not null default 0, MODIFY `total` decimal(21,9) not null default 0, MODIFY `rounded_total` decimal(21,9) not null default 0, MODIFY `custom_opportunity_date` date, MODIFY `base_rounded_total` decimal(21,9) not null default 0, MODIFY `base_total` decimal(21,9) not null default 0, MODIFY `total_qty` decimal(21,9) not null default 0, MODIFY `total_taxes_and_charges... unbuffered = False File "env/lib/python3.10/site-packages/pymysql/connections.py", line 825, in _read_query_result result.read() self = <pymysql.connections.Connection object at 0x7fda28ad0820> unbuffered = False result = <pymysql.connections.MySQLResult object at 0x7fda290b26e0> File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1199, in read first_packet = self.connection._read_packet() self = <pymysql.connections.MySQLResult object at 0x7fda290b26e0> File "env/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_packet packet.raise_for_error() self = <pymysql.connections.Connection object at 0x7fda28ad0820> packet_type = <class 'pymysql.protocol.MysqlPacket'> buff = bytearray(b"\xff\x0c\x05#22007Incorrect datetime value: \'OPTY-2409001\'") packet_header = b'1\x00\x00\x01' btrl = 49 btrh = 0 packet_number = 1 bytes_to_read = 49 recv_data = b"\xff\x0c\x05#22007Incorrect datetime value: 'OPTY-2409001'" packet = <pymysql.protocol.MysqlPacket object at 0x7fda29bd4130> File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 219, in raise_for_error err.raise_mysql_exception(self._data) self = <pymysql.protocol.MysqlPacket object at 0x7fda29bd4130> errno = 1292 File "env/lib/python3.10/site-packages/pymysql/err.py", line 150, in raise_mysql_exception raise errorclass(errno, errval) data = b"\xff\x0c\x05#22007Incorrect datetime value: 'OPTY-2409001'" errno = 1292 errval = "Incorrect datetime value: 'OPTY-2409001'" errorclass = <class 'pymysql.err.OperationalError'>pymysql.err.OperationalError: (1292, "Incorrect datetime value: 'OPTY-2409001'")
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
jalajc
changed the title
Getting Error
Getting Error (1292, "Incorrect datetime value: <Linked Doctype Name>) upon adding new custom Date field
Sep 3, 2024
Information about bug
Upon adding a custom date field which fetches data from another doctype and field,
India Compliance App popping up this error
In the instant scenario,
a Date field was added in Quotation Doctype to fetch date from the Opportunity doctype-> Opportunity Date.
Upon saving I am getting this long trail of error.
However, prima facie, the custom field is added in the Quotation Doctype even is error is popped up. Later upon saving the Quotation doctype, the dates from opportunity date is fetched as intended without error.
Nevertheless, I am not sure is the entire flow of addition of custom field is triggered or is interrupted due to this error.
Version
ERPNext: v15.31.1 (version-15)
Frappe Framework: v15.36.0 (version-15)
Frappe HR: v15.24.0 (version-15)
India Compliance: v15.11.0 (version-15)
Payments: v0.0.1 (version-15)
Relevant log output / Stack trace / Full Error Message.
Huly®: IC-2710
The text was updated successfully, but these errors were encountered: