- {%= dateutil.str_to_user(data[i][__("Posting Date")]) %} |
- {%= data[i][__("Journal Entry")] %} |
- {%= __("Against") %}: {%= data[i][__("Against Account")] %}
- {% if (data[i][__("Reference")]) { %}
- {%= __("Reference") %}: {%= data[i][__("Reference")] %}
- {% if (data[i][__("Ref Date")]) { %}
- {%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i][__("Ref Date")]) %}
+ | {%= dateutil.str_to_user(data[i]["posting_date"]) %} |
+ {%= data[i]["journal_entry"] %} |
+ {%= __("Against") %}: {%= data[i]["against_account"] %}
+ {% if (data[i]["reference"]) { %}
+ {%= __("Reference") %}: {%= data[i]["reference"] %}
+ {% if (data[i]["ref_date"]) { %}
+ {%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i]["ref_date"]) %}
{% } %}
{% } %}
- {% if (data[i][__("Clearance Date")]) { %}
- {%= __("Clearance Date") %}: {%= dateutil.str_to_user(data[i][__("Clearance Date")]) %}
+ {% if (data[i]["clearance_date"]) { %}
+ {%= __("Clearance Date") %}: {%= dateutil.str_to_user(data[i]["clearance_date"]) %}
{% } %}
|
- {%= format_currency(data[i][__("Debit")]) %} |
- {%= format_currency(data[i][__("Credit")]) %} |
+ {%= format_currency(data[i]["debit"]) %} |
+ {%= format_currency(data[i]["credit"]) %} |
{% } else { %}
|
|
- {%= data[i][__("Journal Entry")] %} |
- {%= format_currency(data[i][__("Debit")]) %} |
- {%= format_currency(data[i][__("Credit")]) %} |
+ {%= data[i]["journal_entry"] %} |
+ {%= format_currency(data[i]["debit"]) %} |
+ {%= format_currency(data[i]["credit"]) %} |
{% } %}
{% } %}
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index feb144d0dd..b10b72f3fb 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -159,6 +159,7 @@ class PurchaseOrder(BuyingController):
def on_cancel(self):
if self.has_drop_ship_item():
self.update_status_updater()
+ self.update_delivered_qty_in_sales_order()
pc_obj = frappe.get_doc('Purchase Common')
self.check_for_stopped_or_closed_status(pc_obj)
@@ -216,7 +217,7 @@ class PurchaseOrder(BuyingController):
for so_name in sales_orders_to_update:
so = frappe.get_doc("Sales Order", so_name)
- so.update_delivery_status(self.name)
+ so.update_delivery_status()
so.set_status(update=True)
so.notify_update()
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index 23ae746242..498154b69a 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -27,6 +27,7 @@
"options": "icon-user",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -52,6 +53,7 @@
"options": "SUPP-",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -76,6 +78,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -97,6 +100,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -123,6 +127,7 @@
"options": "Supplier Type",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -146,6 +151,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -168,6 +174,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -191,6 +198,7 @@
"options": "Currency",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -214,51 +222,7 @@
"options": "Price List",
"permlevel": 0,
"print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_10",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "default_taxes_and_charges",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Taxes and Charges",
- "length": 0,
- "no_copy": 0,
- "options": "Purchase Taxes and Charges Template",
- "permlevel": 0,
- "print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -281,6 +245,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -306,6 +271,7 @@
"options": "icon-map-marker",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -328,6 +294,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -349,6 +316,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -372,6 +340,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -395,6 +364,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -420,6 +390,7 @@
"options": "Party Account",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -443,6 +414,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -468,6 +440,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -493,6 +466,7 @@
"oldfieldtype": "Code",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -516,6 +490,7 @@
"options": "Communication",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -534,7 +509,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:58.500467",
+ "modified": "2015-12-08 12:52:56.827461",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",
diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py
index eb8d5e9574..73e9d7f0ee 100644
--- a/erpnext/controllers/status_updater.py
+++ b/erpnext/controllers/status_updater.py
@@ -76,10 +76,10 @@ class StatusUpdater(Document):
self.update_qty()
self.validate_qty()
- def set_status(self, update=False, status=None):
+ def set_status(self, update=False, status=None, update_modified=True):
if self.is_new():
return
-
+
if self.doctype in status_map:
_status = self.status
@@ -102,9 +102,10 @@ class StatusUpdater(Document):
if self.status != _status and self.status not in ("Submitted", "Cancelled"):
self.add_comment("Label", _(self.status))
-
+
if update:
- frappe.db.set_value(self.doctype, self.name, "status", self.status)
+ frappe.db.set_value(self.doctype, self.name, "status", self.status,
+ update_modified=update_modified)
def validate_qty(self):
"""Validates qty at row level"""
diff --git a/erpnext/docs/current/api/buying/print_format/drop_shipping/index.txt b/erpnext/docs/current/api/buying/print_format/drop_shipping/index.txt
deleted file mode 100644
index 5c383bd71a..0000000000
--- a/erpnext/docs/current/api/buying/print_format/drop_shipping/index.txt
+++ /dev/null
@@ -1 +0,0 @@
-erpnext.buying.print_format.drop_shipping
\ No newline at end of file
diff --git a/erpnext/docs/current/api/buying/print_format/drop_shipping/erpnext.buying.print_format.drop_shipping.html b/erpnext/docs/current/api/buying/print_format/drop_shipping_format/erpnext.buying.print_format.drop_shipping_format.html
similarity index 78%
rename from erpnext/docs/current/api/buying/print_format/drop_shipping/erpnext.buying.print_format.drop_shipping.html
rename to erpnext/docs/current/api/buying/print_format/drop_shipping_format/erpnext.buying.print_format.drop_shipping_format.html
index d84423e568..9c2648b78a 100644
--- a/erpnext/docs/current/api/buying/print_format/drop_shipping/erpnext.buying.print_format.drop_shipping.html
+++ b/erpnext/docs/current/api/buying/print_format/drop_shipping_format/erpnext.buying.print_format.drop_shipping_format.html
@@ -1,10 +1,10 @@
-
-
+
diff --git a/erpnext/utilities/doctype/address/address.py b/erpnext/utilities/doctype/address/address.py
index a4828914c3..da529fb5b3 100644
--- a/erpnext/utilities/doctype/address/address.py
+++ b/erpnext/utilities/doctype/address/address.py
@@ -10,6 +10,9 @@ from frappe.utils import cstr
from frappe.model.document import Document
class Address(Document):
+ def __setup__(self):
+ self.flags.linked = False
+
def autoname(self):
if not self.address_title:
self.address_title = self.customer \
@@ -42,13 +45,10 @@ class Address(Document):
def link_address(self):
"""Link address based on owner"""
- linked = False
- for fieldname in self.link_fields:
- if self.get(fieldname):
- linked = True
- break
+ if not self.flags.linked:
+ self.check_if_linked()
- if not linked:
+ if not self.flags.linked:
contact = frappe.db.get_value("Contact", {"email_id": self.owner},
("name", "customer", "supplier"), as_dict = True)
if contact:
@@ -57,6 +57,11 @@ class Address(Document):
self.lead = frappe.db.get_value("Lead", {"email_id": self.owner})
+ def check_if_linked(self):
+ for fieldname in self.link_fields:
+ if self.get(fieldname):
+ self.flags.linked = True
+ break
def validate_shipping_address(self):
"""Validate that there can only be one shipping address for particular customer, supplier"""
diff --git a/setup.py b/setup.py
index 56c5b7ddf1..7bf702727d 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = "6.12.4"
+version = "6.12.5"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()