Merge branch 'develop' into datev_fixes
This commit is contained in:
commit
24e2cc9107
@ -5,7 +5,7 @@ import frappe
|
|||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
from frappe.utils import getdate
|
from frappe.utils import getdate
|
||||||
|
|
||||||
__version__ = '13.1.1'
|
__version__ = '13.2.0'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -62,7 +62,7 @@ def get_report_pdf(doc, consolidated=True):
|
|||||||
ageing[0]['ageing_based_on'] = doc.ageing_based_on
|
ageing[0]['ageing_based_on'] = doc.ageing_based_on
|
||||||
|
|
||||||
tax_id = frappe.get_doc('Customer', entry.customer).tax_id
|
tax_id = frappe.get_doc('Customer', entry.customer).tax_id
|
||||||
presentation_currency = get_party_account_currency('Customer', entry.customer, doc.company) \
|
presentation_currency = get_party_account_currency('Customer', entry.customer, doc.company) \
|
||||||
or doc.currency or get_company_currency(doc.company)
|
or doc.currency or get_company_currency(doc.company)
|
||||||
|
|
||||||
filters= frappe._dict({
|
filters= frappe._dict({
|
||||||
|
56
erpnext/change_log/v13/v13_2_0.md
Normal file
56
erpnext/change_log/v13/v13_2_0.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Version 13.2.0 Release Notes
|
||||||
|
|
||||||
|
### Features & Enhancements
|
||||||
|
|
||||||
|
- Employee Hours Utilization Report ([#25209](https://github.com/frappe/erpnext/pull/25209))
|
||||||
|
- Delayed Tasks Summary Report ([#25024](https://github.com/frappe/erpnext/pull/25024))
|
||||||
|
- Project Profitability Report ([#24944](https://github.com/frappe/erpnext/pull/24944))
|
||||||
|
- Timer in LMS Quiz ([#24246](https://github.com/frappe/erpnext/pull/24246))
|
||||||
|
- Role to allow over billing, delivery, receipt ([#24854](https://github.com/frappe/erpnext/pull/24854))
|
||||||
|
- Auto calculate distance for e-way bill generations ([#25480](https://github.com/frappe/erpnext/pull/25480))
|
||||||
|
- Add total available stock field in PO ([#24878](https://github.com/frappe/erpnext/pull/24878))
|
||||||
|
- Refactored Setup Taxes and Charges ([#24805](https://github.com/frappe/erpnext/pull/24805))
|
||||||
|
- Inpatient Occupancy Table Editable for Healthcare Admin ([#24989](https://github.com/frappe/erpnext/pull/24989))
|
||||||
|
- Added Disable Rounded Total in sales transactions ([#25362](https://github.com/frappe/erpnext/pull/25362))
|
||||||
|
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Incorrect GL Entry validation ([#25474](https://github.com/frappe/erpnext/pull/25474))
|
||||||
|
- Cannot create item variants ([#25433](https://github.com/frappe/erpnext/pull/25433))
|
||||||
|
- Leave policy in leave allocation ([#25334](https://github.com/frappe/erpnext/pull/25334))
|
||||||
|
- Let Administrator delete company transactions ([#25300](https://github.com/frappe/erpnext/pull/25300))
|
||||||
|
- Display reconcile tool when closing balance 0 ([#25417](https://github.com/frappe/erpnext/pull/25417))
|
||||||
|
- Bulk Salary Structure Assignment ([#25389](https://github.com/frappe/erpnext/pull/25389))
|
||||||
|
- Payment amount showing in foreign currency ([#25518](https://github.com/frappe/erpnext/pull/25518))
|
||||||
|
- Commit changes to shipment status in database ([#25374](https://github.com/frappe/erpnext/pull/25374))
|
||||||
|
- Add amend perm for loan and system manager for loan doctypes ([#25393](https://github.com/frappe/erpnext/pull/25393))
|
||||||
|
- Cashier query in POS Opening/Closing Entry ([#25398](https://github.com/frappe/erpnext/pull/25398))
|
||||||
|
- Apply single transaction threshold on net_total instead of supplier credit amount ([#25243](https://github.com/frappe/erpnext/pull/25243))
|
||||||
|
- Update allocated amount after paid amount is changed in PE ([#25528](https://github.com/frappe/erpnext/pull/25528))
|
||||||
|
- Remove non-standard module cards from Home Workspace ([#25391](https://github.com/frappe/erpnext/pull/25391))
|
||||||
|
- Cannot scan spacebar character in pos ([#25479](https://github.com/frappe/erpnext/pull/25479))
|
||||||
|
- Permission error after submitting exchange rate revaluation ([#25432](https://github.com/frappe/erpnext/pull/25432))
|
||||||
|
- Equality check instead of assignment in cart ([#25372](https://github.com/frappe/erpnext/pull/25372))
|
||||||
|
- Disable auto naming of customer during import ([#25152](https://github.com/frappe/erpnext/pull/25152))
|
||||||
|
- Additional Salary component amount not getting set ([#25355](https://github.com/frappe/erpnext/pull/25355))
|
||||||
|
- Round off values near to zero ([#25304](https://github.com/frappe/erpnext/pull/25304))
|
||||||
|
- Allow to cancel loan with cancelled repayment entry ([#25508](https://github.com/frappe/erpnext/pull/25508))
|
||||||
|
- Currency symbol in bank transaction list view ([#25336](https://github.com/frappe/erpnext/pull/25336))
|
||||||
|
- Incorrect batch picked in subcontracted purchase receipt ([#25186](https://github.com/frappe/erpnext/pull/25186))
|
||||||
|
- Issue in project custom status ([#25452](https://github.com/frappe/erpnext/pull/25452))
|
||||||
|
- Shipment pickup_to, pickup_from functionality. ([#25359](https://github.com/frappe/erpnext/pull/25359))
|
||||||
|
- Stock ledger entry created against draft stock entry ([#25539](https://github.com/frappe/erpnext/pull/25539))
|
||||||
|
- Ageing errors in PSOA ([#25529](https://github.com/frappe/erpnext/pull/25529))
|
||||||
|
- Permission error while adding weekly holidays ([#25450](https://github.com/frappe/erpnext/pull/25450))
|
||||||
|
- Filter for employees in salary slip ([#25360](https://github.com/frappe/erpnext/pull/25360))
|
||||||
|
- Backward compatibility for GSTR-1 report ([#25444](https://github.com/frappe/erpnext/pull/25444))
|
||||||
|
- Incorrect incoming rate for the sales return ([#25145](https://github.com/frappe/erpnext/pull/25145))
|
||||||
|
- POS print receipt ([#25328](https://github.com/frappe/erpnext/pull/25328))
|
||||||
|
- Laboratory Module patch ([#25431](https://github.com/frappe/erpnext/pull/25431))
|
||||||
|
- Performance: fetching exchange rate on every line item slows down PO ([#25345](https://github.com/frappe/erpnext/pull/25345))
|
||||||
|
- Presentation currency in statement of accounts ([#25367](https://github.com/frappe/erpnext/pull/25367))
|
||||||
|
- Serial No not updated correctly via Inter Company Stock Transfer ([#25006](https://github.com/frappe/erpnext/pull/25006))
|
||||||
|
- Ignore Customer Group Perm on All Products page ([#25396](https://github.com/frappe/erpnext/pull/25396))
|
||||||
|
- Change subcontracted item display ([#25425](https://github.com/frappe/erpnext/pull/25425))
|
||||||
|
- Add company validation for e-invoicing ([#25348](https://github.com/frappe/erpnext/pull/25348))
|
@ -1,626 +1,177 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"actions": [],
|
||||||
"allow_guest_to_view": 0,
|
"autoname": "HR-EMP-SEP-.YYYY.-.#####",
|
||||||
"allow_import": 0,
|
"creation": "2018-05-10 02:29:16.740490",
|
||||||
"allow_rename": 0,
|
"doctype": "DocType",
|
||||||
"autoname": "HR-EMP-SEP-.YYYY.-.#####",
|
"editable_grid": 1,
|
||||||
"beta": 0,
|
"engine": "InnoDB",
|
||||||
"creation": "2018-05-10 02:29:16.740490",
|
"field_order": [
|
||||||
"custom": 0,
|
"employee",
|
||||||
"docstatus": 0,
|
"employee_name",
|
||||||
"doctype": "DocType",
|
"department",
|
||||||
"document_type": "",
|
"designation",
|
||||||
"editable_grid": 1,
|
"employee_grade",
|
||||||
"engine": "InnoDB",
|
"column_break_7",
|
||||||
|
"company",
|
||||||
|
"boarding_status",
|
||||||
|
"resignation_letter_date",
|
||||||
|
"project",
|
||||||
|
"table_for_activity",
|
||||||
|
"employee_separation_template",
|
||||||
|
"activities",
|
||||||
|
"notify_users_by_email",
|
||||||
|
"section_break_14",
|
||||||
|
"exit_interview",
|
||||||
|
"amended_from"
|
||||||
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "employee",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Link",
|
||||||
"allow_on_submit": 0,
|
"label": "Employee",
|
||||||
"bold": 0,
|
"options": "Employee",
|
||||||
"collapsible": 0,
|
"reqd": 1
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "employee",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Employee",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Employee",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fetch_from": "employee.employee_name",
|
|
||||||
"fieldname": "employee_name",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Employee Name",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fetch_from": "employee.resignation_letter_date",
|
|
||||||
"fieldname": "resignation_letter_date",
|
|
||||||
"fieldtype": "Date",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Resignation Letter Date",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 1,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "boarding_status",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Status",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "\nPending\nIn Process\nCompleted",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fetch_from": "employee.employee_name",
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "employee_name",
|
||||||
"allow_bulk_edit": 0,
|
"fieldtype": "Data",
|
||||||
"allow_in_quick_entry": 0,
|
"in_list_view": 1,
|
||||||
"allow_in_quick_entry": 0,
|
"label": "Employee Name",
|
||||||
"allow_in_quick_entry": 0,
|
"read_only": 1
|
||||||
"allow_on_submit": 1,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "notify_users_by_email",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Notify users by email",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "column_break_7",
|
|
||||||
"fieldtype": "Column Break",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "employee_separation_template",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Employee Separation Template",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Employee Separation Template",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fetch_from": "employee.company",
|
|
||||||
"fieldname": "company",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Company",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Company",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fetch_from": "employee.resignation_letter_date",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldname": "resignation_letter_date",
|
||||||
"allow_on_submit": 0,
|
"fieldtype": "Date",
|
||||||
"bold": 0,
|
"in_list_view": 1,
|
||||||
"collapsible": 0,
|
"label": "Resignation Letter Date",
|
||||||
"columns": 0,
|
"read_only": 1
|
||||||
"fieldname": "project",
|
},
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Project",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Project",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 1,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_on_submit": 1,
|
||||||
"allow_in_quick_entry": 0,
|
"fieldname": "boarding_status",
|
||||||
"allow_on_submit": 0,
|
"fieldtype": "Select",
|
||||||
"bold": 0,
|
"label": "Status",
|
||||||
"collapsible": 0,
|
"options": "\nPending\nIn Process\nCompleted",
|
||||||
"columns": 0,
|
"reqd": 1
|
||||||
"fetch_from": "employee.department",
|
},
|
||||||
"fieldname": "department",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Department",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Department",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_on_submit": 1,
|
||||||
"allow_in_quick_entry": 0,
|
"default": "0",
|
||||||
"allow_on_submit": 0,
|
"fieldname": "notify_users_by_email",
|
||||||
"bold": 0,
|
"fieldtype": "Check",
|
||||||
"collapsible": 0,
|
"label": "Notify users by email"
|
||||||
"columns": 0,
|
},
|
||||||
"fetch_from": "employee.designation",
|
|
||||||
"fieldname": "designation",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Designation",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Designation",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "column_break_7",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Column Break"
|
||||||
"allow_on_submit": 0,
|
},
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fetch_from": "employee.grade",
|
|
||||||
"fieldname": "employee_grade",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Employee Grade",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Employee Grade",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "employee_separation_template",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Link",
|
||||||
"allow_on_submit": 0,
|
"label": "Employee Separation Template",
|
||||||
"bold": 0,
|
"options": "Employee Separation Template"
|
||||||
"collapsible": 0,
|
},
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "table_for_activity",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fetch_from": "employee.company",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldname": "company",
|
||||||
"allow_on_submit": 1,
|
"fieldtype": "Link",
|
||||||
"bold": 0,
|
"label": "Company",
|
||||||
"collapsible": 0,
|
"options": "Company",
|
||||||
"columns": 0,
|
"reqd": 1
|
||||||
"fieldname": "activities",
|
},
|
||||||
"fieldtype": "Table",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Activities",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Employee Boarding Activity",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "project",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldtype": "Link",
|
||||||
"allow_on_submit": 0,
|
"label": "Project",
|
||||||
"bold": 0,
|
"options": "Project",
|
||||||
"collapsible": 0,
|
"read_only": 1
|
||||||
"columns": 0,
|
},
|
||||||
"fieldname": "section_break_14",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fetch_from": "employee.department",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldname": "department",
|
||||||
"allow_on_submit": 0,
|
"fieldtype": "Link",
|
||||||
"bold": 0,
|
"in_list_view": 1,
|
||||||
"collapsible": 0,
|
"label": "Department",
|
||||||
"columns": 0,
|
"options": "Department",
|
||||||
"fieldname": "exit_interview",
|
"read_only": 1
|
||||||
"fieldtype": "Text Editor",
|
},
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Exit Interview Summary",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fetch_from": "employee.designation",
|
||||||
"allow_in_quick_entry": 0,
|
"fieldname": "designation",
|
||||||
"allow_on_submit": 0,
|
"fieldtype": "Link",
|
||||||
"bold": 0,
|
"in_list_view": 1,
|
||||||
"collapsible": 0,
|
"label": "Designation",
|
||||||
"columns": 0,
|
"options": "Designation",
|
||||||
"fieldname": "amended_from",
|
"read_only": 1
|
||||||
"fieldtype": "Link",
|
},
|
||||||
"hidden": 0,
|
{
|
||||||
"ignore_user_permissions": 0,
|
"fetch_from": "employee.grade",
|
||||||
"ignore_xss_filter": 0,
|
"fieldname": "employee_grade",
|
||||||
"in_filter": 0,
|
"fieldtype": "Link",
|
||||||
"in_global_search": 0,
|
"label": "Employee Grade",
|
||||||
"in_list_view": 0,
|
"options": "Employee Grade",
|
||||||
"in_standard_filter": 0,
|
"read_only": 1
|
||||||
"label": "Amended From",
|
},
|
||||||
"length": 0,
|
{
|
||||||
"no_copy": 1,
|
"fieldname": "table_for_activity",
|
||||||
"options": "Employee Separation",
|
"fieldtype": "Section Break",
|
||||||
"permlevel": 0,
|
"label": "Separation Activities"
|
||||||
"print_hide": 1,
|
},
|
||||||
"print_hide_if_no_value": 0,
|
{
|
||||||
"read_only": 1,
|
"allow_on_submit": 1,
|
||||||
"remember_last_selected_value": 0,
|
"fieldname": "activities",
|
||||||
"report_hide": 0,
|
"fieldtype": "Table",
|
||||||
"reqd": 0,
|
"label": "Activities",
|
||||||
"search_index": 0,
|
"options": "Employee Boarding Activity"
|
||||||
"set_only_once": 0,
|
},
|
||||||
"translatable": 0,
|
{
|
||||||
"unique": 0
|
"fieldname": "section_break_14",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "exit_interview",
|
||||||
|
"fieldtype": "Text Editor",
|
||||||
|
"label": "Exit Interview Summary"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "amended_from",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Amended From",
|
||||||
|
"no_copy": 1,
|
||||||
|
"options": "Employee Separation",
|
||||||
|
"print_hide": 1,
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"is_submittable": 1,
|
||||||
"hide_heading": 0,
|
"links": [],
|
||||||
"hide_toolbar": 0,
|
"modified": "2021-04-28 15:58:36.020196",
|
||||||
"idx": 0,
|
"modified_by": "Administrator",
|
||||||
"image_view": 0,
|
"module": "HR",
|
||||||
"in_create": 0,
|
"name": "Employee Separation",
|
||||||
"is_submittable": 1,
|
"owner": "Administrator",
|
||||||
"issingle": 0,
|
|
||||||
"istable": 0,
|
|
||||||
"max_attachments": 0,
|
|
||||||
"modified": "2019-08-03 16:15:39.025898",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"module": "HR",
|
|
||||||
"name": "Employee Separation",
|
|
||||||
"name_case": "",
|
|
||||||
"owner": "Administrator",
|
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 1,
|
"amend": 1,
|
||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
"if_owner": 0,
|
"print": 1,
|
||||||
"import": 0,
|
"read": 1,
|
||||||
"permlevel": 0,
|
"report": 1,
|
||||||
"print": 1,
|
"role": "System Manager",
|
||||||
"read": 1,
|
"share": 1,
|
||||||
"report": 1,
|
"submit": 1,
|
||||||
"role": "System Manager",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 1,
|
|
||||||
"submit": 1,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
"sort_field": "modified",
|
||||||
"read_only_onload": 0,
|
"sort_order": "DESC",
|
||||||
"show_name_in_global_search": 0,
|
"title_field": "employee_name",
|
||||||
"sort_field": "modified",
|
"track_changes": 1
|
||||||
"sort_order": "DESC",
|
|
||||||
"title_field": "employee_name",
|
|
||||||
"track_changes": 1,
|
|
||||||
"track_seen": 0,
|
|
||||||
"track_views": 0
|
|
||||||
}
|
}
|
@ -18,7 +18,7 @@ class TestEmployeeSeparation(unittest.TestCase):
|
|||||||
'activity_name': 'Deactivate Employee',
|
'activity_name': 'Deactivate Employee',
|
||||||
'role': 'HR User'
|
'role': 'HR User'
|
||||||
})
|
})
|
||||||
separation.status = 'Pending'
|
separation.boarding_status = 'Pending'
|
||||||
separation.insert()
|
separation.insert()
|
||||||
separation.submit()
|
separation.submit()
|
||||||
self.assertEqual(separation.docstatus, 1)
|
self.assertEqual(separation.docstatus, 1)
|
||||||
|
@ -32,13 +32,15 @@ class EmployeeBoardingController(Document):
|
|||||||
project_name += self.job_applicant
|
project_name += self.job_applicant
|
||||||
else:
|
else:
|
||||||
project_name += self.employee
|
project_name += self.employee
|
||||||
|
|
||||||
project = frappe.get_doc({
|
project = frappe.get_doc({
|
||||||
"doctype": "Project",
|
"doctype": "Project",
|
||||||
"project_name": project_name,
|
"project_name": project_name,
|
||||||
"expected_start_date": self.date_of_joining if self.doctype == "Employee Onboarding" else self.resignation_letter_date,
|
"expected_start_date": self.date_of_joining if self.doctype == "Employee Onboarding" else self.resignation_letter_date,
|
||||||
"department": self.department,
|
"department": self.department,
|
||||||
"company": self.company
|
"company": self.company
|
||||||
}).insert(ignore_permissions=True)
|
}).insert(ignore_permissions=True, ignore_mandatory=True)
|
||||||
|
|
||||||
self.db_set("project", project.name)
|
self.db_set("project", project.name)
|
||||||
self.db_set("boarding_status", "Pending")
|
self.db_set("boarding_status", "Pending")
|
||||||
self.reload()
|
self.reload()
|
||||||
|
@ -71,7 +71,6 @@ class Loan(AccountsController):
|
|||||||
frappe.throw(_("Repay From Salary can be selected only for term loans"))
|
frappe.throw(_("Repay From Salary can be selected only for term loans"))
|
||||||
|
|
||||||
def make_repayment_schedule(self):
|
def make_repayment_schedule(self):
|
||||||
|
|
||||||
if not self.repayment_start_date:
|
if not self.repayment_start_date:
|
||||||
frappe.throw(_("Repayment Start Date is mandatory for term loans"))
|
frappe.throw(_("Repayment Start Date is mandatory for term loans"))
|
||||||
|
|
||||||
@ -79,10 +78,9 @@ class Loan(AccountsController):
|
|||||||
payment_date = self.repayment_start_date
|
payment_date = self.repayment_start_date
|
||||||
balance_amount = self.loan_amount
|
balance_amount = self.loan_amount
|
||||||
while(balance_amount > 0):
|
while(balance_amount > 0):
|
||||||
interest_amount = rounded(balance_amount * flt(self.rate_of_interest) / (12*100))
|
interest_amount = flt(balance_amount * flt(self.rate_of_interest) / (12*100))
|
||||||
principal_amount = self.monthly_repayment_amount - interest_amount
|
principal_amount = self.monthly_repayment_amount - interest_amount
|
||||||
balance_amount = rounded(balance_amount + interest_amount - self.monthly_repayment_amount)
|
balance_amount = flt(balance_amount + interest_amount - self.monthly_repayment_amount)
|
||||||
|
|
||||||
if balance_amount < 0:
|
if balance_amount < 0:
|
||||||
principal_amount += balance_amount
|
principal_amount += balance_amount
|
||||||
balance_amount = 0.0
|
balance_amount = 0.0
|
||||||
@ -196,7 +194,8 @@ def request_loan_closure(loan, posting_date=None):
|
|||||||
posting_date = getdate()
|
posting_date = getdate()
|
||||||
|
|
||||||
amounts = calculate_amounts(loan, posting_date)
|
amounts = calculate_amounts(loan, posting_date)
|
||||||
pending_amount = amounts['payable_amount'] + amounts['unaccrued_interest']
|
pending_amount = amounts['pending_principal_amount'] + amounts['unaccrued_interest'] + \
|
||||||
|
amounts['interest_amount'] + amounts['penalty_amount']
|
||||||
|
|
||||||
loan_type = frappe.get_value('Loan', loan, 'loan_type')
|
loan_type = frappe.get_value('Loan', loan, 'loan_type')
|
||||||
write_off_limit = frappe.get_value('Loan Type', loan_type, 'write_off_amount')
|
write_off_limit = frappe.get_value('Loan Type', loan_type, 'write_off_amount')
|
||||||
|
@ -56,25 +56,25 @@ class TestLoan(unittest.TestCase):
|
|||||||
def test_loan(self):
|
def test_loan(self):
|
||||||
loan = frappe.get_doc("Loan", {"applicant":self.applicant1})
|
loan = frappe.get_doc("Loan", {"applicant":self.applicant1})
|
||||||
self.assertEquals(loan.monthly_repayment_amount, 15052)
|
self.assertEquals(loan.monthly_repayment_amount, 15052)
|
||||||
self.assertEquals(loan.total_interest_payable, 21034)
|
self.assertEquals(flt(loan.total_interest_payable, 0), 21034)
|
||||||
self.assertEquals(loan.total_payment, 301034)
|
self.assertEquals(flt(loan.total_payment, 0), 301034)
|
||||||
|
|
||||||
schedule = loan.repayment_schedule
|
schedule = loan.repayment_schedule
|
||||||
|
|
||||||
self.assertEqual(len(schedule), 20)
|
self.assertEqual(len(schedule), 20)
|
||||||
|
|
||||||
for idx, principal_amount, interest_amount, balance_loan_amount in [[3, 13369, 1683, 227079], [19, 14941, 105, 0], [17, 14740, 312, 29785]]:
|
for idx, principal_amount, interest_amount, balance_loan_amount in [[3, 13369, 1683, 227080], [19, 14941, 105, 0], [17, 14740, 312, 29785]]:
|
||||||
self.assertEqual(schedule[idx].principal_amount, principal_amount)
|
self.assertEqual(flt(schedule[idx].principal_amount, 0), principal_amount)
|
||||||
self.assertEqual(schedule[idx].interest_amount, interest_amount)
|
self.assertEqual(flt(schedule[idx].interest_amount, 0), interest_amount)
|
||||||
self.assertEqual(schedule[idx].balance_loan_amount, balance_loan_amount)
|
self.assertEqual(flt(schedule[idx].balance_loan_amount, 0), balance_loan_amount)
|
||||||
|
|
||||||
loan.repayment_method = "Repay Fixed Amount per Period"
|
loan.repayment_method = "Repay Fixed Amount per Period"
|
||||||
loan.monthly_repayment_amount = 14000
|
loan.monthly_repayment_amount = 14000
|
||||||
loan.save()
|
loan.save()
|
||||||
|
|
||||||
self.assertEquals(len(loan.repayment_schedule), 22)
|
self.assertEquals(len(loan.repayment_schedule), 22)
|
||||||
self.assertEquals(loan.total_interest_payable, 22712)
|
self.assertEquals(flt(loan.total_interest_payable, 0), 22712)
|
||||||
self.assertEquals(loan.total_payment, 302712)
|
self.assertEquals(flt(loan.total_payment, 0), 302712)
|
||||||
|
|
||||||
def test_loan_with_security(self):
|
def test_loan_with_security(self):
|
||||||
|
|
||||||
|
@ -435,7 +435,6 @@ def get_amounts(amounts, against_loan, posting_date):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def calculate_amounts(against_loan, posting_date, payment_type=''):
|
def calculate_amounts(against_loan, posting_date, payment_type=''):
|
||||||
|
|
||||||
amounts = {
|
amounts = {
|
||||||
'penalty_amount': 0.0,
|
'penalty_amount': 0.0,
|
||||||
'interest_amount': 0.0,
|
'interest_amount': 0.0,
|
||||||
|
@ -22,5 +22,7 @@ def execute():
|
|||||||
|
|
||||||
frappe.delete_doc("Page", "bank-reconciliation", force=1)
|
frappe.delete_doc("Page", "bank-reconciliation", force=1)
|
||||||
|
|
||||||
|
frappe.reload_doc('accounts', 'doctype', 'bank_transaction')
|
||||||
|
|
||||||
rename_field("Bank Transaction", "debit", "deposit")
|
rename_field("Bank Transaction", "debit", "deposit")
|
||||||
rename_field("Bank Transaction", "credit", "withdrawal")
|
rename_field("Bank Transaction", "credit", "withdrawal")
|
||||||
|
@ -562,7 +562,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
weight_uom: item.weight_uom,
|
weight_uom: item.weight_uom,
|
||||||
manufacturer: item.manufacturer,
|
manufacturer: item.manufacturer,
|
||||||
stock_uom: item.stock_uom,
|
stock_uom: item.stock_uom,
|
||||||
pos_profile: me.frm.doc.doctype == 'Sales Invoice' ? me.frm.doc.pos_profile : '',
|
pos_profile: cint(me.frm.doc.is_pos) ? me.frm.doc.pos_profile : '',
|
||||||
cost_center: item.cost_center,
|
cost_center: item.cost_center,
|
||||||
tax_category: me.frm.doc.tax_category,
|
tax_category: me.frm.doc.tax_category,
|
||||||
item_tax_template: item.item_tax_template,
|
item_tax_template: item.item_tax_template,
|
||||||
|
@ -50,8 +50,12 @@ class EmailDigest(Document):
|
|||||||
recipients = list(filter(lambda r: r in valid_users,
|
recipients = list(filter(lambda r: r in valid_users,
|
||||||
self.recipient_list.split("\n")))
|
self.recipient_list.split("\n")))
|
||||||
|
|
||||||
|
original_user = frappe.session.user
|
||||||
|
|
||||||
if recipients:
|
if recipients:
|
||||||
for user_id in recipients:
|
for user_id in recipients:
|
||||||
|
frappe.set_user(user_id)
|
||||||
|
frappe.set_user_lang(user_id)
|
||||||
msg_for_this_recipient = self.get_msg_html()
|
msg_for_this_recipient = self.get_msg_html()
|
||||||
if msg_for_this_recipient:
|
if msg_for_this_recipient:
|
||||||
frappe.sendmail(
|
frappe.sendmail(
|
||||||
@ -62,6 +66,9 @@ class EmailDigest(Document):
|
|||||||
reference_name = self.name,
|
reference_name = self.name,
|
||||||
unsubscribe_message = _("Unsubscribe from this Email Digest"))
|
unsubscribe_message = _("Unsubscribe from this Email Digest"))
|
||||||
|
|
||||||
|
frappe.set_user(original_user)
|
||||||
|
frappe.set_user_lang(original_user)
|
||||||
|
|
||||||
def get_msg_html(self):
|
def get_msg_html(self):
|
||||||
"""Build email digest content"""
|
"""Build email digest content"""
|
||||||
frappe.flags.ignore_account_permission = True
|
frappe.flags.ignore_account_permission = True
|
||||||
|
@ -433,13 +433,21 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
|
|||||||
if (doc.material_request_type == "Customer Provided") {
|
if (doc.material_request_type == "Customer Provided") {
|
||||||
return{
|
return{
|
||||||
query: "erpnext.controllers.queries.item_query",
|
query: "erpnext.controllers.queries.item_query",
|
||||||
filters:{ 'customer': me.frm.doc.customer }
|
filters:{
|
||||||
|
'customer': me.frm.doc.customer,
|
||||||
|
'is_stock_item':1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (doc.material_request_type != "Manufacture") {
|
} else if (doc.material_request_type == "Purchase") {
|
||||||
return{
|
return{
|
||||||
query: "erpnext.controllers.queries.item_query",
|
query: "erpnext.controllers.queries.item_query",
|
||||||
filters: {'is_purchase_item': 1}
|
filters: {'is_purchase_item': 1}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return{
|
||||||
|
query: "erpnext.controllers.queries.item_query",
|
||||||
|
filters: {'is_stock_item': 1}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -469,7 +469,7 @@ class StockReconciliation(StockController):
|
|||||||
def submit(self):
|
def submit(self):
|
||||||
if len(self.items) > 100:
|
if len(self.items) > 100:
|
||||||
msgprint(_("The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Draft stage"))
|
msgprint(_("The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Draft stage"))
|
||||||
self.queue_action('submit')
|
self.queue_action('submit', timeout=2000)
|
||||||
else:
|
else:
|
||||||
self._submit()
|
self._submit()
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru
|
|||||||
out.update(get_bin_details(args.item_code, args.get("from_warehouse")))
|
out.update(get_bin_details(args.item_code, args.get("from_warehouse")))
|
||||||
|
|
||||||
elif out.get("warehouse"):
|
elif out.get("warehouse"):
|
||||||
out.update(get_bin_details(args.item_code, out.warehouse))
|
out.update(get_bin_details(args.item_code, out.warehouse, args.company))
|
||||||
|
|
||||||
# update args with out, if key or value not exists
|
# update args with out, if key or value not exists
|
||||||
for key, value in iteritems(out):
|
for key, value in iteritems(out):
|
||||||
|
@ -416,7 +416,7 @@ class update_entries_after(object):
|
|||||||
frappe.db.set_value("Stock Entry Detail", sle.voucher_detail_no, "basic_rate", outgoing_rate)
|
frappe.db.set_value("Stock Entry Detail", sle.voucher_detail_no, "basic_rate", outgoing_rate)
|
||||||
|
|
||||||
# Update outgoing item's rate, recalculate FG Item's rate and total incoming/outgoing amount
|
# Update outgoing item's rate, recalculate FG Item's rate and total incoming/outgoing amount
|
||||||
stock_entry = frappe.get_doc("Stock Entry", sle.voucher_no)
|
stock_entry = frappe.get_doc("Stock Entry", sle.voucher_no, for_update=True)
|
||||||
stock_entry.calculate_rate_and_amount(reset_outgoing_rate=False, raise_error_if_no_rate=False)
|
stock_entry.calculate_rate_and_amount(reset_outgoing_rate=False, raise_error_if_no_rate=False)
|
||||||
stock_entry.db_update()
|
stock_entry.db_update()
|
||||||
for d in stock_entry.items:
|
for d in stock_entry.items:
|
||||||
|
@ -172,7 +172,7 @@ def get_bin(item_code, warehouse):
|
|||||||
bin_obj.flags.ignore_permissions = 1
|
bin_obj.flags.ignore_permissions = 1
|
||||||
bin_obj.insert()
|
bin_obj.insert()
|
||||||
else:
|
else:
|
||||||
bin_obj = frappe.get_cached_doc('Bin', bin)
|
bin_obj = frappe.get_doc('Bin', bin, for_update=True)
|
||||||
bin_obj.flags.ignore_permissions = True
|
bin_obj.flags.ignore_permissions = True
|
||||||
return bin_obj
|
return bin_obj
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user