Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Failing accounting dimension patch #30982

Conversation

deepeshgarg007
Copy link
Member

@deepeshgarg007 deepeshgarg007 commented May 12, 2022

Introduced in #30806

Fix for :

  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py", line 36, in execute
    create_custom_field(doctype, df, ignore_validate=False)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 176, in create_custom_field
    custom_field.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 254, in insert
    self.run_method("before_insert")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 941, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1260, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1242, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 938, in fn
    return method_object(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 45, in before_insert
    _("A field with the name '{}' already exists in doctype {}.").format(self.fieldname, self.dt)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 510, in throw
    as_list=as_list,
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 478, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 433, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: A field with the name 'customer_group' already exists in doctype Sales Order.

@deepeshgarg007
Copy link
Member Author

@Mergifyio backport develop

@deepeshgarg007 deepeshgarg007 merged commit 43ebe94 into frappe:version-13-hotfix May 12, 2022
@mergify
Copy link
Contributor

mergify bot commented May 12, 2022

backport develop

✅ Backports have been created

@deepeshgarg007
Copy link
Member Author

@Mergifyio backport version-13-pre-release

@mergify
Copy link
Contributor

mergify bot commented May 12, 2022

backport version-13-pre-release

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request May 12, 2022
…se/pr-30982

fix: Failing accounting dimension patch (backport #30982)
deepeshgarg007 added a commit that referenced this pull request May 12, 2022
fix: Failing accounting dimension patch (backport #30982)
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 13.30.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants