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] Reference Document is required to create Payment Request #8729

Merged

Conversation

saurabh6790
Copy link
Member

payment_reuqest_fix


Traceback (most recent call last):
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
    doc.save()
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 231, in save
    return self._save(*args, **kwargs)
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 254, in _save
    self.insert()
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 193, in insert
    self.run_before_save_methods()
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 772, in run_before_save_methods
    self.run_method("validate")
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 667, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 892, in composer
    return composed(self, method, *args, **kwargs)
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 875, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 661, in 
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/Users/saurabh/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py", line 18, in validate
    self.validate_currency()
  File "/Users/saurabh/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py", line 26, in validate_currency
    ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/__init__.py", line 606, in get_doc
    return frappe.model.document.get_doc(arg1, arg2)
  File "/Users/saurabh/frappe-bench/apps/frappe/frappe/model/document.py", line 47, in get_doc
    doctype = arg1.get("doctype")
AttributeError: 'NoneType' object has no attribute 'get'

@nabinhait nabinhait merged commit 9df45bb into frappe:develop May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants