mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
Merge pull request #51279 from frappe/version-14-hotfix
chore: release v14
This commit is contained in:
2
.github/helper/install.sh
vendored
2
.github/helper/install.sh
vendored
@@ -4,6 +4,8 @@ set -e
|
|||||||
|
|
||||||
cd ~ || exit
|
cd ~ || exit
|
||||||
|
|
||||||
|
export BENCH_DISABLE_UV=1
|
||||||
|
|
||||||
sudo apt update && sudo apt install redis-server libcups2-dev
|
sudo apt update && sudo apt install redis-server libcups2-dev
|
||||||
|
|
||||||
pip install frappe-bench
|
pip install frappe-bench
|
||||||
|
|||||||
@@ -2,6 +2,15 @@ import frappe
|
|||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
try:
|
||||||
|
from erpnext.patches.v16_0.update_currency_exchange_settings_for_frankfurter import execute
|
||||||
|
|
||||||
|
execute()
|
||||||
|
except ImportError:
|
||||||
|
update_frankfurter_app_parameter_and_result()
|
||||||
|
|
||||||
|
|
||||||
|
def update_frankfurter_app_parameter_and_result():
|
||||||
settings = frappe.get_doc("Currency Exchange Settings")
|
settings = frappe.get_doc("Currency Exchange Settings")
|
||||||
if settings.service_provider != "frankfurter.app":
|
if settings.service_provider != "frankfurter.app":
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ erpnext.SerialNoBatchSelector = class SerialNoBatchSelector {
|
|||||||
query: "erpnext.controllers.queries.get_batch_no",
|
query: "erpnext.controllers.queries.get_batch_no",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onchange: function () {
|
change: function () {
|
||||||
const batch_no = this.get_value();
|
const batch_no = this.get_value();
|
||||||
if (!batch_no) {
|
if (!batch_no) {
|
||||||
this.grid_row.on_grid_fields_dict.available_qty.set_value(0);
|
this.grid_row.on_grid_fields_dict.available_qty.set_value(0);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from frappe.cache_manager import clear_defaults_cache
|
|||||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||||
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
|
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
|
||||||
from frappe.desk.page.setup_wizard.setup_wizard import make_records
|
from frappe.desk.page.setup_wizard.setup_wizard import make_records
|
||||||
from frappe.utils import cint, formatdate, get_link_to_form, get_timestamp, today
|
from frappe.utils import add_months, cint, formatdate, get_first_day, get_link_to_form, get_timestamp, today
|
||||||
from frappe.utils.nestedset import NestedSet, rebuild_tree
|
from frappe.utils.nestedset import NestedSet, rebuild_tree
|
||||||
|
|
||||||
from erpnext.accounts.doctype.account.account import get_account_currency
|
from erpnext.accounts.doctype.account.account import get_account_currency
|
||||||
@@ -614,27 +614,29 @@ def install_country_fixtures(company, country):
|
|||||||
|
|
||||||
|
|
||||||
def update_company_current_month_sales(company):
|
def update_company_current_month_sales(company):
|
||||||
current_month_year = formatdate(today(), "MM-yyyy")
|
from_date = get_first_day(today())
|
||||||
|
to_date = get_first_day(add_months(from_date, 1))
|
||||||
|
|
||||||
results = frappe.db.sql(
|
results = frappe.db.sql(
|
||||||
f"""
|
"""
|
||||||
SELECT
|
SELECT
|
||||||
SUM(base_grand_total) AS total,
|
SUM(base_grand_total) AS total,
|
||||||
DATE_FORMAT(`posting_date`, '%m-%Y') AS month_year
|
DATE_FORMAT(posting_date, '%%m-%%Y') AS month_year
|
||||||
FROM
|
FROM
|
||||||
`tabSales Invoice`
|
`tabSales Invoice`
|
||||||
WHERE
|
WHERE
|
||||||
DATE_FORMAT(`posting_date`, '%m-%Y') = '{current_month_year}'
|
posting_date >= %s
|
||||||
|
AND posting_date < %s
|
||||||
AND docstatus = 1
|
AND docstatus = 1
|
||||||
AND company = {frappe.db.escape(company)}
|
AND company = %s
|
||||||
GROUP BY
|
GROUP BY
|
||||||
month_year
|
month_year
|
||||||
""",
|
""",
|
||||||
|
(from_date, to_date, company),
|
||||||
as_dict=True,
|
as_dict=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
monthly_total = results[0]["total"] if len(results) > 0 else 0
|
monthly_total = results[0]["total"] if len(results) > 0 else 0
|
||||||
|
|
||||||
frappe.db.set_value("Company", company, "total_monthly_sales", monthly_total)
|
frappe.db.set_value("Company", company, "total_monthly_sales", monthly_total)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ dependencies = [
|
|||||||
"python-youtube~=0.8.0",
|
"python-youtube~=0.8.0",
|
||||||
"taxjar~=1.9.2",
|
"taxjar~=1.9.2",
|
||||||
"tweepy~=3.10.0",
|
"tweepy~=3.10.0",
|
||||||
|
|
||||||
|
# Pin for compatibility, v2 has breaking changes
|
||||||
|
"urllib3>=1.26.4,<2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|||||||
Reference in New Issue
Block a user