mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
fix: Missing commits from hotfix branch (#17997)
* fix: merge conflict * fix: restored missing set_gst_state_and_state_number function * fix: style linting as per codacy * fix: Fixes related to customer/lead merging * fix: merge conflict * fix: Fixes related to customer/lead merging * fix: Assign isue/opportunity to user * fix: Assign isue/opportunity to user * fix: Replaced Invoice type by GST Category * fix: merge conflict * fix: merge conflict * fix: test cases * fix: test cases
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -252,7 +252,7 @@ class Company(NestedSet):
|
||||
def set_mode_of_payment_account(self):
|
||||
cash = frappe.db.get_value('Mode of Payment', {'type': 'Cash'}, 'name')
|
||||
if cash and self.default_cash_account \
|
||||
and not frappe.db.get_value('Mode of Payment Account', {'company': self.name}):
|
||||
and not frappe.db.get_value('Mode of Payment Account', {'company': self.name, 'parent': 'Cash'}):
|
||||
mode_of_payment = frappe.get_doc('Mode of Payment', cash)
|
||||
mode_of_payment.append('accounts', {
|
||||
'company': self.name,
|
||||
|
||||
@@ -4,6 +4,8 @@ from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
import json
|
||||
from frappe import _
|
||||
from frappe.utils import random_string
|
||||
from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import get_charts_for_country
|
||||
|
||||
@@ -78,7 +80,10 @@ class TestCompany(unittest.TestCase):
|
||||
if account_type in ["Bank", "Cash"]:
|
||||
filters["is_group"] = 1
|
||||
|
||||
self.assertTrue(frappe.get_all("Account", filters))
|
||||
has_matching_accounts = frappe.get_all("Account", filters)
|
||||
error_message = _("No Account matched these filters: {}".format(json.dumps(filters)))
|
||||
|
||||
self.assertTrue(has_matching_accounts, msg=error_message)
|
||||
finally:
|
||||
self.delete_mode_of_payment(template)
|
||||
frappe.delete_doc("Company", template)
|
||||
|
||||
@@ -69,7 +69,8 @@ class ItemGroup(NestedSet, WebsiteGenerator):
|
||||
"items": get_product_list_for_group(product_group = self.name, start=start,
|
||||
limit=context.page_length + 1, search=frappe.form_dict.get("search")),
|
||||
"parents": get_parent_item_groups(self.parent_item_group),
|
||||
"title": self.name
|
||||
"title": self.name,
|
||||
"products_as_list": cint(frappe.db.get_single_value('Products Settings', 'products_as_list'))
|
||||
})
|
||||
|
||||
if self.slideshow:
|
||||
|
||||
@@ -33,7 +33,7 @@ def make_sample_data(domains, make_dependent = False):
|
||||
def make_opportunity(items, customer):
|
||||
b = frappe.get_doc({
|
||||
"doctype": "Opportunity",
|
||||
"enquiry_from": "Customer",
|
||||
"opportunity_from": "Customer",
|
||||
"customer": customer,
|
||||
"opportunity_type": _("Sales"),
|
||||
"with_items": 1
|
||||
@@ -52,7 +52,7 @@ def make_quote(items, customer):
|
||||
qtn = frappe.get_doc({
|
||||
"doctype": "Quotation",
|
||||
"quotation_to": "Customer",
|
||||
"customer": customer,
|
||||
"party_name": customer,
|
||||
"order_type": "Sales"
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user