mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 00:55:02 +00:00
chore: resolve conflicts
This commit is contained in:
@@ -169,39 +169,6 @@ frappe.ui.form.on("Company", {
|
||||
},
|
||||
|
||||
delete_company_transactions: function (frm) {
|
||||
<<<<<<< HEAD
|
||||
frappe.verify_password(function () {
|
||||
var d = frappe.prompt(
|
||||
{
|
||||
fieldtype: "Data",
|
||||
fieldname: "company_name",
|
||||
label: __("Please enter the company name to confirm"),
|
||||
reqd: 1,
|
||||
description: __(
|
||||
"Please make sure you really want to delete all the transactions for this company. Your master data will remain as it is. This action cannot be undone."
|
||||
),
|
||||
},
|
||||
function (data) {
|
||||
if (data.company_name !== frm.doc.name) {
|
||||
frappe.msgprint(__("Company name not same"));
|
||||
return;
|
||||
}
|
||||
frappe.call({
|
||||
method: "erpnext.setup.doctype.company.company.create_transaction_deletion_request",
|
||||
args: {
|
||||
company: data.company_name,
|
||||
},
|
||||
freeze: true,
|
||||
callback: function (r, rt) {
|
||||
if (!r.exc)
|
||||
frappe.msgprint(
|
||||
__("Successfully deleted all transactions related to this company!")
|
||||
);
|
||||
},
|
||||
onerror: function () {
|
||||
frappe.msgprint(__("Wrong Password"));
|
||||
},
|
||||
=======
|
||||
frappe.call({
|
||||
method: "erpnext.setup.doctype.transaction_deletion_record.transaction_deletion_record.is_deletion_doc_running",
|
||||
args: {
|
||||
@@ -242,13 +209,9 @@ frappe.ui.form.on("Company", {
|
||||
__("Delete")
|
||||
);
|
||||
d.get_primary_btn().addClass("btn-danger");
|
||||
>>>>>>> 5a3afea8c7 (refactor: link running doc validation to company master)
|
||||
});
|
||||
},
|
||||
__("Delete all the Transactions for this Company"),
|
||||
__("Delete")
|
||||
);
|
||||
d.get_primary_btn().addClass("btn-danger");
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -11,11 +11,7 @@ from frappe.cache_manager import clear_defaults_cache
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
|
||||
from frappe.desk.page.setup_wizard.setup_wizard import make_records
|
||||
<<<<<<< HEAD
|
||||
from frappe.utils import cint, formatdate, get_timestamp, today
|
||||
=======
|
||||
from frappe.utils import cint, formatdate, get_link_to_form, get_timestamp, today
|
||||
>>>>>>> 5a3afea8c7 (refactor: link running doc validation to company master)
|
||||
from frappe.utils.nestedset import NestedSet, rebuild_tree
|
||||
|
||||
from erpnext.accounts.doctype.account.account import get_account_currency
|
||||
@@ -816,11 +812,6 @@ def get_default_company_address(name, sort_key="is_primary_address", existing_ad
|
||||
|
||||
@frappe.whitelist()
|
||||
def create_transaction_deletion_request(company):
|
||||
<<<<<<< HEAD
|
||||
tdr = frappe.get_doc({"doctype": "Transaction Deletion Record", "company": company})
|
||||
tdr.insert()
|
||||
tdr.submit()
|
||||
=======
|
||||
from erpnext.setup.doctype.transaction_deletion_record.transaction_deletion_record import (
|
||||
is_deletion_doc_running,
|
||||
)
|
||||
@@ -837,4 +828,3 @@ def create_transaction_deletion_request(company):
|
||||
),
|
||||
frappe.bold(company),
|
||||
)
|
||||
>>>>>>> 5a3afea8c7 (refactor: link running doc validation to company master)
|
||||
|
||||
@@ -27,12 +27,8 @@ class TestTransactionDeletionRecord(unittest.TestCase):
|
||||
def test_no_of_docs_is_correct(self):
|
||||
for i in range(5):
|
||||
create_task("Dunder Mifflin Paper Co")
|
||||
<<<<<<< HEAD
|
||||
tdr = create_transaction_deletion_request("Dunder Mifflin Paper Co")
|
||||
=======
|
||||
tdr = create_transaction_deletion_doc("Dunder Mifflin Paper Co")
|
||||
tdr.reload()
|
||||
>>>>>>> 81309576b0 (refactor(test): test cases modified to handle new approach)
|
||||
for doctype in tdr.doctypes:
|
||||
if doctype.doctype_name == "Task":
|
||||
self.assertEqual(doctype.no_of_docs, 5)
|
||||
|
||||
@@ -12,39 +12,6 @@ from frappe.utils.background_jobs import get_job, is_job_enqueued
|
||||
|
||||
|
||||
class TransactionDeletionRecord(Document):
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.transaction_deletion_record_details.transaction_deletion_record_details import (
|
||||
TransactionDeletionRecordDetails,
|
||||
)
|
||||
from erpnext.setup.doctype.transaction_deletion_record_item.transaction_deletion_record_item import (
|
||||
TransactionDeletionRecordItem,
|
||||
)
|
||||
|
||||
amended_from: DF.Link | None
|
||||
clear_notifications: DF.Check
|
||||
company: DF.Link
|
||||
delete_bin_data: DF.Check
|
||||
delete_leads_and_addresses: DF.Check
|
||||
delete_transactions: DF.Check
|
||||
doctypes: DF.Table[TransactionDeletionRecordDetails]
|
||||
doctypes_to_be_ignored: DF.Table[TransactionDeletionRecordItem]
|
||||
error_log: DF.LongText | None
|
||||
initialize_doctypes_table: DF.Check
|
||||
process_in_single_transaction: DF.Check
|
||||
reset_company_default_values: DF.Check
|
||||
status: DF.Literal["Queued", "Running", "Failed", "Completed", "Cancelled"]
|
||||
# end: auto-generated types
|
||||
|
||||
>>>>>>> 0d65d878de (refactor: more options for 'status' and move it to top)
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(TransactionDeletionRecord, self).__init__(*args, **kwargs)
|
||||
self.batch_size = 5000
|
||||
|
||||
@@ -7,21 +7,4 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class TransactionDeletionRecordItem(Document):
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
doctype_name: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
>>>>>>> 6a77d86a53 (refactor: use flags to decide on current stage)
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user