Rename item problem

I am having the following problem, i have made two different items for the same thing, and now i am trying to remove one of them, i cant delete because the item is linked to a sales invoice, so i tried to rename and mark "merge with existing" and nothing happens. I have renamed other items and merged and had no problems, but for this one its not working.

The console is showing the following error:

Traceback (innermost last): File "../lib/webnotes/handler.py", line 113, in handle execute_cmd(cmd) File "../lib/webnotes/handler.py", line 153, in execute_cmd ret = call(method, webnotes.form_dict) File "../lib/webnotes/handler.py", line 170, in call return fn(**newargs) File "../lib/webnotes/model/rename_doc.py", line 29, in rename_doc new = obj.on_rename(new, old, merge) or new File "../app/stock/doctype/item/item.py", line 275, in on_rename update_entries_after({"item_code": newdn, "warehouse": wh}) File "../app/stock/stock_ledger.py", line 29, in update_entries_after previous_sle = get_sle_before_datetime(args) File "../app/stock/stock_ledger.py", line 106, in get_sle_before_datetime "desc", "limit 1", for_update=for_update) File "../app/stock/stock_ledger.py", line 135, in get_stock_ledger_entries }, args, as_dict=1) File "../lib/webnotes/db.py", line 111, in sql raise e 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 ')\n\t\tand ifnull(is_cancelled, 'No') = 'No'\n\t\tand timestamp(posting_date, posting_' at line 3")



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

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

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

Please post such issues on developer forum or github. Please only usability issues here.

You also need to provide some context - what is the data - how can we replicate it.


W: https://erpnext.com
T: @rushabh_mehta

On 21-Aug-2013, at 9:47 PM, Hernan Gonzalez <nu...@gmail.com> wrote:

I am having the following problem, i have made two different items for the same thing, and now i am trying to remove one of them, i cant delete because the item is linked to a sales invoice, so i tried to rename and mark "merge with existing" and nothing happens. I have renamed other items and merged and had no problems, but for this one its not working.

The console is showing the following error:

Traceback (innermost last): File "../lib/webnotes/handler.py", line 113, in handle execute_cmd(cmd) File "../lib/webnotes/handler.py", line 153, in execute_cmd ret = call(method, webnotes.form_dict) File "../lib/webnotes/handler.py", line 170, in call return fn(**newargs) File "../lib/webnotes/model/rename_doc.py", line 29, in rename_doc new = obj.on_rename(new, old, merge) or new File "../app/stock/doctype/item/item.py", line 275, in on_rename update_entries_after({"item_code": newdn, "warehouse": wh}) File "../app/stock/stock_ledger.py", line 29, in update_entries_after previous_sle = get_sle_before_datetime(args) File "../app/stock/stock_ledger.py", line 106, in get_sle_before_datetime "desc", "limit 1", for_update=for_update) File "../app/stock/stock_ledger.py", line 135, in get_stock_ledger_entries }, args, as_dict=1) File "../lib/webnotes/db.py", line 111, in sql raise e 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 ')\n\t\tand ifnull(is_cancelled, 'No') = 'No'\n\t\tand timestamp(posting_date, posting_' at line 3")



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

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

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




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

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

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

There was a bug in item merging code, we have fixed that. Thanks for reporting the issue.

On 22-Aug-2013, at 9:57 AM, Rushabh Mehta wrote:

Please post such issues on developer forum or github. Please only usability issues here.

You also need to provide some context - what is the data - how can we replicate it.


W: https://erpnext.com
T: @rushabh_mehta

On 21-Aug-2013, at 9:47 PM, Hernan Gonzalez <nu...@gmail.com> wrote:

I am having the following problem, i have made two different items for the same thing, and now i am trying to remove one of them, i cant delete because the item is linked to a sales invoice, so i tried to rename and mark "merge with existing" and nothing happens. I have renamed other items and merged and had no problems, but for this one its not working.

The console is showing the following error:

Traceback (innermost last): File "../lib/webnotes/handler.py", line 113, in handle execute_cmd(cmd) File "../lib/webnotes/handler.py", line 153, in execute_cmd ret = call(method, webnotes.form_dict) File "../lib/webnotes/handler.py", line 170, in call return fn(**newargs) File "../lib/webnotes/model/rename_doc.py", line 29, in rename_doc new = obj.on_rename(new, old, merge) or new File "../app/stock/doctype/item/item.py", line 275, in on_rename update_entries_after({"item_code": newdn, "warehouse": wh}) File "../app/stock/stock_ledger.py", line 29, in update_entries_after previous_sle = get_sle_before_datetime(args) File "../app/stock/stock_ledger.py", line 106, in get_sle_before_datetime "desc", "limit 1", for_update=for_update) File "../app/stock/stock_ledger.py", line 135, in get_stock_ledger_entries }, args, as_dict=1) File "../lib/webnotes/db.py", line 111, in sql raise e 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 ')\n\t\tand ifnull(is_cancelled, 'No') = 'No'\n\t\tand timestamp(posting_date, posting_' at line 3")



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

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

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





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

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

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




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

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

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

Its working fine now, thanks a lot.

On Thursday, August 22, 2013 2:21:02 AM UTC-3, Nabin Hait wrote:
There was a bug in item merging code, we have fixed that. Thanks for reporting the issue.

On 22-Aug-2013, at 9:57 AM, Rushabh Mehta wrote:

Please post such issues on developer forum or github. Please only usability issues here.

You also need to provide some context - what is the data - how can we replicate it.


W: https://erpnext.com
T: @rushabh_mehta

On 21-Aug-2013, at 9:47 PM, Hernan Gonzalez <nu...@gmail.com> wrote:

I am having the following problem, i have made two different items for the same thing, and now i am trying to remove one of them, i cant delete because the item is linked to a sales invoice, so i tried to rename and mark "merge with existing" and nothing happens. I have renamed other items and merged and had no problems, but for this one its not working.

The console is showing the following error:

Traceback (innermost last): File "../lib/webnotes/handler.py", line 113, in handle execute_cmd(cmd) File "../lib/webnotes/handler.py", line 153, in execute_cmd ret = call(method, webnotes.form_dict) File "../lib/webnotes/handler.py", line 170, in call return fn(**newargs) File "../lib/webnotes/model/rename_doc.py", line 29, in rename_doc new = obj.on_rename(new, old, merge) or new File "../app/stock/doctype/item/item.py", line 275, in on_rename update_entries_after({"item_code": newdn, "warehouse": wh}) File "../app/stock/stock_ledger.py", line 29, in update_entries_after previous_sle = get_sle_before_datetime(args) File "../app/stock/stock_ledger.py", line 106, in get_sle_before_datetime "desc", "limit 1", for_update=for_update) File "../app/stock/stock_ledger.py", line 135, in get_stock_ledger_entries }, args, as_dict=1) File "../lib/webnotes/db.py", line 111, in sql raise e 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 ')\n\t\tand ifnull(is_cancelled, 'No') = 'No'\n\t\tand timestamp(posting_date, posting_' at line 3")



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

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

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





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

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

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




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

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

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