Merge branch 'develop' into gross_profit_non_stock_item
This commit is contained in:
commit
6bf7bd6a9f
30
.mergify.yml
30
.mergify.yml
@ -17,6 +17,36 @@ pull_request_rules:
|
|||||||
@{{author}}, thanks for the contribution, but we do not accept pull requests on a stable branch. Please raise PR on an appropriate hotfix branch.
|
@{{author}}, thanks for the contribution, but we do not accept pull requests on a stable branch. Please raise PR on an appropriate hotfix branch.
|
||||||
https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist#which-branch
|
https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist#which-branch
|
||||||
|
|
||||||
|
- name: backport to develop
|
||||||
|
conditions:
|
||||||
|
- label="backport develop"
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
|
||||||
|
- name: backport to version-14-hotfix
|
||||||
|
conditions:
|
||||||
|
- label="backport version-14-hotfix"
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- version-14-hotfix
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
|
||||||
|
- name: backport to version-14-pre-release
|
||||||
|
conditions:
|
||||||
|
- label="backport version-14-pre-release"
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- version-14-pre-release
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
|
||||||
- name: backport to version-13-hotfix
|
- name: backport to version-13-hotfix
|
||||||
conditions:
|
conditions:
|
||||||
- label="backport version-13-hotfix"
|
- label="backport version-13-hotfix"
|
||||||
|
|||||||
@ -1,94 +1,34 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"actions": [],
|
||||||
"allow_guest_to_view": 0,
|
|
||||||
"allow_import": 0,
|
|
||||||
"allow_rename": 0,
|
|
||||||
"autoname": "field:mapping",
|
|
||||||
"beta": 0,
|
|
||||||
"creation": "2018-02-08 10:18:48.513608",
|
"creation": "2018-02-08 10:18:48.513608",
|
||||||
"custom": 0,
|
|
||||||
"docstatus": 0,
|
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "",
|
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"mapping"
|
||||||
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "mapping",
|
"fieldname": "mapping",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Mapping",
|
"label": "Mapping",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Cash Flow Mapping",
|
"options": "Cash Flow Mapping",
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"unique": 1
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"istable": 1,
|
||||||
"hide_heading": 0,
|
"links": [],
|
||||||
"hide_toolbar": 0,
|
"modified": "2022-02-21 03:34:57.902332",
|
||||||
"idx": 0,
|
|
||||||
"image_view": 0,
|
|
||||||
"in_create": 0,
|
|
||||||
"is_submittable": 0,
|
|
||||||
"issingle": 0,
|
|
||||||
"istable": 0,
|
|
||||||
"max_attachments": 0,
|
|
||||||
"modified": "2018-02-08 10:33:39.413930",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Cash Flow Mapping Template Details",
|
"name": "Cash Flow Mapping Template Details",
|
||||||
"name_case": "",
|
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [],
|
||||||
{
|
|
||||||
"amend": 0,
|
|
||||||
"apply_user_permissions": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 1,
|
|
||||||
"delete": 1,
|
|
||||||
"email": 1,
|
|
||||||
"export": 1,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "System Manager",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 1,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
|
||||||
"read_only_onload": 0,
|
|
||||||
"show_name_in_global_search": 0,
|
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 1,
|
"states": [],
|
||||||
"track_seen": 0
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map):
|
|||||||
if entry.account in tds_accounts:
|
if entry.account in tds_accounts:
|
||||||
tds_deducted += (entry.credit - entry.debit)
|
tds_deducted += (entry.credit - entry.debit)
|
||||||
|
|
||||||
total_amount_credited += (entry.credit - entry.debit)
|
total_amount_credited += entry.credit
|
||||||
|
|
||||||
if tds_deducted:
|
if tds_deducted:
|
||||||
row = {
|
row = {
|
||||||
|
|||||||
@ -74,39 +74,6 @@ class LoanInterestAccrual(AccountsController):
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.payable_principal_amount:
|
|
||||||
gle_map.append(
|
|
||||||
self.get_gl_dict({
|
|
||||||
"account": self.loan_account,
|
|
||||||
"party_type": self.applicant_type,
|
|
||||||
"party": self.applicant,
|
|
||||||
"against": self.interest_income_account,
|
|
||||||
"debit": self.payable_principal_amount,
|
|
||||||
"debit_in_account_currency": self.interest_amount,
|
|
||||||
"against_voucher_type": "Loan",
|
|
||||||
"against_voucher": self.loan,
|
|
||||||
"remarks": _("Interest accrued from {0} to {1} against loan: {2}").format(
|
|
||||||
self.last_accrual_date, self.posting_date, self.loan),
|
|
||||||
"cost_center": erpnext.get_default_cost_center(self.company),
|
|
||||||
"posting_date": self.posting_date
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
gle_map.append(
|
|
||||||
self.get_gl_dict({
|
|
||||||
"account": self.interest_income_account,
|
|
||||||
"against": self.loan_account,
|
|
||||||
"credit": self.payable_principal_amount,
|
|
||||||
"credit_in_account_currency": self.interest_amount,
|
|
||||||
"against_voucher_type": "Loan",
|
|
||||||
"against_voucher": self.loan,
|
|
||||||
"remarks": ("Interest accrued from {0} to {1} against loan: {2}").format(
|
|
||||||
self.last_accrual_date, self.posting_date, self.loan),
|
|
||||||
"cost_center": erpnext.get_default_cost_center(self.company),
|
|
||||||
"posting_date": self.posting_date
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
if gle_map:
|
if gle_map:
|
||||||
make_gl_entries(gle_map, cancel=cancel, adv_adj=adv_adj)
|
make_gl_entries(gle_map, cancel=cancel, adv_adj=adv_adj)
|
||||||
|
|
||||||
|
|||||||
@ -83,8 +83,8 @@
|
|||||||
"planned_qty",
|
"planned_qty",
|
||||||
"column_break_69",
|
"column_break_69",
|
||||||
"work_order_qty",
|
"work_order_qty",
|
||||||
"delivered_qty",
|
|
||||||
"produced_qty",
|
"produced_qty",
|
||||||
|
"delivered_qty",
|
||||||
"returned_qty",
|
"returned_qty",
|
||||||
"shopping_cart_section",
|
"shopping_cart_section",
|
||||||
"additional_notes",
|
"additional_notes",
|
||||||
@ -701,10 +701,8 @@
|
|||||||
"width": "50px"
|
"width": "50px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "For Production",
|
|
||||||
"fieldname": "produced_qty",
|
"fieldname": "produced_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 1,
|
|
||||||
"label": "Produced Quantity",
|
"label": "Produced Quantity",
|
||||||
"oldfieldname": "produced_qty",
|
"oldfieldname": "produced_qty",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
@ -802,7 +800,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-10-05 12:27:25.014789",
|
"modified": "2022-02-21 13:55:08.883104",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order Item",
|
"name": "Sales Order Item",
|
||||||
@ -811,5 +809,6 @@
|
|||||||
"permissions": [],
|
"permissions": [],
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"states": [],
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
30
erpnext/tests/test_zform_loads.py
Normal file
30
erpnext/tests/test_zform_loads.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
""" dumb test to check all function calls on known form loads """
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe.desk.form.load import getdoc
|
||||||
|
|
||||||
|
|
||||||
|
class TestFormLoads(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_load(self):
|
||||||
|
erpnext_modules = frappe.get_all("Module Def", filters={"app_name": "erpnext"}, pluck="name")
|
||||||
|
doctypes = frappe.get_all("DocType", {"istable": 0, "issingle": 0, "is_virtual": 0, "module": ("in", erpnext_modules)}, pluck="name")
|
||||||
|
|
||||||
|
for doctype in doctypes:
|
||||||
|
last_doc = frappe.db.get_value(doctype, {}, "name", order_by="modified desc")
|
||||||
|
if not last_doc:
|
||||||
|
continue
|
||||||
|
with self.subTest(msg=f"Loading {doctype} - {last_doc}", doctype=doctype, last_doc=last_doc):
|
||||||
|
try:
|
||||||
|
# reset previous response
|
||||||
|
frappe.response = frappe._dict({"docs":[]})
|
||||||
|
frappe.response.docinfo = None
|
||||||
|
|
||||||
|
getdoc(doctype, last_doc)
|
||||||
|
except Exception as e:
|
||||||
|
self.fail(f"Failed to load {doctype} - {last_doc}: {e}")
|
||||||
|
|
||||||
|
self.assertTrue(frappe.response.docs, msg=f"expected document in reponse, found: {frappe.response.docs}")
|
||||||
|
self.assertTrue(frappe.response.docinfo, msg=f"expected docinfo in reponse, found: {frappe.response.docinfo}")
|
||||||
Loading…
x
Reference in New Issue
Block a user