mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
Merge branch 'develop' into fix_test_for_pr_tool
This commit is contained in:
@@ -1243,7 +1243,7 @@ class TestWorkOrder(FrappeTestCase):
|
|||||||
ste_doc.insert()
|
ste_doc.insert()
|
||||||
ste_doc.submit()
|
ste_doc.submit()
|
||||||
|
|
||||||
batch_list = [row.batch_no for row in ste_doc.items]
|
batch_list = sorted([row.batch_no for row in ste_doc.items])
|
||||||
|
|
||||||
wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4)
|
wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4)
|
||||||
transferred_ste_doc = frappe.get_doc(
|
transferred_ste_doc = frappe.get_doc(
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ def boot_session(bootinfo):
|
|||||||
if frappe.session["user"] != "Guest":
|
if frappe.session["user"] != "Guest":
|
||||||
update_page_info(bootinfo)
|
update_page_info(bootinfo)
|
||||||
|
|
||||||
load_country_and_currency(bootinfo)
|
|
||||||
bootinfo.sysdefaults.territory = frappe.db.get_single_value("Selling Settings", "territory")
|
bootinfo.sysdefaults.territory = frappe.db.get_single_value("Selling Settings", "territory")
|
||||||
bootinfo.sysdefaults.customer_group = frappe.db.get_single_value(
|
bootinfo.sysdefaults.customer_group = frappe.db.get_single_value(
|
||||||
"Selling Settings", "customer_group"
|
"Selling Settings", "customer_group"
|
||||||
@@ -53,20 +52,6 @@ def boot_session(bootinfo):
|
|||||||
bootinfo.party_account_types = frappe._dict(party_account_types)
|
bootinfo.party_account_types = frappe._dict(party_account_types)
|
||||||
|
|
||||||
|
|
||||||
def load_country_and_currency(bootinfo):
|
|
||||||
country = frappe.db.get_default("country")
|
|
||||||
if country and frappe.db.exists("Country", country):
|
|
||||||
bootinfo.docs += [frappe.get_doc("Country", country)]
|
|
||||||
|
|
||||||
bootinfo.docs += frappe.db.sql(
|
|
||||||
"""select name, fraction, fraction_units,
|
|
||||||
number_format, smallest_currency_fraction_value, symbol from tabCurrency
|
|
||||||
where enabled=1""",
|
|
||||||
as_dict=1,
|
|
||||||
update={"doctype": ":Currency"},
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def update_page_info(bootinfo):
|
def update_page_info(bootinfo):
|
||||||
bootinfo.page_info.update(
|
bootinfo.page_info.update(
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -511,6 +511,7 @@ class PurchaseReceipt(BuyingController):
|
|||||||
and not d.is_fixed_asset
|
and not d.is_fixed_asset
|
||||||
and flt(d.qty)
|
and flt(d.qty)
|
||||||
and provisional_accounting_for_non_stock_items
|
and provisional_accounting_for_non_stock_items
|
||||||
|
and d.get("provisional_expense_account")
|
||||||
):
|
):
|
||||||
self.add_provisional_gl_entry(
|
self.add_provisional_gl_entry(
|
||||||
d, gl_entries, self.posting_date, d.get("provisional_expense_account")
|
d, gl_entries, self.posting_date, d.get("provisional_expense_account")
|
||||||
|
|||||||
@@ -1661,7 +1661,8 @@ class StockEntry(StockController):
|
|||||||
qty = frappe.utils.ceil(qty)
|
qty = frappe.utils.ceil(qty)
|
||||||
|
|
||||||
if row.batch_details:
|
if row.batch_details:
|
||||||
for batch_no, batch_qty in row.batch_details.items():
|
batches = sorted(row.batch_details.items(), key=lambda x: x[0])
|
||||||
|
for batch_no, batch_qty in batches:
|
||||||
if qty <= 0 or batch_qty <= 0:
|
if qty <= 0 or batch_qty <= 0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user