From d98ed8047a9232291a7e2f6540c64bb3e37dbe46 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 6 Dec 2019 12:37:24 +0530 Subject: [PATCH] fix: travis failing --- .../purchase_order_item/purchase_order_item.json | 13 ++++++++++++- erpnext/setup/doctype/email_digest/email_digest.py | 2 +- erpnext/setup/utils.py | 3 ++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json index 15bc97c2a4..6768dfabfe 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json @@ -1,4 +1,5 @@ { + "actions": [], "autoname": "hash", "creation": "2013-05-24 19:29:06", "doctype": "DocType", @@ -43,6 +44,7 @@ "base_amount", "pricing_rules", "is_free_item", + "is_fixed_asset", "section_break_29", "net_rate", "net_amount", @@ -708,11 +710,20 @@ "fieldname": "against_blanket_order", "fieldtype": "Check", "label": "Against Blanket Order" + }, + { + "default": "0", + "fetch_from": "item_code.is_fixed_asset", + "fieldname": "is_fixed_asset", + "fieldtype": "Check", + "label": "Is Fixed Asset", + "read_only": 1 } ], "idx": 1, "istable": 1, - "modified": "2019-11-19 14:10:52.865006", + "links": [], + "modified": "2019-12-06 13:17:12.142799", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Item", diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index 0bcddc2151..4d2d540bbc 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -283,7 +283,7 @@ class EmailDigest(Document): card.value = card.value *-1 card.value = self.fmt_money(card.value,False if key in ("bank_balance", "credit_balance") else True) - cache.setex(cache_key, card, 24 * 60 * 60) + cache.set_value(cache_key, card, expires_in_sec=24 * 60 * 60) context.cards.append(card) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index d1c206d8b1..1a86b79ad1 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -106,7 +106,8 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No # expire in 6 hours response.raise_for_status() value = response.json()["rates"][to_currency] - cache.setex(key, value, 6 * 60 * 60) + + cache.set_value(key, value, expires_in_sec=6 * 60 * 60) return flt(value) except: frappe.log_error(title="Get Exchange Rate")