Unable to create a Purchase Invoice


I am creating a Purchase Invoice, when i select the "Credit To", this is the error that i am getting : "None does not have an Account Head in BusinessClouds. You must first create it from the Supplier Master"

Traceback :

Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/handler.py", line 22, in runserverobj webnotes.widgets.form.run_method.runserverobj() File "lib/webnotes/widgets/form/run_method.py", line 40, in runserverobj r = webnotes.model.code.run_server_obj(so, method, arg) File "lib/webnotes/model/code.py", line 102, in run_server_obj return getattr(server_obj, method_name)() File "app/accounts/doctype/purchase_invoice/purchase_invoice.py", line 85, in set_supplier_defaults super(DocType, self).set_supplier_defaults() File "app/utilities/transaction_base.py", line 129, in set_supplier_defaults for fieldname, val in self.get_supplier_defaults().items(): File "app/utilities/transaction_base.py", line 117, in get_supplier_defaults out = self.get_default_address_and_contact("supplier") File "app/utilities/transaction_base.py", line 20, in get_default_address_and_contact fetch_shipping_address=True if self.meta.get_field("shipping_address_name") else False) File "app/utilities/transaction_base.py", line 314, in get_default_address_and_contact billing_address = get_default_address(party_field, party_name) File "app/utilities/transaction_base.py", line 345, in get_default_address limit 1""" % (party_field, "%s", order_by), party_name) File "lib/webnotes/db.py", line 96, in sql self._cursor.execute(query, values) File "/home/user/erpnext/lib/python2.7/site-packages/MySQLdb/cursors.py", line 201, in execute self.errorhandler(self, exc, value) File "/home/user/erpnext/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s order by is_primary_address desc, name asc\n\t\tlimit 1' at line 1")



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3e1b5ca3-6761-4d57-b236-805129bbe22f%40googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Open the "Credit to" account record and check whether customer is linked to the account via "Master Name" field.

On 16-Feb-2014, at 4:36 PM, Syed Qadeer wrote:


I am creating a Purchase Invoice, when i select the "Credit To", this is the error that i am getting : "None does not have an Account Head in BusinessClouds. You must first create it from the Supplier Master"

Traceback :

Traceback (innermost last): File "lib/webnotes/handler.py", line 78, in handle execute_cmd(cmd) File "lib/webnotes/handler.py", line 118, in execute_cmd ret = call(method, webnotes.form_dict) File "lib/webnotes/handler.py", line 140, in call return fn(**newargs) File "lib/webnotes/handler.py", line 22, in runserverobj webnotes.widgets.form.run_method.runserverobj() File "lib/webnotes/widgets/form/run_method.py", line 40, in runserverobj r = webnotes.model.code.run_server_obj(so, method, arg) File "lib/webnotes/model/code.py", line 102, in run_server_obj return getattr(server_obj, method_name)() File "app/accounts/doctype/purchase_invoice/purchase_invoice.py", line 85, in set_supplier_defaults super(DocType, self).set_supplier_defaults() File "app/utilities/transaction_base.py", line 129, in set_supplier_defaults for fieldname, val in self.get_supplier_defaults().items(): File "app/utilities/transaction_base.py", line 117, in get_supplier_defaults out = self.get_default_address_and_contact("supplier") File "app/utilities/transaction_base.py", line 20, in get_default_address_and_contact fetch_shipping_address=True if self.meta.get_field("shipping_address_name") else False) File "app/utilities/transaction_base.py", line 314, in get_default_address_and_contact billing_address = get_default_address(party_field, party_name) File "app/utilities/transaction_base.py", line 345, in get_default_address limit 1""" % (party_field, "%s", order_by), party_name) File "lib/webnotes/db.py", line 96, in sql self._cursor.execute(query, values) File "/home/user/erpnext/lib/python2.7/site-packages/MySQLdb/cursors.py", line 201, in execute self.errorhandler(self, exc, value) File "/home/user/erpnext/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s order by is_primary_address desc, name asc\n\t\tlimit 1' at line 1")



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3e1b5ca3-6761-4d57-b236-805129bbe22f%40googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/A605523E-79A4-4134-9CE6-951B8C775558%40gmail.com.

    For more options, visit https://groups.google.com/groups/opt_out.