commit | 1915e15a9ed8f63edccd2fab42f4ca670ddd6677 | [log] [tgz] |
---|---|---|
author | deepeshgarg007 <deepeshgarg6@gmail.com> | Thu Feb 21 17:55:57 2019 +0530 |
committer | deepeshgarg007 <deepeshgarg6@gmail.com> | Thu Feb 21 17:55:57 2019 +0530 |
tree | 1da18233b8b5b8529c36725d2b125a0bf09576e4 | |
parent | 463a3cf8cf003ab4afa8f8ba165c36b036b44a17 [diff] |
fix: State code issue fix in regional module(Italy)
diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index c86ad78..421994c 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py
@@ -300,6 +300,9 @@ return progressive_name, progressive_number def set_state_code(doc, method): + if not doc.get('state'): + return + if not (hasattr(doc, "state_code") and doc.country in ["Italy", "Italia", "Italian Republic", "Repubblica Italiana"]): return