Fieldname payroll_period conflicting with meta object

Hi,

I added Link Field “payroll_period” in the Salary Slip Doctype four months back using the customize form and everything was working fine. Yesterday I wanted to update the ERPNext and Frappe HRMS and now update is failing for HRMS stating error “Fieldname payroll_period conflicting with meta object”.

I tried removing the custom field “payroll_period” from the Doctype and tried to update after that, but still, I am getting same problem. If I remove the field from Database table then update is working fine, but I already have data in that column and don’t want to do that way.

If anybody can throw some light on what the reason may be for this error.

ERPNext Version - 14.13.0
Frappe Framework - 14.23.0
Frappe HR - 14.0.0

Below is the trace:

Installing paie...
Updating DocTypes for paie          : [========================================] 100%
An error occurred while installing paie: Fieldname payroll_period conflicting with meta object
Traceback (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 416, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/installer.py", line 307, in install_app
    sync_fixtures(name)
  File "apps/frappe/frappe/utils/fixtures.py", line 22, in sync_fixtures
    import_doc(fixtures_path)
  File "apps/frappe/frappe/core/doctype/data_import/data_import.py", line 216, in import_doc
    import_file_by_path(
  File "apps/frappe/frappe/modules/import_file.py", line 145, in import_file_by_path
    import_doc(
  File "apps/frappe/frappe/modules/import_file.py", line 242, in import_doc
    doc.insert()
  File "apps/frappe/frappe/model/document.py", line 259, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1045, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 914, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1264, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1246, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 911, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 95, in validate
    check_fieldname_conflicts(self)
  File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1706, in check_fieldname_conflicts
    frappe.msgprint(msg, raise_exception=not docfield.is_virtual)
  File "apps/frappe/frappe/__init__.py", line 493, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 444, in _raise_exception
    raise ValidationError(msg)
frappe.exceptions.ValidationError: Fieldname payroll_period conflicting with meta object

Thanks,

Divyesh Mangroliya

Is any update on this.

Hi,

I created the custom field with new name and copied the old data to new column. After this I removed the conflicting field from ERPNEXT and from database.

This approach solved the update issue and updated the application to lastest version.

Regards,

Divyesh Mangroliya