print hide price list related fields

This commit is contained in:
Anand Doshi 2013-01-17 20:29:28 +05:30
parent f8f0c0d089
commit 8957bf9e09
5 changed files with 28 additions and 14 deletions

View File

@ -4,7 +4,7 @@
"docstatus": 0, "docstatus": 0,
"creation": "2013-01-15 18:42:58", "creation": "2013-01-15 18:42:58",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2013-01-17 20:11:05" "modified": "2013-01-17 20:24:23"
}, },
{ {
"autoname": "naming_series:", "autoname": "naming_series:",
@ -279,6 +279,7 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Price List", "label": "Price List",
"options": "Price List", "options": "Price List",
@ -287,6 +288,8 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"depends_on": "price_list_name",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Currency", "label": "Price List Currency",
"options": "Currency", "options": "Currency",
@ -295,6 +298,8 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"depends_on": "price_list_name",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Exchange Rate", "label": "Price List Exchange Rate",
"fieldname": "plc_conversion_rate", "fieldname": "plc_conversion_rate",

View File

@ -4,7 +4,7 @@
"docstatus": 0, "docstatus": 0,
"creation": "2013-01-17 11:11:23", "creation": "2013-01-17 11:11:23",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2013-01-17 12:49:14" "modified": "2013-01-17 20:26:53"
}, },
{ {
"autoname": "naming_series:", "autoname": "naming_series:",
@ -37,15 +37,6 @@
"name": "Purchase Order", "name": "Purchase Order",
"doctype": "DocType" "doctype": "DocType"
}, },
{
"print_width": "50%",
"oldfieldtype": "Column Break",
"doctype": "DocField",
"width": "50%",
"fieldname": "column_break0",
"fieldtype": "Column Break",
"permlevel": 0
},
{ {
"print_hide": 1, "print_hide": 1,
"description": "To manage multiple series please go to Setup > Manage Series", "description": "To manage multiple series please go to Setup > Manage Series",
@ -300,6 +291,7 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Price List", "label": "Price List",
"options": "Price List", "options": "Price List",
@ -308,6 +300,8 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"depends_on": "price_list_name",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Currency", "label": "Price List Currency",
"options": "Currency", "options": "Currency",
@ -316,6 +310,8 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"depends_on": "price_list_name",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Exchange Rate", "label": "Price List Exchange Rate",
"fieldname": "plc_conversion_rate", "fieldname": "plc_conversion_rate",

View File

@ -4,7 +4,7 @@
"docstatus": 0, "docstatus": 0,
"creation": "2013-01-17 11:11:23", "creation": "2013-01-17 11:11:23",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2013-01-17 19:56:48" "modified": "2013-01-17 20:25:22"
}, },
{ {
"autoname": "naming_series:", "autoname": "naming_series:",
@ -241,6 +241,7 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Price List", "label": "Price List",
"options": "Price List", "options": "Price List",
@ -249,6 +250,8 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"depends_on": "price_list_name",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Currency", "label": "Price List Currency",
"options": "Currency", "options": "Currency",
@ -257,6 +260,8 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"depends_on": "price_list_name",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Exchange Rate", "label": "Price List Exchange Rate",
"fieldname": "plc_conversion_rate", "fieldname": "plc_conversion_rate",

View File

@ -28,6 +28,8 @@ class BuyingController(TransactionBase):
if self.meta.get_field("currency"): if self.meta.get_field("currency"):
self.company_currency = get_company_currency(self.doc.company) self.company_currency = get_company_currency(self.doc.company)
self.validate_conversion_rate("currency", "conversion_rate") self.validate_conversion_rate("currency", "conversion_rate")
if self.doc.price_list_name and self.doc.price_list_currency:
self.validate_conversion_rate("price_list_currency", "plc_conversion_rate") self.validate_conversion_rate("price_list_currency", "plc_conversion_rate")
def update_item_details(self): def update_item_details(self):

View File

@ -4,7 +4,7 @@
"docstatus": 0, "docstatus": 0,
"creation": "2013-01-17 11:11:24", "creation": "2013-01-17 11:11:24",
"modified_by": "Administrator", "modified_by": "Administrator",
"modified": "2013-01-17 20:17:44" "modified": "2013-01-17 20:23:38"
}, },
{ {
"autoname": "naming_series:", "autoname": "naming_series:",
@ -316,6 +316,7 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"doctype": "DocField", "doctype": "DocField",
"label": "Price List", "label": "Price List",
"options": "Price List", "options": "Price List",
@ -324,14 +325,19 @@
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"depends_on": "price_list_name",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Currency", "label": "Price List Currency",
"options": "Currency", "options": "Currency",
"fieldname": "price_list_currency", "fieldname": "price_list_currency",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"permlevel": 0 "permlevel": 0
}, },
{ {
"print_hide": 1,
"depends_on": "price_list_name",
"doctype": "DocField", "doctype": "DocField",
"label": "Price List Exchange Rate", "label": "Price List Exchange Rate",
"fieldname": "plc_conversion_rate", "fieldname": "plc_conversion_rate",