Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into desk-enhancements

This commit is contained in:
Shivam Mishra
2020-12-16 13:21:10 +05:30
311 changed files with 9144 additions and 2211 deletions

View File

@@ -274,7 +274,8 @@ erpnext.company.setup_queries = function(frm) {
["default_employee_advance_account", {"root_type": "Asset"}],
["expenses_included_in_asset_valuation", {"account_type": "Expenses Included In Asset Valuation"}],
["capital_work_in_progress_account", {"account_type": "Capital Work in Progress"}],
["asset_received_but_not_billed", {"account_type": "Asset Received But Not Billed"}]
["asset_received_but_not_billed", {"account_type": "Asset Received But Not Billed"}],
["unrealized_profit_loss_account", {"root_type": "Liability"}]
], function(i, v) {
erpnext.company.set_custom_query(frm, v);
});

View File

@@ -46,10 +46,9 @@
"round_off_account",
"round_off_cost_center",
"write_off_account",
"discount_allowed_account",
"discount_received_account",
"exchange_gain_loss_account",
"unrealized_exchange_gain_loss_account",
"unrealized_profit_loss_account",
"column_break0",
"allow_account_creation_against_child_company",
"default_payable_account",
@@ -261,14 +260,14 @@
{
"fieldname": "create_chart_of_accounts_based_on",
"fieldtype": "Select",
"label": "Create Chart of Accounts Based on",
"label": "Create Chart Of Accounts Based On",
"options": "\nStandard Template\nExisting Company"
},
{
"depends_on": "eval:doc.create_chart_of_accounts_based_on===\"Standard Template\"",
"fieldname": "chart_of_accounts",
"fieldtype": "Select",
"label": "Chart of Accounts Template",
"label": "Chart Of Accounts Template",
"no_copy": 1
},
{
@@ -345,18 +344,6 @@
"label": "Write Off Account",
"options": "Account"
},
{
"fieldname": "discount_allowed_account",
"fieldtype": "Link",
"label": "Discount Allowed Account",
"options": "Account"
},
{
"fieldname": "discount_received_account",
"fieldtype": "Link",
"label": "Discount Received Account",
"options": "Account"
},
{
"fieldname": "exchange_gain_loss_account",
"fieldtype": "Link",
@@ -740,6 +727,12 @@
"fieldtype": "Link",
"label": "Default In Transit Warehouse",
"options": "Warehouse"
},
{
"fieldname": "unrealized_profit_loss_account",
"fieldtype": "Link",
"label": "Unrealized Profit / Loss Account",
"options": "Account"
}
],
"icon": "fa fa-building",
@@ -747,7 +740,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
"modified": "2020-08-06 00:38:08.311216",
"modified": "2020-12-03 12:27:27.085094",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
@@ -808,4 +801,4 @@
"sort_field": "modified",
"sort_order": "ASC",
"track_changes": 1
}
}

View File

@@ -75,7 +75,7 @@ class Company(NestedSet):
def validate_default_accounts(self):
accounts = [
["Default Bank Account", "default_bank_account"], ["Default Cash Account", "default_cash_account"],
["Default Bank Account", "default_bank_account"], ["Default Cash Account", "default_cash_account"],
["Default Receivable Account", "default_receivable_account"], ["Default Payable Account", "default_payable_account"],
["Default Expense Account", "default_expense_account"], ["Default Income Account", "default_income_account"],
["Stock Received But Not Billed Account", "stock_received_but_not_billed"], ["Stock Adjustment Account", "stock_adjustment_account"],

View File

@@ -48,12 +48,8 @@ class EmailDigest(Document):
recipients = list(filter(lambda r: r in valid_users,
self.recipient_list.split("\n")))
original_user = frappe.session.user
if 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()
if msg_for_this_recipient:
frappe.sendmail(
@@ -64,9 +60,6 @@ class EmailDigest(Document):
reference_name = self.name,
unsubscribe_message = _("Unsubscribe from this Email Digest"))
frappe.set_user(original_user)
frappe.set_user_lang(original_user)
def get_msg_html(self):
"""Build email digest content"""
frappe.flags.ignore_account_permission = True

View File

@@ -5,8 +5,7 @@ frappe.ui.form.on('Sales Person', {
refresh: function(frm) {
if(frm.doc.__onload && frm.doc.__onload.dashboard_info) {
var info = frm.doc.__onload.dashboard_info;
frm.dashboard.add_indicator(__('Total Contribution Amount: {0}',
[format_currency(info.allocated_amount, info.currency)]), 'blue');
frm.dashboard.add_indicator(__('Total Contribution Amount: {0}', [format_currency(info.allocated_amount, info.currency)]), 'blue');
}
},