Merge pull request #17178 from Anurag810/timesheet_report_fixes
fix: timesheet_report (WN-SUP41913)
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 6dbdab8..993a4e6 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
-__version__ = '11.1.19'
+__version__ = '11.1.20'
def get_default_company(user=None):
'''Get default company for user'''
@@ -144,15 +144,4 @@
last_membership = get_last_membership()
if last_membership and getdate(last_membership.to_date) > getdate():
return True
- return False
-
-def check_branch_compatibility_with_frappe():
- from frappe.utils.change_log import get_versions
- versions = get_versions()
- frappe_branch = versions["frappe"]["branch"]
- erpnext_branch = versions["erpnext"]["branch"]
-
- if frappe_branch in ("hotfix", "master") and erpnext_branch == "develop":
- raise frappe.IncompatibleApp("Frappe is on branch: {} and ERPNext is on branch: {}".format(frappe_branch, erpnext_branch))
- if erpnext_branch in ("hotfix", "master") and frappe_branch == "develop":
- raise frappe.IncompatibleApp("Frappe is on branch: {} and ERPNext is on branch: {}".format(frappe_branch, erpnext_branch))
+ return False
\ No newline at end of file
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index dbb5aff..ccdd412 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -27,8 +27,6 @@
welcome_email = "erpnext.setup.utils.welcome_email"
-connect = "erpnext.check_branch_compatibility_with_frappe"
-
# setup wizard
setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
setup_wizard_stages = "erpnext.setup.setup_wizard.setup_wizard.get_setup_stages"
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 8761f4e..e93e7d9 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -725,7 +725,7 @@
_('Cannot change Attributes after stock transaction. Make a new Item and transfer stock to the new Item'))
def validate_variant_based_on_change(self):
- if self.variant_of or (self.has_variants and frappe.get_all("Item", {"variant_of": self.name})):
+ if not self.is_new() and (self.variant_of or (self.has_variants and frappe.get_all("Item", {"variant_of": self.name}))):
if self.variant_based_on != frappe.db.get_value("Item", self.name, "variant_based_on"):
frappe.throw(_("Variant Based On cannot be changed"))
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index fb0c05f..04d737f 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -60,7 +60,7 @@
{{doc.terms}}
</div>
<div class="cart-link">
- <a href="#" onclick="show_terms();return false;">*{{ __("Terms and Conditions") }}</a>
+ <a href="#" onclick="show_terms();return false;">*{{ _("Terms and Conditions") }}</a>
</div>
{% endif %}