diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.txt b/accounts/doctype/purchase_invoice/purchase_invoice.txt index 1b1dab21b1..f894834230 100755 --- a/accounts/doctype/purchase_invoice/purchase_invoice.txt +++ b/accounts/doctype/purchase_invoice/purchase_invoice.txt @@ -4,7 +4,7 @@ "docstatus": 0, "creation": "2013-01-15 18:42:58", "modified_by": "Administrator", - "modified": "2013-01-17 20:11:05" + "modified": "2013-01-17 20:24:23" }, { "autoname": "naming_series:", @@ -279,6 +279,7 @@ "permlevel": 0 }, { + "print_hide": 1, "doctype": "DocField", "label": "Price List", "options": "Price List", @@ -287,6 +288,8 @@ "permlevel": 0 }, { + "print_hide": 1, + "depends_on": "price_list_name", "doctype": "DocField", "label": "Price List Currency", "options": "Currency", @@ -295,6 +298,8 @@ "permlevel": 0 }, { + "print_hide": 1, + "depends_on": "price_list_name", "doctype": "DocField", "label": "Price List Exchange Rate", "fieldname": "plc_conversion_rate", diff --git a/buying/doctype/purchase_order/purchase_order.txt b/buying/doctype/purchase_order/purchase_order.txt index f4570e89c1..f7e0a84712 100644 --- a/buying/doctype/purchase_order/purchase_order.txt +++ b/buying/doctype/purchase_order/purchase_order.txt @@ -4,7 +4,7 @@ "docstatus": 0, "creation": "2013-01-17 11:11:23", "modified_by": "Administrator", - "modified": "2013-01-17 12:49:14" + "modified": "2013-01-17 20:26:53" }, { "autoname": "naming_series:", @@ -37,15 +37,6 @@ "name": "Purchase Order", "doctype": "DocType" }, - { - "print_width": "50%", - "oldfieldtype": "Column Break", - "doctype": "DocField", - "width": "50%", - "fieldname": "column_break0", - "fieldtype": "Column Break", - "permlevel": 0 - }, { "print_hide": 1, "description": "To manage multiple series please go to Setup > Manage Series", @@ -300,6 +291,7 @@ "permlevel": 0 }, { + "print_hide": 1, "doctype": "DocField", "label": "Price List", "options": "Price List", @@ -308,6 +300,8 @@ "permlevel": 0 }, { + "print_hide": 1, + "depends_on": "price_list_name", "doctype": "DocField", "label": "Price List Currency", "options": "Currency", @@ -316,6 +310,8 @@ "permlevel": 0 }, { + "print_hide": 1, + "depends_on": "price_list_name", "doctype": "DocField", "label": "Price List Exchange Rate", "fieldname": "plc_conversion_rate", diff --git a/buying/doctype/supplier_quotation/supplier_quotation.txt b/buying/doctype/supplier_quotation/supplier_quotation.txt index d11f482c35..cc95a497b4 100644 --- a/buying/doctype/supplier_quotation/supplier_quotation.txt +++ b/buying/doctype/supplier_quotation/supplier_quotation.txt @@ -4,7 +4,7 @@ "docstatus": 0, "creation": "2013-01-17 11:11:23", "modified_by": "Administrator", - "modified": "2013-01-17 19:56:48" + "modified": "2013-01-17 20:25:22" }, { "autoname": "naming_series:", @@ -241,6 +241,7 @@ "permlevel": 0 }, { + "print_hide": 1, "doctype": "DocField", "label": "Price List", "options": "Price List", @@ -249,6 +250,8 @@ "permlevel": 0 }, { + "print_hide": 1, + "depends_on": "price_list_name", "doctype": "DocField", "label": "Price List Currency", "options": "Currency", @@ -257,6 +260,8 @@ "permlevel": 0 }, { + "print_hide": 1, + "depends_on": "price_list_name", "doctype": "DocField", "label": "Price List Exchange Rate", "fieldname": "plc_conversion_rate", diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py index f9c33edbdd..ae24cfe10a 100644 --- a/controllers/buying_controller.py +++ b/controllers/buying_controller.py @@ -28,7 +28,9 @@ class BuyingController(TransactionBase): if self.meta.get_field("currency"): self.company_currency = get_company_currency(self.doc.company) self.validate_conversion_rate("currency", "conversion_rate") - self.validate_conversion_rate("price_list_currency", "plc_conversion_rate") + + if self.doc.price_list_name and self.doc.price_list_currency: + self.validate_conversion_rate("price_list_currency", "plc_conversion_rate") def update_item_details(self): for item in self.doclist.get({"parentfield": self.fname}): diff --git a/stock/doctype/purchase_receipt/purchase_receipt.txt b/stock/doctype/purchase_receipt/purchase_receipt.txt index 8273dfe4ec..9de7fc29b9 100755 --- a/stock/doctype/purchase_receipt/purchase_receipt.txt +++ b/stock/doctype/purchase_receipt/purchase_receipt.txt @@ -4,7 +4,7 @@ "docstatus": 0, "creation": "2013-01-17 11:11:24", "modified_by": "Administrator", - "modified": "2013-01-17 20:17:44" + "modified": "2013-01-17 20:23:38" }, { "autoname": "naming_series:", @@ -316,6 +316,7 @@ "permlevel": 0 }, { + "print_hide": 1, "doctype": "DocField", "label": "Price List", "options": "Price List", @@ -324,14 +325,19 @@ "permlevel": 0 }, { + "print_hide": 1, + "depends_on": "price_list_name", "doctype": "DocField", "label": "Price List Currency", "options": "Currency", "fieldname": "price_list_currency", "fieldtype": "Link", + "hidden": 0, "permlevel": 0 }, { + "print_hide": 1, + "depends_on": "price_list_name", "doctype": "DocField", "label": "Price List Exchange Rate", "fieldname": "plc_conversion_rate",