From ed16bbfb1d3f86e9265d6afdacefb247df4aae26 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 23 Feb 2022 10:54:44 +0530 Subject: [PATCH 01/30] fix: Email translations (cherry picked from commit aaa84a21ba8c1749735c6510c5f311c3db505aef) --- erpnext/translations/de.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index cf73564b9e..bda55afba7 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -3730,7 +3730,7 @@ Earliest Age,Frühestes Alter, Edit Details,Details bearbeiten, Edit Profile,Profil bearbeiten, Either GST Transporter ID or Vehicle No is required if Mode of Transport is Road,Bei Straßentransport ist entweder die GST-Transporter-ID oder die Fahrzeug-Nr. Erforderlich, -Email,Email, +Email,E-Mail, Email Campaigns,E-Mail-Kampagnen, Employee ID is linked with another instructor,Die Mitarbeiter-ID ist mit einem anderen Ausbilder verknüpft, Employee Tax and Benefits,Mitarbeitersteuern und -leistungen, @@ -6486,7 +6486,7 @@ Select Users,Wählen Sie Benutzer aus, Send Emails At,Die E-Mails senden um, Reminder,Erinnerung, Daily Work Summary Group User,Tägliche Arbeit Zusammenfassung Gruppenbenutzer, -email,Email, +email,E-Mail, Parent Department,Elternabteilung, Leave Block List,Urlaubssperrenliste, Days for which Holidays are blocked for this department.,"Tage, an denen eine Urlaubssperre für diese Abteilung gilt.", From c75283265ba125803d8ad6287a126f639944d934 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Fri, 25 Feb 2022 14:36:29 +0530 Subject: [PATCH 02/30] fix(pos): mode of payment disappears after save (cherry picked from commit 69c34cd7ae128dde56cde10c53b479331c33d56f) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 5229d87017..9b3b3aa414 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -439,7 +439,6 @@ class POSInvoice(SalesInvoice): self.paid_amount = 0 def set_account_for_mode_of_payment(self): - self.payments = [d for d in self.payments if d.amount or d.base_amount or d.default] for pay in self.payments: if not pay.account: pay.account = get_bank_cash_account(pay.mode_of_payment, self.company).get("account") From 823979fbcc5865691872b08cc33bfd3598e8677a Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Fri, 25 Feb 2022 15:18:06 +0530 Subject: [PATCH 03/30] fix(pos): coupon code is applied even if ignore pricing rule is check (cherry picked from commit 81514516f3c7106a5b211796bb74ddad0a6add20) # Conflicts: # erpnext/selling/page/point_of_sale/pos_payment.js --- erpnext/public/js/controllers/transaction.js | 18 +++++++++++------- .../selling/page/point_of_sale/pos_payment.js | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 136e1edb6b..840754eb73 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2283,13 +2283,17 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } coupon_code() { - var me = this; - frappe.run_serially([ - () => this.frm.doc.ignore_pricing_rule=1, - () => me.ignore_pricing_rule(), - () => this.frm.doc.ignore_pricing_rule=0, - () => me.apply_pricing_rule() - ]); + if (this.frm.doc.coupon_code || this.frm._last_coupon_code) { + // reset pricing rules if coupon code is set or is unset + const _ignore_pricing_rule = this.frm.doc.ignore_pricing_rule; + return frappe.run_serially([ + () => this.frm.doc.ignore_pricing_rule=1, + () => this.frm.trigger('ignore_pricing_rule'), + () => this.frm.doc.ignore_pricing_rule=_ignore_pricing_rule, + () => this.frm.trigger('apply_pricing_rule'), + () => this.frm._last_coupon_code = this.frm.doc.coupon_code + ]); + } } }; diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index 9650bc88a4..43cc14b008 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -170,6 +170,7 @@ erpnext.PointOfSale.Payment = class { }); frappe.ui.form.on('POS Invoice', 'coupon_code', (frm) => { +<<<<<<< HEAD if (!frm.doc.ignore_pricing_rule) { if (frm.doc.coupon_code) { frappe.run_serially([ @@ -189,6 +190,22 @@ erpnext.PointOfSale.Payment = class { () => this.update_totals_section(frm.doc) ]); } +======= + if (!frm.doc.ignore_pricing_rule && frm.doc.coupon_code) { + frappe.run_serially([ + () => frm.doc.ignore_pricing_rule=1, + () => frm.trigger('ignore_pricing_rule'), + () => frm.doc.ignore_pricing_rule=0, + () => frm.trigger('apply_pricing_rule'), + () => frm.save(), + () => this.update_totals_section(frm.doc) + ]); + } else if (frm.doc.ignore_pricing_rule && frm.doc.coupon_code) { + frappe.show_alert({ + message: __("Ignore Pricing Rule is enabled. Cannot apply coupon code."), + indicator: "orange" + }); +>>>>>>> 81514516f3 (fix(pos): coupon code is applied even if ignore pricing rule is check) } }); From d4767b541bcb7451ad202ecab083401941685424 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 28 Feb 2022 11:36:47 +0530 Subject: [PATCH 04/30] fix: merge conflict --- .../selling/page/point_of_sale/pos_payment.js | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index 43cc14b008..1e9f6d7d92 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -170,27 +170,6 @@ erpnext.PointOfSale.Payment = class { }); frappe.ui.form.on('POS Invoice', 'coupon_code', (frm) => { -<<<<<<< HEAD - if (!frm.doc.ignore_pricing_rule) { - if (frm.doc.coupon_code) { - frappe.run_serially([ - () => frm.doc.ignore_pricing_rule=1, - () => frm.trigger('ignore_pricing_rule'), - () => frm.doc.ignore_pricing_rule=0, - () => frm.trigger('apply_pricing_rule'), - () => frm.save(), - () => this.update_totals_section(frm.doc) - ]); - } else { - frappe.run_serially([ - () => frm.doc.ignore_pricing_rule=1, - () => frm.trigger('ignore_pricing_rule'), - () => frm.doc.ignore_pricing_rule=0, - () => frm.save(), - () => this.update_totals_section(frm.doc) - ]); - } -======= if (!frm.doc.ignore_pricing_rule && frm.doc.coupon_code) { frappe.run_serially([ () => frm.doc.ignore_pricing_rule=1, @@ -205,7 +184,6 @@ erpnext.PointOfSale.Payment = class { message: __("Ignore Pricing Rule is enabled. Cannot apply coupon code."), indicator: "orange" }); ->>>>>>> 81514516f3 (fix(pos): coupon code is applied even if ignore pricing rule is check) } }); From bda9d09125e543a41dbf6f38622e3aa3085a1a54 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 28 Feb 2022 21:57:03 +0530 Subject: [PATCH 05/30] bumped to version 14.0.0-beta.2 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index bef6661254..fc0b6df13a 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ import inspect import frappe -__version__ = '14.0.0-dev' +__version__ = '14.0.0-beta.2' def get_default_company(user=None): '''Get default company for user''' From 485e6b6a0931c9ec9709879d878894ea8760e7ca Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 27 Mar 2022 13:02:31 +0530 Subject: [PATCH 06/30] fix: Incorrect default amount to pay for POS invoices (cherry picked from commit a044e9268786b3395f2e33fd5b79e64bc60160a5) # Conflicts: # erpnext/public/js/controllers/taxes_and_totals.js --- erpnext/public/js/controllers/taxes_and_totals.js | 9 ++++++--- erpnext/public/js/controllers/transaction.js | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 9fec43b74e..c861ebb19d 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -34,12 +34,16 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { frappe.model.set_value(item.doctype, item.name, "rate", item_rate); } +<<<<<<< HEAD calculate_taxes_and_totals(update_paid_amount) { +======= + calculate_taxes_and_totals: async function(update_paid_amount) { +>>>>>>> a044e92687 (fix: Incorrect default amount to pay for POS invoices) this.discount_amount_applied = false; this._calculate_taxes_and_totals(); this.calculate_discount_amount(); - this.calculate_shipping_charges(); + await this.calculate_shipping_charges(); // Advance calculation applicable to Sales /Purchase Invoice if(in_list(["Sales Invoice", "POS Invoice", "Purchase Invoice"], this.frm.doc.doctype) @@ -275,8 +279,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { calculate_shipping_charges() { frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]); if (frappe.meta.get_docfield(this.frm.doc.doctype, "shipping_rule", this.frm.doc.name)) { - this.shipping_rule(); - this._calculate_taxes_and_totals(); + return this.shipping_rule(); } } diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index a8cec0ad12..25df4785c3 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1087,6 +1087,9 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe return this.frm.call({ doc: this.frm.doc, method: "apply_shipping_rule", + callback: function(r) { + me._calculate_taxes_and_totals(); + } }).fail(() => this.frm.set_value('shipping_rule', '')); } } From 33fa14b6cf8acb929ab6e37dd240d866b6b899c8 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Sun, 27 Mar 2022 19:23:53 +0530 Subject: [PATCH 07/30] fix: Resolve conflicts --- erpnext/public/js/controllers/taxes_and_totals.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index c861ebb19d..6dc3cd7d0a 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -34,11 +34,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { frappe.model.set_value(item.doctype, item.name, "rate", item_rate); } -<<<<<<< HEAD - calculate_taxes_and_totals(update_paid_amount) { -======= - calculate_taxes_and_totals: async function(update_paid_amount) { ->>>>>>> a044e92687 (fix: Incorrect default amount to pay for POS invoices) + async calculate_taxes_and_totals(update_paid_amount) { this.discount_amount_applied = false; this._calculate_taxes_and_totals(); this.calculate_discount_amount(); From 03952f8819b61c9842f865623f162a96222422d2 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 23 Mar 2022 18:47:58 +0530 Subject: [PATCH 08/30] fix(India): Auto tax fetching based on GSTIN (cherry picked from commit 7cae669e814a958310ca1b8ee408450569c32d10) # Conflicts: # erpnext/patches.txt # erpnext/regional/india/setup.py # erpnext/selling/doctype/quotation/quotation.json --- erpnext/patches.txt | 7 + .../create_gst_custom_fields_in_quotation.py | 29 ++ erpnext/regional/india/setup.py | 21 + erpnext/regional/india/utils.py | 6 +- .../selling/doctype/quotation/quotation.json | 392 ++++++++++++++---- .../doctype/quotation/regional/india.js | 3 + 6 files changed, 372 insertions(+), 86 deletions(-) create mode 100644 erpnext/patches/v13_0/create_gst_custom_fields_in_quotation.py create mode 100644 erpnext/selling/doctype/quotation/regional/india.js diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 028834a0ec..83464aec31 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -356,6 +356,7 @@ erpnext.patches.v13_0.update_exchange_rate_settings erpnext.patches.v14_0.delete_amazon_mws_doctype erpnext.patches.v13_0.set_work_order_qty_in_so_from_mr erpnext.patches.v13_0.update_accounts_in_loan_docs +<<<<<<< HEAD erpnext.patches.v14_0.update_batch_valuation_flag erpnext.patches.v14_0.delete_non_profit_doctypes erpnext.patches.v14_0.update_employee_advance_status @@ -363,3 +364,9 @@ erpnext.patches.v13_0.add_cost_center_in_loans erpnext.patches.v13_0.set_return_against_in_pos_invoice_references erpnext.patches.v13_0.remove_unknown_links_to_prod_plan_items # 24-03-2022 erpnext.patches.v13_0.update_expense_claim_status_for_paid_advances +======= +erpnext.patches.v13_0.remove_unknown_links_to_prod_plan_items +erpnext.patches.v13_0.rename_non_profit_fields +erpnext.patches.v13_0.enable_ksa_vat_docs #1 +erpnext.patches.v13_0.create_gst_custom_fields_in_quotation +>>>>>>> 7cae669e81 (fix(India): Auto tax fetching based on GSTIN) diff --git a/erpnext/patches/v13_0/create_gst_custom_fields_in_quotation.py b/erpnext/patches/v13_0/create_gst_custom_fields_in_quotation.py new file mode 100644 index 0000000000..840b8fd830 --- /dev/null +++ b/erpnext/patches/v13_0/create_gst_custom_fields_in_quotation.py @@ -0,0 +1,29 @@ +import frappe +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields + + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'India'}, fields=['name']) + if not company: + return + + sales_invoice_gst_fields = [ + dict(fieldname='billing_address_gstin', label='Billing Address GSTIN', + fieldtype='Data', insert_after='customer_address', read_only=1, + fetch_from='customer_address.gstin', print_hide=1, length=15), + dict(fieldname='customer_gstin', label='Customer GSTIN', + fieldtype='Data', insert_after='shipping_address_name', + fetch_from='shipping_address_name.gstin', print_hide=1, length=15), + dict(fieldname='place_of_supply', label='Place of Supply', + fieldtype='Data', insert_after='customer_gstin', + print_hide=1, read_only=1, length=50), + dict(fieldname='company_gstin', label='Company GSTIN', + fieldtype='Data', insert_after='company_address', + fetch_from='company_address.gstin', print_hide=1, read_only=1, length=15), + ] + + custom_fields = { + 'Quotation': sales_invoice_gst_fields + } + + create_custom_fields(custom_fields, update=True) \ No newline at end of file diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index 40fa6cd097..a7938e093c 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -909,6 +909,7 @@ def get_custom_fields(): read_only=1, ), ], +<<<<<<< HEAD "Purchase Invoice": purchase_invoice_gst_category + invoice_gst_fields + purchase_invoice_itc_fields @@ -947,6 +948,26 @@ def get_custom_fields(): dict( fieldname="is_non_gst", label="Is Non GST ", fieldtype="Check", insert_after="is_nil_exempt" ), +======= + 'Purchase Invoice': purchase_invoice_gst_category + invoice_gst_fields + purchase_invoice_itc_fields + purchase_invoice_gst_fields, + 'Purchase Order': purchase_invoice_gst_fields, + 'Purchase Receipt': purchase_invoice_gst_fields, + 'Sales Invoice': sales_invoice_gst_category + invoice_gst_fields + sales_invoice_shipping_fields + sales_invoice_gst_fields + si_ewaybill_fields + si_einvoice_fields, + 'POS Invoice': sales_invoice_gst_fields, + 'Delivery Note': sales_invoice_gst_fields + ewaybill_fields + sales_invoice_shipping_fields + delivery_note_gst_category, + 'Payment Entry': payment_entry_fields, + 'Journal Entry': journal_entry_fields, + 'Sales Order': sales_invoice_gst_fields, + 'Tax Category': inter_state_gst_field, + 'Quotation': sales_invoice_gst_fields, + 'Item': [ + dict(fieldname='gst_hsn_code', label='HSN/SAC', + fieldtype='Link', options='GST HSN Code', insert_after='item_group'), + dict(fieldname='is_nil_exempt', label='Is Nil Rated or Exempted', + fieldtype='Check', insert_after='gst_hsn_code'), + dict(fieldname='is_non_gst', label='Is Non GST ', + fieldtype='Check', insert_after='is_nil_exempt') +>>>>>>> 7cae669e81 (fix(India): Auto tax fetching based on GSTIN) ], "Quotation Item": [hsn_sac_field, nil_rated_exempt, is_non_gst], "Supplier Quotation Item": [hsn_sac_field, nil_rated_exempt, is_non_gst], diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 47e6ae67f4..1920b37321 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -225,7 +225,7 @@ def get_place_of_supply(party_details, doctype): if not frappe.get_meta("Address").has_field("gst_state"): return - if doctype in ("Sales Invoice", "Delivery Note", "Sales Order"): + if doctype in ("Sales Invoice", "Delivery Note", "Sales Order", "Quotation"): address_name = party_details.customer_address or party_details.shipping_address_name elif doctype in ("Purchase Invoice", "Purchase Order", "Purchase Receipt"): address_name = party_details.shipping_address or party_details.supplier_address @@ -254,7 +254,7 @@ def get_regional_address_details(party_details, doctype, company): party_details.taxes = [] return party_details - if doctype in ("Sales Invoice", "Delivery Note", "Sales Order"): + if doctype in ("Sales Invoice", "Delivery Note", "Sales Order", "Quotation"): master_doctype = "Sales Taxes and Charges Template" tax_template_by_category = get_tax_template_based_on_category( master_doctype, company, party_details @@ -310,7 +310,7 @@ def update_party_details(party_details, doctype): def is_internal_transfer(party_details, doctype): - if doctype in ("Sales Invoice", "Delivery Note", "Sales Order"): + if doctype in ("Sales Invoice", "Delivery Note", "Sales Order", "Quotation"): destination_gstin = party_details.company_gstin elif doctype in ("Purchase Invoice", "Purchase Order", "Purchase Receipt"): destination_gstin = party_details.supplier_gstin diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index ee5b0ea760..018682ff80 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -31,6 +31,8 @@ "col_break98", "shipping_address_name", "shipping_address", + "company_address", + "company_address_display", "customer_group", "territory", "currency_and_price_list", @@ -117,7 +119,9 @@ { "fieldname": "customer_section", "fieldtype": "Section Break", - "options": "fa fa-user" + "options": "fa fa-user", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -127,7 +131,9 @@ "hidden": 1, "label": "Title", "no_copy": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "naming_series", @@ -139,7 +145,9 @@ "options": "SAL-QTN-.YYYY.-", "print_hide": 1, "reqd": 1, - "set_only_once": 1 + "set_only_once": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "Customer", @@ -151,7 +159,9 @@ "oldfieldtype": "Select", "options": "DocType", "print_hide": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -164,7 +174,9 @@ "oldfieldtype": "Link", "options": "quotation_to", "print_hide": 1, - "search_index": 1 + "search_index": 1, + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -173,12 +185,16 @@ "hidden": 1, "in_global_search": 1, "label": "Customer Name", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break1", "fieldtype": "Column Break", "oldfieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -192,6 +208,8 @@ "options": "Quotation", "print_hide": 1, "read_only": 1, + "show_days": 1, + "show_seconds": 1, "width": "150px" }, { @@ -204,6 +222,8 @@ "print_hide": 1, "remember_last_selected_value": 1, "reqd": 1, + "show_days": 1, + "show_seconds": 1, "width": "150px" }, { @@ -218,12 +238,16 @@ "oldfieldtype": "Date", "reqd": 1, "search_index": 1, + "show_days": 1, + "show_seconds": 1, "width": "100px" }, { "fieldname": "valid_till", "fieldtype": "Date", - "label": "Valid Till" + "label": "Valid Till", + "show_days": 1, + "show_seconds": 1 }, { "default": "Sales", @@ -235,7 +259,9 @@ "oldfieldtype": "Select", "options": "\nSales\nMaintenance\nShopping Cart", "print_hide": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -243,14 +269,18 @@ "fieldname": "contact_section", "fieldtype": "Section Break", "label": "Address and Contact", - "options": "fa fa-bullhorn" + "options": "fa fa-bullhorn", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "customer_address", "fieldtype": "Link", "label": "Customer Address", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "address_display", @@ -258,7 +288,9 @@ "label": "Address", "oldfieldname": "customer_address", "oldfieldtype": "Small Text", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_person", @@ -267,20 +299,26 @@ "oldfieldname": "contact_person", "oldfieldtype": "Link", "options": "Contact", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_display", "fieldtype": "Small Text", "in_global_search": 1, "label": "Contact", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_mobile", "fieldtype": "Small Text", "label": "Mobile No", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "contact_email", @@ -289,12 +327,16 @@ "label": "Contact Email", "options": "Email", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.quotaion_to=='Customer' && doc.party_name", "fieldname": "col_break98", "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -302,14 +344,18 @@ "fieldtype": "Link", "label": "Shipping Address", "options": "Address", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "shipping_address", "fieldtype": "Small Text", "label": "Shipping Address", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "eval:doc.quotaion_to=='Customer' && doc.party_name", @@ -320,21 +366,27 @@ "oldfieldname": "customer_group", "oldfieldtype": "Link", "options": "Customer Group", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "territory", "fieldtype": "Link", "label": "Territory", "options": "Territory", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "currency_and_price_list", "fieldtype": "Section Break", "label": "Currency and Price List", - "options": "fa fa-tag" + "options": "fa fa-tag", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "currency", @@ -345,6 +397,8 @@ "options": "Currency", "print_hide": 1, "reqd": 1, + "show_days": 1, + "show_seconds": 1, "width": "100px" }, { @@ -357,11 +411,15 @@ "precision": "9", "print_hide": 1, "reqd": 1, + "show_days": 1, + "show_seconds": 1, "width": "100px" }, { "fieldname": "column_break2", "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -373,6 +431,8 @@ "options": "Price List", "print_hide": 1, "reqd": 1, + "show_days": 1, + "show_seconds": 1, "width": "100px" }, { @@ -382,7 +442,9 @@ "options": "Currency", "print_hide": 1, "read_only": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "description": "Rate at which Price list currency is converted to company's base currency", @@ -391,7 +453,9 @@ "label": "Price List Exchange Rate", "precision": "9", "print_hide": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "default": "0", @@ -400,13 +464,17 @@ "label": "Ignore Pricing Rule", "no_copy": 1, "permlevel": 1, - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "items_section", "fieldtype": "Section Break", "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" + "options": "fa fa-shopping-cart", + "show_days": 1, + "show_seconds": 1 }, { "allow_bulk_edit": 1, @@ -417,29 +485,39 @@ "oldfieldtype": "Table", "options": "Quotation Item", "reqd": 1, + "show_days": 1, + "show_seconds": 1, "width": "40px" }, { "fieldname": "pricing_rule_details", "fieldtype": "Section Break", - "label": "Pricing Rules" + "label": "Pricing Rules", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "pricing_rules", "fieldtype": "Table", "label": "Pricing Rule Detail", "options": "Pricing Rule Detail", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "sec_break23", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_qty", "fieldtype": "Float", "label": "Total Quantity", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_total", @@ -447,7 +525,9 @@ "label": "Total (Company Currency)", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_net_total", @@ -458,18 +538,24 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1, + "show_days": 1, + "show_seconds": 1, "width": "100px" }, { "fieldname": "column_break_28", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total", "fieldtype": "Currency", "label": "Total", "options": "currency", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "net_total", @@ -477,32 +563,42 @@ "label": "Net Total", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_net_weight", "fieldtype": "Float", "label": "Total Net Weight", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes_section", "fieldtype": "Section Break", "label": "Taxes and Charges", "oldfieldtype": "Section Break", - "options": "fa fa-money" + "options": "fa fa-money", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "tax_category", "fieldtype": "Link", "label": "Tax Category", "options": "Tax Category", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_34", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "shipping_rule", @@ -510,11 +606,15 @@ "label": "Shipping Rule", "oldfieldtype": "Button", "options": "Shipping Rule", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_36", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes_and_charges", @@ -523,7 +623,9 @@ "oldfieldname": "charge", "oldfieldtype": "Link", "options": "Sales Taxes and Charges Template", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "taxes", @@ -531,13 +633,17 @@ "label": "Sales Taxes and Charges", "oldfieldname": "other_charges", "oldfieldtype": "Table", - "options": "Sales Taxes and Charges" + "options": "Sales Taxes and Charges", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "sec_tax_breakup", "fieldtype": "Section Break", - "label": "Tax Breakup" + "label": "Tax Breakup", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "other_charges_calculation", @@ -546,11 +652,15 @@ "no_copy": 1, "oldfieldtype": "HTML", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "section_break_39", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_total_taxes_and_charges", @@ -560,11 +670,15 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_42", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "total_taxes_and_charges", @@ -572,26 +686,34 @@ "label": "Total Taxes and Charges", "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "collapsible_depends_on": "discount_amount", "fieldname": "section_break_44", "fieldtype": "Section Break", - "label": "Additional Discount and Coupon Code" + "label": "Additional Discount and Coupon Code", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "coupon_code", "fieldtype": "Link", "label": "Coupon Code", - "options": "Coupon Code" + "options": "Coupon Code", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "referral_sales_partner", "fieldtype": "Link", "label": "Referral Sales Partner", - "options": "Sales Partner" + "options": "Sales Partner", + "show_days": 1, + "show_seconds": 1 }, { "default": "Grand Total", @@ -599,7 +721,9 @@ "fieldtype": "Select", "label": "Apply Additional Discount On", "options": "\nGrand Total\nNet Total", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_discount_amount", @@ -607,31 +731,41 @@ "label": "Additional Discount Amount (Company Currency)", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_46", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "additional_discount_percentage", "fieldtype": "Float", "label": "Additional Discount Percentage", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "discount_amount", "fieldtype": "Currency", "label": "Additional Discount Amount", "options": "currency", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "totals", "fieldtype": "Section Break", "oldfieldtype": "Section Break", "options": "fa fa-money", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "base_grand_total", @@ -642,6 +776,8 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1, + "show_days": 1, + "show_seconds": 1, "width": "200px" }, { @@ -651,7 +787,9 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "description": "In Words will be visible once you save the Quotation.", @@ -663,6 +801,8 @@ "oldfieldtype": "Data", "print_hide": 1, "read_only": 1, + "show_days": 1, + "show_seconds": 1, "width": "200px" }, { @@ -674,6 +814,8 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1, + "show_days": 1, + "show_seconds": 1, "width": "200px" }, { @@ -681,6 +823,8 @@ "fieldtype": "Column Break", "oldfieldtype": "Column Break", "print_hide": 1, + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -692,6 +836,8 @@ "oldfieldtype": "Currency", "options": "currency", "read_only": 1, + "show_days": 1, + "show_seconds": 1, "width": "200px" }, { @@ -701,7 +847,9 @@ "no_copy": 1, "options": "currency", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "bold": 1, @@ -712,6 +860,8 @@ "oldfieldtype": "Currency", "options": "currency", "read_only": 1, + "show_days": 1, + "show_seconds": 1, "width": "200px" }, { @@ -723,19 +873,25 @@ "oldfieldtype": "Data", "print_hide": 1, "read_only": 1, + "show_days": 1, + "show_seconds": 1, "width": "200px" }, { "fieldname": "payment_schedule_section", "fieldtype": "Section Break", - "label": "Payment Terms" + "label": "Payment Terms", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "payment_terms_template", "fieldtype": "Link", "label": "Payment Terms Template", "options": "Payment Terms Template", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "payment_schedule", @@ -743,7 +899,9 @@ "label": "Payment Schedule", "no_copy": 1, "options": "Payment Schedule", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -752,7 +910,9 @@ "fieldtype": "Section Break", "label": "Terms and Conditions", "oldfieldtype": "Section Break", - "options": "fa fa-legal" + "options": "fa fa-legal", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "tc_name", @@ -762,20 +922,26 @@ "oldfieldtype": "Link", "options": "Terms and Conditions", "print_hide": 1, - "report_hide": 1 + "report_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "terms", "fieldtype": "Text Editor", "label": "Term Details", "oldfieldname": "terms", - "oldfieldtype": "Text Editor" + "oldfieldtype": "Text Editor", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, "fieldname": "print_settings", "fieldtype": "Section Break", - "label": "Print Settings" + "label": "Print Settings", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -785,7 +951,9 @@ "oldfieldname": "letter_head", "oldfieldtype": "Select", "options": "Letter Head", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -793,11 +961,15 @@ "fieldname": "group_same_items", "fieldtype": "Check", "label": "Group same items", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break_73", - "fieldtype": "Column Break" + "fieldtype": "Column Break", + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -809,19 +981,25 @@ "oldfieldtype": "Link", "options": "Print Heading", "print_hide": 1, - "report_hide": 1 + "report_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "language", "fieldtype": "Data", "label": "Print Language", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "subscription_section", "fieldtype": "Section Break", - "label": "Auto Repeat Section" + "label": "Auto Repeat Section", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "auto_repeat", @@ -830,14 +1008,18 @@ "no_copy": 1, "options": "Auto Repeat", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, "depends_on": "eval: doc.auto_repeat", "fieldname": "update_auto_repeat_reference", "fieldtype": "Button", - "label": "Update Auto Repeat Reference" + "label": "Update Auto Repeat Reference", + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -846,7 +1028,9 @@ "label": "More Information", "oldfieldtype": "Section Break", "options": "fa fa-file-text", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "campaign", @@ -855,7 +1039,9 @@ "oldfieldname": "campaign", "oldfieldtype": "Link", "options": "Campaign", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "source", @@ -864,7 +1050,9 @@ "oldfieldname": "source", "oldfieldtype": "Select", "options": "Lead Source", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -875,13 +1063,17 @@ "no_copy": 1, "oldfieldname": "order_lost_reason", "oldfieldtype": "Small Text", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "column_break4", "fieldtype": "Column Break", "oldfieldtype": "Column Break", "print_hide": 1, + "show_days": 1, + "show_seconds": 1, "width": "50%" }, { @@ -896,7 +1088,9 @@ "options": "Draft\nOpen\nReplied\nOrdered\nLost\nCancelled\nExpired", "print_hide": 1, "read_only": 1, - "reqd": 1 + "reqd": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "enq_det", @@ -906,13 +1100,17 @@ "oldfieldname": "enq_det", "oldfieldtype": "Text", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "supplier_quotation", "fieldtype": "Link", "label": "Supplier Quotation", - "options": "Supplier Quotation" + "options": "Supplier Quotation", + "show_days": 1, + "show_seconds": 1 }, { "fieldname": "opportunity", @@ -920,7 +1118,9 @@ "label": "Opportunity", "options": "Opportunity", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "allow_on_submit": 1, @@ -928,7 +1128,9 @@ "fieldtype": "Table MultiSelect", "label": "Lost Reasons", "options": "Quotation Lost Reason Detail", - "read_only": 1 + "read_only": 1, + "show_days": 1, + "show_seconds": 1 }, { "depends_on": "packed_items", @@ -936,7 +1138,9 @@ "fieldtype": "Table", "label": "Bundle Items", "options": "Packed Item", - "print_hide": 1 + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 }, { "collapsible": 1, @@ -946,6 +1150,7 @@ "fieldtype": "Section Break", "label": "Bundle Items", "options": "fa fa-suitcase", +<<<<<<< HEAD "print_hide": 1 }, { @@ -955,13 +1160,34 @@ "label": "Competitors", "options": "Competitor Detail", "read_only": 1 +======= + "print_hide": 1, + "show_days": 1, + "show_seconds": 1 + }, + { + "fieldname": "company_address", + "fieldtype": "Link", + "label": "Company Address Name", + "options": "Address", + "show_days": 1, + "show_seconds": 1 + }, + { + "fieldname": "company_address_display", + "fieldtype": "Small Text", + "label": "Company Address", + "read_only": 1, + "show_days": 1, + "show_seconds": 1 +>>>>>>> 7cae669e81 (fix(India): Auto tax fetching based on GSTIN) } ], "icon": "fa fa-shopping-cart", "idx": 82, "is_submittable": 1, "links": [], - "modified": "2021-11-30 01:33:21.106073", + "modified": "2022-03-23 16:49:36.297403", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", diff --git a/erpnext/selling/doctype/quotation/regional/india.js b/erpnext/selling/doctype/quotation/regional/india.js new file mode 100644 index 0000000000..955083565b --- /dev/null +++ b/erpnext/selling/doctype/quotation/regional/india.js @@ -0,0 +1,3 @@ +{% include "erpnext/regional/india/taxes.js" %} + +erpnext.setup_auto_gst_taxation('Quotation'); From 1fdc085d17bf4cee4a5fdb9dce0aac98bce032b3 Mon Sep 17 00:00:00 2001 From: Ahmad Date: Wed, 30 Mar 2022 13:23:30 +0500 Subject: [PATCH 09/30] fix: web form filter for project --- erpnext/projects/doctype/project/project.py | 48 ++++++++++++++------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 7031fcb1de..29f1ce455e 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -326,21 +326,39 @@ def get_timeline_data(doctype, name): def get_project_list( doctype, txt, filters, limit_start, limit_page_length=20, order_by="modified" ): - return frappe.db.sql( - """select distinct project.* - from tabProject project, `tabProject User` project_user - where - (project_user.user = %(user)s - and project_user.parent = project.name) - or project.owner = %(user)s - order by project.modified desc - limit {0}, {1} - """.format( - limit_start, limit_page_length - ), - {"user": frappe.session.user}, - as_dict=True, - update={"doctype": "Project"}, + meta = frappe.get_meta(doctype) + if not filters: + filters = [] + + fields = "distinct *" + + or_filters = [] + + if txt: + if meta.search_fields: + for f in meta.get_search_fields(): + if f == "name" or meta.get_field(f).fieldtype in ( + "Data", + "Text", + "Small Text", + "Text Editor", + "select", + ): + or_filters.append([doctype, f, "like", "%" + txt + "%"]) + else: + if isinstance(filters, dict): + filters["name"] = ("like", "%" + txt + "%") + else: + filters.append([doctype, "name", "like", "%" + txt + "%"]) + + return frappe.get_list( + doctype, + fields=fields, + filters=filters, + or_filters=or_filters, + limit_start=limit_start, + limit_page_length=limit_page_length, + order_by=order_by, ) From 9a6a181f145f345a9973afc8673590b59aec1617 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 1 Apr 2022 14:46:26 +0530 Subject: [PATCH 10/30] fix: Ignore disabled tax categories --- erpnext/regional/india/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 47e6ae67f4..8189d0a414 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -339,7 +339,7 @@ def get_tax_template(master_doctype, company, is_inter_state, state_code): tax_categories = frappe.get_all( "Tax Category", fields=["name", "is_inter_state", "gst_state"], - filters={"is_inter_state": is_inter_state, "is_reverse_charge": 0}, + filters={"is_inter_state": is_inter_state, "is_reverse_charge": 0, "disabled": 0}, ) default_tax = "" From 485f5cfdfedfe935efbf2be1c089b4a13defd586 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 2 Apr 2022 17:25:29 +0530 Subject: [PATCH 11/30] fix: Resolve conflicts --- erpnext/patches.txt | 8 +- erpnext/regional/india/setup.py | 22 +- .../selling/doctype/quotation/quotation.json | 394 ++++-------------- 3 files changed, 89 insertions(+), 335 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 83464aec31..a64a72e1a6 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -356,7 +356,6 @@ erpnext.patches.v13_0.update_exchange_rate_settings erpnext.patches.v14_0.delete_amazon_mws_doctype erpnext.patches.v13_0.set_work_order_qty_in_so_from_mr erpnext.patches.v13_0.update_accounts_in_loan_docs -<<<<<<< HEAD erpnext.patches.v14_0.update_batch_valuation_flag erpnext.patches.v14_0.delete_non_profit_doctypes erpnext.patches.v14_0.update_employee_advance_status @@ -364,9 +363,4 @@ erpnext.patches.v13_0.add_cost_center_in_loans erpnext.patches.v13_0.set_return_against_in_pos_invoice_references erpnext.patches.v13_0.remove_unknown_links_to_prod_plan_items # 24-03-2022 erpnext.patches.v13_0.update_expense_claim_status_for_paid_advances -======= -erpnext.patches.v13_0.remove_unknown_links_to_prod_plan_items -erpnext.patches.v13_0.rename_non_profit_fields -erpnext.patches.v13_0.enable_ksa_vat_docs #1 -erpnext.patches.v13_0.create_gst_custom_fields_in_quotation ->>>>>>> 7cae669e81 (fix(India): Auto tax fetching based on GSTIN) +erpnext.patches.v13_0.create_gst_custom_fields_in_quotation \ No newline at end of file diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index a7938e093c..446faaa708 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -909,7 +909,6 @@ def get_custom_fields(): read_only=1, ), ], -<<<<<<< HEAD "Purchase Invoice": purchase_invoice_gst_category + invoice_gst_fields + purchase_invoice_itc_fields @@ -931,6 +930,7 @@ def get_custom_fields(): "Journal Entry": journal_entry_fields, "Sales Order": sales_invoice_gst_fields, "Tax Category": inter_state_gst_field, + "Quotation": sales_invoice_gst_fields, "Item": [ dict( fieldname="gst_hsn_code", @@ -948,26 +948,6 @@ def get_custom_fields(): dict( fieldname="is_non_gst", label="Is Non GST ", fieldtype="Check", insert_after="is_nil_exempt" ), -======= - 'Purchase Invoice': purchase_invoice_gst_category + invoice_gst_fields + purchase_invoice_itc_fields + purchase_invoice_gst_fields, - 'Purchase Order': purchase_invoice_gst_fields, - 'Purchase Receipt': purchase_invoice_gst_fields, - 'Sales Invoice': sales_invoice_gst_category + invoice_gst_fields + sales_invoice_shipping_fields + sales_invoice_gst_fields + si_ewaybill_fields + si_einvoice_fields, - 'POS Invoice': sales_invoice_gst_fields, - 'Delivery Note': sales_invoice_gst_fields + ewaybill_fields + sales_invoice_shipping_fields + delivery_note_gst_category, - 'Payment Entry': payment_entry_fields, - 'Journal Entry': journal_entry_fields, - 'Sales Order': sales_invoice_gst_fields, - 'Tax Category': inter_state_gst_field, - 'Quotation': sales_invoice_gst_fields, - 'Item': [ - dict(fieldname='gst_hsn_code', label='HSN/SAC', - fieldtype='Link', options='GST HSN Code', insert_after='item_group'), - dict(fieldname='is_nil_exempt', label='Is Nil Rated or Exempted', - fieldtype='Check', insert_after='gst_hsn_code'), - dict(fieldname='is_non_gst', label='Is Non GST ', - fieldtype='Check', insert_after='is_nil_exempt') ->>>>>>> 7cae669e81 (fix(India): Auto tax fetching based on GSTIN) ], "Quotation Item": [hsn_sac_field, nil_rated_exempt, is_non_gst], "Supplier Quotation Item": [hsn_sac_field, nil_rated_exempt, is_non_gst], diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 018682ff80..b069e62274 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -112,16 +112,13 @@ "enq_det", "supplier_quotation", "opportunity", - "lost_reasons", - "competitors" + "lost_reasons" ], "fields": [ { "fieldname": "customer_section", "fieldtype": "Section Break", - "options": "fa fa-user", - "show_days": 1, - "show_seconds": 1 + "options": "fa fa-user" }, { "allow_on_submit": 1, @@ -131,9 +128,7 @@ "hidden": 1, "label": "Title", "no_copy": 1, - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "naming_series", @@ -145,9 +140,7 @@ "options": "SAL-QTN-.YYYY.-", "print_hide": 1, "reqd": 1, - "set_only_once": 1, - "show_days": 1, - "show_seconds": 1 + "set_only_once": 1 }, { "default": "Customer", @@ -159,9 +152,7 @@ "oldfieldtype": "Select", "options": "DocType", "print_hide": 1, - "reqd": 1, - "show_days": 1, - "show_seconds": 1 + "reqd": 1 }, { "bold": 1, @@ -174,9 +165,7 @@ "oldfieldtype": "Link", "options": "quotation_to", "print_hide": 1, - "search_index": 1, - "show_days": 1, - "show_seconds": 1 + "search_index": 1 }, { "bold": 1, @@ -185,16 +174,12 @@ "hidden": 1, "in_global_search": 1, "label": "Customer Name", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "column_break1", "fieldtype": "Column Break", "oldfieldtype": "Column Break", - "show_days": 1, - "show_seconds": 1, "width": "50%" }, { @@ -208,8 +193,6 @@ "options": "Quotation", "print_hide": 1, "read_only": 1, - "show_days": 1, - "show_seconds": 1, "width": "150px" }, { @@ -222,8 +205,6 @@ "print_hide": 1, "remember_last_selected_value": 1, "reqd": 1, - "show_days": 1, - "show_seconds": 1, "width": "150px" }, { @@ -238,16 +219,12 @@ "oldfieldtype": "Date", "reqd": 1, "search_index": 1, - "show_days": 1, - "show_seconds": 1, "width": "100px" }, { "fieldname": "valid_till", "fieldtype": "Date", - "label": "Valid Till", - "show_days": 1, - "show_seconds": 1 + "label": "Valid Till" }, { "default": "Sales", @@ -259,9 +236,7 @@ "oldfieldtype": "Select", "options": "\nSales\nMaintenance\nShopping Cart", "print_hide": 1, - "reqd": 1, - "show_days": 1, - "show_seconds": 1 + "reqd": 1 }, { "collapsible": 1, @@ -269,18 +244,14 @@ "fieldname": "contact_section", "fieldtype": "Section Break", "label": "Address and Contact", - "options": "fa fa-bullhorn", - "show_days": 1, - "show_seconds": 1 + "options": "fa fa-bullhorn" }, { "fieldname": "customer_address", "fieldtype": "Link", "label": "Customer Address", "options": "Address", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "address_display", @@ -288,9 +259,7 @@ "label": "Address", "oldfieldname": "customer_address", "oldfieldtype": "Small Text", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "contact_person", @@ -299,26 +268,20 @@ "oldfieldname": "contact_person", "oldfieldtype": "Link", "options": "Contact", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "contact_display", "fieldtype": "Small Text", "in_global_search": 1, "label": "Contact", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "contact_mobile", "fieldtype": "Small Text", "label": "Mobile No", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "contact_email", @@ -327,16 +290,12 @@ "label": "Contact Email", "options": "Email", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "depends_on": "eval:doc.quotaion_to=='Customer' && doc.party_name", "fieldname": "col_break98", "fieldtype": "Column Break", - "show_days": 1, - "show_seconds": 1, "width": "50%" }, { @@ -344,18 +303,14 @@ "fieldtype": "Link", "label": "Shipping Address", "options": "Address", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "shipping_address", "fieldtype": "Small Text", "label": "Shipping Address", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "depends_on": "eval:doc.quotaion_to=='Customer' && doc.party_name", @@ -366,27 +321,21 @@ "oldfieldname": "customer_group", "oldfieldtype": "Link", "options": "Customer Group", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "territory", "fieldtype": "Link", "label": "Territory", "options": "Territory", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "collapsible": 1, "fieldname": "currency_and_price_list", "fieldtype": "Section Break", "label": "Currency and Price List", - "options": "fa fa-tag", - "show_days": 1, - "show_seconds": 1 + "options": "fa fa-tag" }, { "fieldname": "currency", @@ -397,8 +346,6 @@ "options": "Currency", "print_hide": 1, "reqd": 1, - "show_days": 1, - "show_seconds": 1, "width": "100px" }, { @@ -411,15 +358,11 @@ "precision": "9", "print_hide": 1, "reqd": 1, - "show_days": 1, - "show_seconds": 1, "width": "100px" }, { "fieldname": "column_break2", "fieldtype": "Column Break", - "show_days": 1, - "show_seconds": 1, "width": "50%" }, { @@ -431,8 +374,6 @@ "options": "Price List", "print_hide": 1, "reqd": 1, - "show_days": 1, - "show_seconds": 1, "width": "100px" }, { @@ -442,9 +383,7 @@ "options": "Currency", "print_hide": 1, "read_only": 1, - "reqd": 1, - "show_days": 1, - "show_seconds": 1 + "reqd": 1 }, { "description": "Rate at which Price list currency is converted to company's base currency", @@ -453,9 +392,7 @@ "label": "Price List Exchange Rate", "precision": "9", "print_hide": 1, - "reqd": 1, - "show_days": 1, - "show_seconds": 1 + "reqd": 1 }, { "default": "0", @@ -464,17 +401,13 @@ "label": "Ignore Pricing Rule", "no_copy": 1, "permlevel": 1, - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "items_section", "fieldtype": "Section Break", "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart", - "show_days": 1, - "show_seconds": 1 + "options": "fa fa-shopping-cart" }, { "allow_bulk_edit": 1, @@ -485,39 +418,29 @@ "oldfieldtype": "Table", "options": "Quotation Item", "reqd": 1, - "show_days": 1, - "show_seconds": 1, "width": "40px" }, { "fieldname": "pricing_rule_details", "fieldtype": "Section Break", - "label": "Pricing Rules", - "show_days": 1, - "show_seconds": 1 + "label": "Pricing Rules" }, { "fieldname": "pricing_rules", "fieldtype": "Table", "label": "Pricing Rule Detail", "options": "Pricing Rule Detail", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "sec_break23", - "fieldtype": "Section Break", - "show_days": 1, - "show_seconds": 1 + "fieldtype": "Section Break" }, { "fieldname": "total_qty", "fieldtype": "Float", "label": "Total Quantity", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "base_total", @@ -525,9 +448,7 @@ "label": "Total (Company Currency)", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "base_net_total", @@ -538,24 +459,18 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1, - "show_days": 1, - "show_seconds": 1, "width": "100px" }, { "fieldname": "column_break_28", - "fieldtype": "Column Break", - "show_days": 1, - "show_seconds": 1 + "fieldtype": "Column Break" }, { "fieldname": "total", "fieldtype": "Currency", "label": "Total", "options": "currency", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "net_total", @@ -563,42 +478,32 @@ "label": "Net Total", "options": "currency", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "total_net_weight", "fieldtype": "Float", "label": "Total Net Weight", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "taxes_section", "fieldtype": "Section Break", "label": "Taxes and Charges", "oldfieldtype": "Section Break", - "options": "fa fa-money", - "show_days": 1, - "show_seconds": 1 + "options": "fa fa-money" }, { "fieldname": "tax_category", "fieldtype": "Link", "label": "Tax Category", "options": "Tax Category", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "column_break_34", - "fieldtype": "Column Break", - "show_days": 1, - "show_seconds": 1 + "fieldtype": "Column Break" }, { "fieldname": "shipping_rule", @@ -606,15 +511,11 @@ "label": "Shipping Rule", "oldfieldtype": "Button", "options": "Shipping Rule", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "section_break_36", - "fieldtype": "Section Break", - "show_days": 1, - "show_seconds": 1 + "fieldtype": "Section Break" }, { "fieldname": "taxes_and_charges", @@ -623,9 +524,7 @@ "oldfieldname": "charge", "oldfieldtype": "Link", "options": "Sales Taxes and Charges Template", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "taxes", @@ -633,17 +532,13 @@ "label": "Sales Taxes and Charges", "oldfieldname": "other_charges", "oldfieldtype": "Table", - "options": "Sales Taxes and Charges", - "show_days": 1, - "show_seconds": 1 + "options": "Sales Taxes and Charges" }, { "collapsible": 1, "fieldname": "sec_tax_breakup", "fieldtype": "Section Break", - "label": "Tax Breakup", - "show_days": 1, - "show_seconds": 1 + "label": "Tax Breakup" }, { "fieldname": "other_charges_calculation", @@ -652,15 +547,11 @@ "no_copy": 1, "oldfieldtype": "HTML", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "section_break_39", - "fieldtype": "Section Break", - "show_days": 1, - "show_seconds": 1 + "fieldtype": "Section Break" }, { "fieldname": "base_total_taxes_and_charges", @@ -670,15 +561,11 @@ "oldfieldtype": "Currency", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "column_break_42", - "fieldtype": "Column Break", - "show_days": 1, - "show_seconds": 1 + "fieldtype": "Column Break" }, { "fieldname": "total_taxes_and_charges", @@ -686,34 +573,26 @@ "label": "Total Taxes and Charges", "options": "currency", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "collapsible": 1, "collapsible_depends_on": "discount_amount", "fieldname": "section_break_44", "fieldtype": "Section Break", - "label": "Additional Discount and Coupon Code", - "show_days": 1, - "show_seconds": 1 + "label": "Additional Discount and Coupon Code" }, { "fieldname": "coupon_code", "fieldtype": "Link", "label": "Coupon Code", - "options": "Coupon Code", - "show_days": 1, - "show_seconds": 1 + "options": "Coupon Code" }, { "fieldname": "referral_sales_partner", "fieldtype": "Link", "label": "Referral Sales Partner", - "options": "Sales Partner", - "show_days": 1, - "show_seconds": 1 + "options": "Sales Partner" }, { "default": "Grand Total", @@ -721,9 +600,7 @@ "fieldtype": "Select", "label": "Apply Additional Discount On", "options": "\nGrand Total\nNet Total", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "base_discount_amount", @@ -731,41 +608,31 @@ "label": "Additional Discount Amount (Company Currency)", "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "column_break_46", - "fieldtype": "Column Break", - "show_days": 1, - "show_seconds": 1 + "fieldtype": "Column Break" }, { "fieldname": "additional_discount_percentage", "fieldtype": "Float", "label": "Additional Discount Percentage", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "discount_amount", "fieldtype": "Currency", "label": "Additional Discount Amount", "options": "currency", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "totals", "fieldtype": "Section Break", "oldfieldtype": "Section Break", "options": "fa fa-money", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "base_grand_total", @@ -776,8 +643,6 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1, - "show_days": 1, - "show_seconds": 1, "width": "200px" }, { @@ -787,9 +652,7 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "description": "In Words will be visible once you save the Quotation.", @@ -801,8 +664,6 @@ "oldfieldtype": "Data", "print_hide": 1, "read_only": 1, - "show_days": 1, - "show_seconds": 1, "width": "200px" }, { @@ -814,8 +675,6 @@ "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1, - "show_days": 1, - "show_seconds": 1, "width": "200px" }, { @@ -823,8 +682,6 @@ "fieldtype": "Column Break", "oldfieldtype": "Column Break", "print_hide": 1, - "show_days": 1, - "show_seconds": 1, "width": "50%" }, { @@ -836,8 +693,6 @@ "oldfieldtype": "Currency", "options": "currency", "read_only": 1, - "show_days": 1, - "show_seconds": 1, "width": "200px" }, { @@ -847,9 +702,7 @@ "no_copy": 1, "options": "currency", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "bold": 1, @@ -860,8 +713,6 @@ "oldfieldtype": "Currency", "options": "currency", "read_only": 1, - "show_days": 1, - "show_seconds": 1, "width": "200px" }, { @@ -873,25 +724,19 @@ "oldfieldtype": "Data", "print_hide": 1, "read_only": 1, - "show_days": 1, - "show_seconds": 1, "width": "200px" }, { "fieldname": "payment_schedule_section", "fieldtype": "Section Break", - "label": "Payment Terms", - "show_days": 1, - "show_seconds": 1 + "label": "Payment Terms" }, { "fieldname": "payment_terms_template", "fieldtype": "Link", "label": "Payment Terms Template", "options": "Payment Terms Template", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "payment_schedule", @@ -899,9 +744,7 @@ "label": "Payment Schedule", "no_copy": 1, "options": "Payment Schedule", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "collapsible": 1, @@ -910,9 +753,7 @@ "fieldtype": "Section Break", "label": "Terms and Conditions", "oldfieldtype": "Section Break", - "options": "fa fa-legal", - "show_days": 1, - "show_seconds": 1 + "options": "fa fa-legal" }, { "fieldname": "tc_name", @@ -922,26 +763,20 @@ "oldfieldtype": "Link", "options": "Terms and Conditions", "print_hide": 1, - "report_hide": 1, - "show_days": 1, - "show_seconds": 1 + "report_hide": 1 }, { "fieldname": "terms", "fieldtype": "Text Editor", "label": "Term Details", "oldfieldname": "terms", - "oldfieldtype": "Text Editor", - "show_days": 1, - "show_seconds": 1 + "oldfieldtype": "Text Editor" }, { "collapsible": 1, "fieldname": "print_settings", "fieldtype": "Section Break", - "label": "Print Settings", - "show_days": 1, - "show_seconds": 1 + "label": "Print Settings" }, { "allow_on_submit": 1, @@ -951,9 +786,7 @@ "oldfieldname": "letter_head", "oldfieldtype": "Select", "options": "Letter Head", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "allow_on_submit": 1, @@ -961,15 +794,11 @@ "fieldname": "group_same_items", "fieldtype": "Check", "label": "Group same items", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "column_break_73", - "fieldtype": "Column Break", - "show_days": 1, - "show_seconds": 1 + "fieldtype": "Column Break" }, { "allow_on_submit": 1, @@ -981,25 +810,19 @@ "oldfieldtype": "Link", "options": "Print Heading", "print_hide": 1, - "report_hide": 1, - "show_days": 1, - "show_seconds": 1 + "report_hide": 1 }, { "fieldname": "language", "fieldtype": "Data", "label": "Print Language", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "subscription_section", "fieldtype": "Section Break", - "label": "Auto Repeat Section", - "show_days": 1, - "show_seconds": 1 + "label": "Auto Repeat Section" }, { "fieldname": "auto_repeat", @@ -1008,18 +831,14 @@ "no_copy": 1, "options": "Auto Repeat", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "allow_on_submit": 1, "depends_on": "eval: doc.auto_repeat", "fieldname": "update_auto_repeat_reference", "fieldtype": "Button", - "label": "Update Auto Repeat Reference", - "show_days": 1, - "show_seconds": 1 + "label": "Update Auto Repeat Reference" }, { "collapsible": 1, @@ -1028,9 +847,7 @@ "label": "More Information", "oldfieldtype": "Section Break", "options": "fa fa-file-text", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "campaign", @@ -1039,9 +856,7 @@ "oldfieldname": "campaign", "oldfieldtype": "Link", "options": "Campaign", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "source", @@ -1050,9 +865,7 @@ "oldfieldname": "source", "oldfieldtype": "Select", "options": "Lead Source", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "allow_on_submit": 1, @@ -1063,17 +876,13 @@ "no_copy": 1, "oldfieldname": "order_lost_reason", "oldfieldtype": "Small Text", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "fieldname": "column_break4", "fieldtype": "Column Break", "oldfieldtype": "Column Break", "print_hide": 1, - "show_days": 1, - "show_seconds": 1, "width": "50%" }, { @@ -1088,9 +897,7 @@ "options": "Draft\nOpen\nReplied\nOrdered\nLost\nCancelled\nExpired", "print_hide": 1, "read_only": 1, - "reqd": 1, - "show_days": 1, - "show_seconds": 1 + "reqd": 1 }, { "fieldname": "enq_det", @@ -1100,17 +907,13 @@ "oldfieldname": "enq_det", "oldfieldtype": "Text", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "fieldname": "supplier_quotation", "fieldtype": "Link", "label": "Supplier Quotation", - "options": "Supplier Quotation", - "show_days": 1, - "show_seconds": 1 + "options": "Supplier Quotation" }, { "fieldname": "opportunity", @@ -1118,9 +921,7 @@ "label": "Opportunity", "options": "Opportunity", "print_hide": 1, - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "allow_on_submit": 1, @@ -1128,9 +929,7 @@ "fieldtype": "Table MultiSelect", "label": "Lost Reasons", "options": "Quotation Lost Reason Detail", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 + "read_only": 1 }, { "depends_on": "packed_items", @@ -1138,9 +937,7 @@ "fieldtype": "Table", "label": "Bundle Items", "options": "Packed Item", - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 + "print_hide": 1 }, { "collapsible": 1, @@ -1150,44 +947,26 @@ "fieldtype": "Section Break", "label": "Bundle Items", "options": "fa fa-suitcase", -<<<<<<< HEAD "print_hide": 1 }, - { - "allow_on_submit": 1, - "fieldname": "competitors", - "fieldtype": "Table MultiSelect", - "label": "Competitors", - "options": "Competitor Detail", - "read_only": 1 -======= - "print_hide": 1, - "show_days": 1, - "show_seconds": 1 - }, { "fieldname": "company_address", "fieldtype": "Link", "label": "Company Address Name", - "options": "Address", - "show_days": 1, - "show_seconds": 1 + "options": "Address" }, { "fieldname": "company_address_display", "fieldtype": "Small Text", "label": "Company Address", - "read_only": 1, - "show_days": 1, - "show_seconds": 1 ->>>>>>> 7cae669e81 (fix(India): Auto tax fetching based on GSTIN) + "read_only": 1 } ], "icon": "fa fa-shopping-cart", "idx": 82, "is_submittable": 1, "links": [], - "modified": "2022-03-23 16:49:36.297403", + "modified": "2022-04-02 17:21:48.578719", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", @@ -1282,6 +1061,7 @@ "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", + "states": [], "timeline_field": "party_name", "title_field": "title" } \ No newline at end of file From c58fde2fb262bf2fa15eea72cecc7616e3943ca6 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 2 Apr 2022 20:03:46 +0530 Subject: [PATCH 12/30] fix: Add competitor field back --- erpnext/selling/doctype/quotation/quotation.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index b069e62274..b597654221 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -112,7 +112,8 @@ "enq_det", "supplier_quotation", "opportunity", - "lost_reasons" + "lost_reasons", + "competitors" ], "fields": [ { @@ -949,6 +950,13 @@ "options": "fa fa-suitcase", "print_hide": 1 }, + { + "allow_on_submit": 1, + "fieldname": "competitors", + "fieldtype": "Table MultiSelect", + "label": "Competitors", + "options": "Competitor Detail" + }, { "fieldname": "company_address", "fieldtype": "Link", @@ -966,7 +974,7 @@ "idx": 82, "is_submittable": 1, "links": [], - "modified": "2022-04-02 17:21:48.578719", + "modified": "2022-04-03 17:21:48.578719", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", From a7e125a54083be62ba8f80dee0542360140888f8 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 2 Apr 2022 20:36:36 +0530 Subject: [PATCH 13/30] chore: format patch file --- .../create_gst_custom_fields_in_quotation.py | 60 +++++++++++++------ 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/erpnext/patches/v13_0/create_gst_custom_fields_in_quotation.py b/erpnext/patches/v13_0/create_gst_custom_fields_in_quotation.py index 840b8fd830..3217eab43d 100644 --- a/erpnext/patches/v13_0/create_gst_custom_fields_in_quotation.py +++ b/erpnext/patches/v13_0/create_gst_custom_fields_in_quotation.py @@ -3,27 +3,51 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_fields def execute(): - company = frappe.get_all('Company', filters = {'country': 'India'}, fields=['name']) + company = frappe.get_all("Company", filters={"country": "India"}, fields=["name"]) if not company: return sales_invoice_gst_fields = [ - dict(fieldname='billing_address_gstin', label='Billing Address GSTIN', - fieldtype='Data', insert_after='customer_address', read_only=1, - fetch_from='customer_address.gstin', print_hide=1, length=15), - dict(fieldname='customer_gstin', label='Customer GSTIN', - fieldtype='Data', insert_after='shipping_address_name', - fetch_from='shipping_address_name.gstin', print_hide=1, length=15), - dict(fieldname='place_of_supply', label='Place of Supply', - fieldtype='Data', insert_after='customer_gstin', - print_hide=1, read_only=1, length=50), - dict(fieldname='company_gstin', label='Company GSTIN', - fieldtype='Data', insert_after='company_address', - fetch_from='company_address.gstin', print_hide=1, read_only=1, length=15), - ] + dict( + fieldname="billing_address_gstin", + label="Billing Address GSTIN", + fieldtype="Data", + insert_after="customer_address", + read_only=1, + fetch_from="customer_address.gstin", + print_hide=1, + length=15, + ), + dict( + fieldname="customer_gstin", + label="Customer GSTIN", + fieldtype="Data", + insert_after="shipping_address_name", + fetch_from="shipping_address_name.gstin", + print_hide=1, + length=15, + ), + dict( + fieldname="place_of_supply", + label="Place of Supply", + fieldtype="Data", + insert_after="customer_gstin", + print_hide=1, + read_only=1, + length=50, + ), + dict( + fieldname="company_gstin", + label="Company GSTIN", + fieldtype="Data", + insert_after="company_address", + fetch_from="company_address.gstin", + print_hide=1, + read_only=1, + length=15, + ), + ] - custom_fields = { - 'Quotation': sales_invoice_gst_fields - } + custom_fields = {"Quotation": sales_invoice_gst_fields} - create_custom_fields(custom_fields, update=True) \ No newline at end of file + create_custom_fields(custom_fields, update=True) From 714fc08150678aebbd6272fc2c156552f36b1eb0 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 4 Apr 2022 20:05:10 +0530 Subject: [PATCH 14/30] fix: Do not apply shipping rule for POS transactions (cherry picked from commit c0ebcfb39331caa678d36cc4694490a2363f10a0) # Conflicts: # erpnext/public/js/controllers/taxes_and_totals.js --- erpnext/controllers/taxes_and_totals.py | 5 +++++ erpnext/public/js/controllers/taxes_and_totals.js | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 8183b6e2c9..42cd7de4c9 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -307,6 +307,11 @@ class calculate_taxes_and_totals(object): self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"]) def calculate_shipping_charges(self): + + # Do not apply shipping rule for POS + if self.doc.is_pos: + return + if hasattr(self.doc, "shipping_rule") and self.doc.shipping_rule: shipping_rule = frappe.get_doc("Shipping Rule", self.doc.shipping_rule) shipping_rule.apply(self.doc) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 047ec814b6..728835795c 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -272,7 +272,16 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { }); } +<<<<<<< HEAD calculate_shipping_charges() { +======= + calculate_shipping_charges: function() { + // Do not apply shipping rule for POS + if (this.frm.doc.is_pos) { + return; + } + +>>>>>>> c0ebcfb393 (fix: Do not apply shipping rule for POS transactions) frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]); if (frappe.meta.get_docfield(this.frm.doc.doctype, "shipping_rule", this.frm.doc.name)) { this.shipping_rule(); From 631545aa3287bde2db15ace490b242c3f3f02c41 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 6 Apr 2022 09:27:40 +0530 Subject: [PATCH 15/30] fix: Use get instead of dot (cherry picked from commit 95298f04000c0299f35cdee7bce0f5f0d8c59525) --- erpnext/controllers/taxes_and_totals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 42cd7de4c9..2144055b34 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -309,7 +309,7 @@ class calculate_taxes_and_totals(object): def calculate_shipping_charges(self): # Do not apply shipping rule for POS - if self.doc.is_pos: + if self.doc.get("is_pos"): return if hasattr(self.doc, "shipping_rule") and self.doc.shipping_rule: From bce1c2a0284dcdb498b01d1e726522f9b535cc9b Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Wed, 6 Apr 2022 14:44:10 +0530 Subject: [PATCH 16/30] fix: removed unused courses template --- erpnext/templates/pages/courses.html | 11 ----------- erpnext/templates/pages/courses.py | 18 ------------------ 2 files changed, 29 deletions(-) delete mode 100644 erpnext/templates/pages/courses.html delete mode 100644 erpnext/templates/pages/courses.py diff --git a/erpnext/templates/pages/courses.html b/erpnext/templates/pages/courses.html deleted file mode 100644 index 6592f7a2e5..0000000000 --- a/erpnext/templates/pages/courses.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "templates/web.html" %} - -{% block header %} -

About

-{% endblock %} - -{% block page_content %} - -

{{ intro }}

- -{% endblock %} diff --git a/erpnext/templates/pages/courses.py b/erpnext/templates/pages/courses.py deleted file mode 100644 index fb1af387d2..0000000000 --- a/erpnext/templates/pages/courses.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - - -import frappe - - -def get_context(context): - course = frappe.get_doc("Course", frappe.form_dict.course) - sidebar_title = course.name - - context.no_cache = 1 - context.show_sidebar = True - course = frappe.get_doc("Course", frappe.form_dict.course) - course.has_permission("read") - context.doc = course - context.sidebar_title = sidebar_title - context.intro = course.course_intro From 45fca6bed78ef162cf2969faf75086de94392180 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Thu, 7 Apr 2022 13:09:05 +0530 Subject: [PATCH 17/30] feat(india): e-invoicing for intra-state union territory transactions --- .../doctype/gst_account/gst_account.json | 10 +++++++++- erpnext/regional/india/e_invoice/utils.py | 16 ++++++++++++---- erpnext/regional/india/utils.py | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/gst_account/gst_account.json b/erpnext/accounts/doctype/gst_account/gst_account.json index b6ec8844e1..be5124c2d4 100644 --- a/erpnext/accounts/doctype/gst_account/gst_account.json +++ b/erpnext/accounts/doctype/gst_account/gst_account.json @@ -10,6 +10,7 @@ "sgst_account", "igst_account", "cess_account", + "utgst_account", "is_reverse_charge_account" ], "fields": [ @@ -64,12 +65,18 @@ "fieldtype": "Check", "in_list_view": 1, "label": "Is Reverse Charge Account" + }, + { + "fieldname": "utgst_account", + "fieldtype": "Link", + "label": "UTGST Account", + "options": "Account" } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2021-04-09 12:30:25.889993", + "modified": "2022-04-07 12:59:14.039768", "modified_by": "Administrator", "module": "Accounts", "name": "GST Account", @@ -78,5 +85,6 @@ "quick_entry": 1, "sort_field": "modified", "sort_order": "DESC", + "states": [], "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index 8fd9c1c43d..f317569312 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -314,10 +314,14 @@ def update_item_taxes(invoice, item): item.cess_rate += item_tax_rate item.cess_amount += abs(item_tax_amount_after_discount) - for tax_type in ["igst", "cgst", "sgst"]: + for tax_type in ["igst", "cgst", "sgst", "utgst"]: if t.account_head in gst_accounts[f"{tax_type}_account"]: item.tax_rate += item_tax_rate - item[f"{tax_type}_amount"] += abs(item_tax_amount) + if tax_type == "utgst": + # utgst taxes are reported same as sgst tax + item["sgst_amount"] += abs(item_tax_amount) + else: + item[f"{tax_type}_amount"] += abs(item_tax_amount) else: # TODO: other charges per item pass @@ -359,11 +363,15 @@ def update_invoice_taxes(invoice, invoice_value_details): # using after discount amt since item also uses after discount amt for cess calc invoice_value_details.total_cess_amt += abs(t.base_tax_amount_after_discount_amount) - for tax_type in ["igst", "cgst", "sgst"]: + for tax_type in ["igst", "cgst", "sgst", "utgst"]: if t.account_head in gst_accounts[f"{tax_type}_account"]: + if tax_type == "utgst": + invoice_value_details["total_sgst_amt"] += abs(tax_amount) + else: + invoice_value_details[f"total_{tax_type}_amt"] += abs(tax_amount) - invoice_value_details[f"total_{tax_type}_amt"] += abs(tax_amount) update_other_charges(t, invoice_value_details, gst_accounts_list, invoice, considered_rows) + else: invoice_value_details.total_other_charges += abs(tax_amount) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 48e17516a5..765e9eaccd 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -824,7 +824,7 @@ def get_gst_accounts( gst_settings_accounts = frappe.get_all( "GST Account", filters=filters, - fields=["cgst_account", "sgst_account", "igst_account", "cess_account"], + fields=["cgst_account", "sgst_account", "igst_account", "cess_account", "utgst_account"], ) if not gst_settings_accounts and not frappe.flags.in_test and not frappe.flags.in_migrate: From 49560d20bc98470f46e24a1566122df19eba1161 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 8 Apr 2022 11:23:02 +0530 Subject: [PATCH 18/30] fix: remove bad defaults from BOM operation (#30644) [skip ci] --- erpnext/manufacturing/doctype/bom_operation/bom_operation.json | 3 +-- erpnext/stock/doctype/item/item.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json index 341f9692c4..b965a435bf 100644 --- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json +++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json @@ -109,7 +109,6 @@ "read_only": 1 }, { - "default": "5", "depends_on": "eval:parent.doctype == 'BOM'", "fieldname": "base_operating_cost", "fieldtype": "Currency", @@ -187,7 +186,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2022-03-10 06:19:08.462027", + "modified": "2022-04-08 01:18:33.547481", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Operation", diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 524c3d1423..06da8ee9c3 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -645,7 +645,6 @@ }, { "collapsible": 1, - "default": "eval:!doc.is_fixed_asset", "fieldname": "sales_details", "fieldtype": "Section Break", "label": "Sales Details", @@ -992,4 +991,4 @@ "states": [], "title_field": "item_name", "track_changes": 1 -} \ No newline at end of file +} From a281998bcb0901fa928cfd68b9da26b1ab507449 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 8 Apr 2022 13:20:25 +0530 Subject: [PATCH 19/30] fix: prevent deleting repost queue for cancelled transactions --- .../repost_item_valuation.py | 16 ++++++++++++++++ erpnext/stock/stock_ledger.py | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index ec1d140447..54c00d1a21 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -61,6 +61,22 @@ class RepostItemValuation(Document): repost(self) + def before_cancel(self): + self.check_pending_repost_against_cancelled_transaction() + + def check_pending_repost_against_cancelled_transaction(self): + if self.status not in ("Queued", "In Progress"): + return + + if not (self.voucher_no and self.voucher_no): + return + + transaction_status = frappe.db.get_value(self.voucher_type, self.voucher_no, "docstatus") + if transaction_status == 2: + msg = _("Cannot cancel as processing of cancelled documents is pending.") + msg += "
" + _("Please try again in an hour.") + frappe.throw(msg, title=_("Pending processing")) + @frappe.whitelist() def restart_reposting(self): self.set_status("Queued", write=False) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 3e0ddab6d3..b7fd65bda8 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -178,9 +178,9 @@ def validate_cancellation(args): ) if repost_entry.status == "Queued": doc = frappe.get_doc("Repost Item Valuation", repost_entry.name) + doc.status = "Skipped" doc.flags.ignore_permissions = True doc.cancel() - doc.delete() def set_as_cancel(voucher_type, voucher_no): From d74181630a34306da4cc12e29434aada4d81f8ea Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 8 Apr 2022 13:32:20 +0530 Subject: [PATCH 20/30] test: prevent cancelling RIV of cancelled voucher --- .../test_repost_item_valuation.py | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/test_repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/test_repost_item_valuation.py index f3bebad5c0..55117ceb2e 100644 --- a/erpnext/stock/doctype/repost_item_valuation/test_repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/test_repost_item_valuation.py @@ -1,20 +1,25 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -import unittest import frappe +from frappe.tests.utils import FrappeTestCase from frappe.utils import nowdate from erpnext.controllers.stock_controller import create_item_wise_repost_entries +from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt from erpnext.stock.doctype.repost_item_valuation.repost_item_valuation import ( in_configured_timeslot, ) +from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry from erpnext.stock.utils import PendingRepostingError -class TestRepostItemValuation(unittest.TestCase): +class TestRepostItemValuation(FrappeTestCase): + def tearDown(self): + frappe.flags.dont_execute_stock_reposts = False + def test_repost_time_slot(self): repost_settings = frappe.get_doc("Stock Reposting Settings") @@ -162,3 +167,22 @@ class TestRepostItemValuation(unittest.TestCase): self.assertRaises(PendingRepostingError, stock_settings.save) riv.set_status("Skipped") + + def test_prevention_of_cancelled_transaction_riv(self): + frappe.flags.dont_execute_stock_reposts = True + + item = make_item() + warehouse = "_Test Warehouse - _TC" + old = make_stock_entry(item_code=item.name, to_warehouse=warehouse, qty=2, rate=5) + _new = make_stock_entry(item_code=item.name, to_warehouse=warehouse, qty=5, rate=10) + + old.cancel() + + riv = frappe.get_last_doc( + "Repost Item Valuation", {"voucher_type": old.doctype, "voucher_no": old.name} + ) + self.assertRaises(frappe.ValidationError, riv.cancel) + + riv.db_set("status", "Skipped") + riv.reload() + riv.cancel() # it should cancel now From fcbd25f27a9d2fe5661ab6d541f38c562439a986 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 8 Apr 2022 17:24:10 +0530 Subject: [PATCH 21/30] chore: formatting --- erpnext/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 932e190c9b..e0f0c98e9c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,8 @@ import inspect import frappe -__version__ = '14.0.0-dev' +__version__ = "14.0.0-dev" + def get_default_company(user=None): """Get default company for user""" From af6b07f9b95937047f6ece78db20009527805bbc Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 8 Apr 2022 18:05:04 +0530 Subject: [PATCH 22/30] fix: block cancellation of SL/GL entries (#30652) Individual GL/SLEs aren't supposed to be cancelled by users. --- erpnext/accounts/doctype/gl_entry/gl_entry.js | 2 +- erpnext/accounts/doctype/gl_entry/gl_entry.py | 5 +++++ .../stock/doctype/stock_ledger_entry/stock_ledger_entry.js | 2 +- .../stock/doctype/stock_ledger_entry/stock_ledger_entry.py | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.js b/erpnext/accounts/doctype/gl_entry/gl_entry.js index 491cf4d12b..4d2a513518 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.js +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.js @@ -3,6 +3,6 @@ frappe.ui.form.on('GL Entry', { refresh: function(frm) { - + frm.page.btn_secondary.hide() } }); diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index aee7f0e0f9..e5fa57df7f 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -269,6 +269,11 @@ class GLEntry(Document): if not self.fiscal_year: self.fiscal_year = get_fiscal_year(self.posting_date, company=self.company)[0] + def on_cancel(self): + msg = _("Individual GL Entry cannot be cancelled.") + msg += "
" + _("Please cancel related transaction.") + frappe.throw(msg) + def validate_balance_type(account, adv_adj=False): if not adv_adj and account: diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.js b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.js index 42cc7e6cba..23018aa615 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.js +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.js @@ -3,6 +3,6 @@ frappe.ui.form.on('Stock Ledger Entry', { refresh: function(frm) { - + frm.page.btn_secondary.hide() } }); diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 5c1da420e2..329cd7da09 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -209,6 +209,11 @@ class StockLedgerEntry(Document): msg += "
" + "
".join(authorized_users) frappe.throw(msg, BackDatedStockTransaction, title=_("Backdated Stock Entry")) + def on_cancel(self): + msg = _("Individual Stock Ledger Entry cannot be cancelled.") + msg += "
" + _("Please cancel related transaction.") + frappe.throw(msg) + def on_doctype_update(): if not frappe.db.has_index("tabStock Ledger Entry", "posting_sort_index"): From 51d77cd85e75401cd5a65d4e41137f5d539c8d26 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 9 Apr 2022 16:28:10 +0530 Subject: [PATCH 23/30] fix(pos): cannot change paid amount in pos payments (#30660) --- erpnext/selling/page/point_of_sale/pos_controller.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 6974bed4f1..65e0cbb7a5 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -721,11 +721,14 @@ erpnext.PointOfSale.Controller = class { async save_and_checkout() { if (this.frm.is_dirty()) { + let save_error = false; + await this.frm.save(null, null, null, () => save_error = true); // only move to payment section if save is successful - frappe.route_hooks.after_save = () => this.payment.checkout(); - return this.frm.save( - null, null, null, () => this.cart.toggle_checkout_btn(true) // show checkout button on error - ); + !save_error && this.payment.checkout(); + // show checkout button on error + save_error && setTimeout(() => { + this.cart.toggle_checkout_btn(true); + }, 300); // wait for save to finish } else { this.payment.checkout(); } From e30cc8422c1621070934e433fe3e13d407325081 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Sat, 9 Apr 2022 19:53:40 +0530 Subject: [PATCH 24/30] fix: Resolve conflicts --- erpnext/public/js/controllers/taxes_and_totals.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 728835795c..7a48fbdbd9 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -272,16 +272,12 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { }); } -<<<<<<< HEAD calculate_shipping_charges() { -======= - calculate_shipping_charges: function() { // Do not apply shipping rule for POS if (this.frm.doc.is_pos) { return; } ->>>>>>> c0ebcfb393 (fix: Do not apply shipping rule for POS transactions) frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]); if (frappe.meta.get_docfield(this.frm.doc.doctype, "shipping_rule", this.frm.doc.name)) { this.shipping_rule(); From a2937cffc7daa2a53f23e331b32b262745e9d6aa Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 9 Apr 2022 19:20:51 +0530 Subject: [PATCH 25/30] fix: Implicit ignore pricing rule check on returns (cherry picked from commit 1b25a7fe765d334fce990d43224f8a790ccf8119) --- erpnext/controllers/sales_and_purchase_return.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index bdde3a1fd8..bd4b59b385 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -330,7 +330,6 @@ def make_return_doc(doctype, source_name, target_doc=None): doc = frappe.get_doc(target) doc.is_return = 1 doc.return_against = source.name - doc.ignore_pricing_rule = 1 doc.set_warehouse = "" if doctype == "Sales Invoice" or doctype == "POS Invoice": doc.is_pos = source.is_pos From c14c51321483bc34fb25baf05f99538483274847 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 10 Apr 2022 15:06:38 +0530 Subject: [PATCH 26/30] ci: collate codecov reports before uploading Currently due to flake partial reports are submitting which results in constant fluctuation of coverage reports. Change: First collect coverage and if all builds pass then submit it. --- .github/workflows/server-tests-mariadb.yml | 15 ++++++++++++++- codecov.yml | 1 - 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/server-tests-mariadb.yml b/.github/workflows/server-tests-mariadb.yml index 69be7656a6..8cc582634a 100644 --- a/.github/workflows/server-tests-mariadb.yml +++ b/.github/workflows/server-tests-mariadb.yml @@ -118,10 +118,23 @@ jobs: CI_BUILD_ID: ${{ github.run_id }} ORCHESTRATOR_URL: http://test-orchestrator.frappe.io + - name: Upload coverage data + uses: actions/upload-artifact@v3 + with: + name: coverage-${{ matrix.container }} + path: /home/runner/frappe-bench/sites/coverage.xml + + coverage: + name: Coverage Wrap Up + needs: test + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + - name: Upload coverage data uses: codecov/codecov-action@v2 with: name: MariaDB fail_ci_if_error: true - files: /home/runner/frappe-bench/sites/coverage.xml verbose: true diff --git a/codecov.yml b/codecov.yml index 1fa602ab30..7d9c37d919 100644 --- a/codecov.yml +++ b/codecov.yml @@ -21,7 +21,6 @@ coverage: comment: layout: "diff, files" require_changes: true - after_n_builds: 3 ignore: - "erpnext/demo" From 8138e53cf32e6024e1346146d215a09239bd74e1 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 10 Apr 2022 16:58:44 +0530 Subject: [PATCH 27/30] test: flaky picklist tests --- .../stock/doctype/pick_list/test_pick_list.py | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index ec5011b93d..27b06d2dd9 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -8,7 +8,7 @@ test_dependencies = ["Item", "Sales Invoice", "Stock Entry", "Batch"] from frappe.tests.utils import FrappeTestCase -from erpnext.stock.doctype.item.test_item import create_item +from erpnext.stock.doctype.item.test_item import create_item, make_item from erpnext.stock.doctype.pick_list.pick_list import create_delivery_note from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import ( @@ -18,6 +18,7 @@ from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import ( class TestPickList(FrappeTestCase): def test_pick_list_picks_warehouse_for_each_item(self): + item_code = make_item().name try: frappe.get_doc( { @@ -27,7 +28,7 @@ class TestPickList(FrappeTestCase): "expense_account": "Temporary Opening - _TC", "items": [ { - "item_code": "_Test Item", + "item_code": item_code, "warehouse": "_Test Warehouse - _TC", "valuation_rate": 100, "qty": 5, @@ -47,7 +48,7 @@ class TestPickList(FrappeTestCase): "purpose": "Delivery", "locations": [ { - "item_code": "_Test Item", + "item_code": item_code, "qty": 5, "stock_qty": 5, "conversion_factor": 1, @@ -59,7 +60,7 @@ class TestPickList(FrappeTestCase): ) pick_list.set_item_locations() - self.assertEqual(pick_list.locations[0].item_code, "_Test Item") + self.assertEqual(pick_list.locations[0].item_code, item_code) self.assertEqual(pick_list.locations[0].warehouse, "_Test Warehouse - _TC") self.assertEqual(pick_list.locations[0].qty, 5) @@ -270,6 +271,8 @@ class TestPickList(FrappeTestCase): pr2.cancel() def test_pick_list_for_items_from_multiple_sales_orders(self): + + item_code = make_item().name try: frappe.get_doc( { @@ -279,7 +282,7 @@ class TestPickList(FrappeTestCase): "expense_account": "Temporary Opening - _TC", "items": [ { - "item_code": "_Test Item", + "item_code": item_code, "warehouse": "_Test Warehouse - _TC", "valuation_rate": 100, "qty": 10, @@ -295,7 +298,14 @@ class TestPickList(FrappeTestCase): "doctype": "Sales Order", "customer": "_Test Customer", "company": "_Test Company", - "items": [{"item_code": "_Test Item", "qty": 10, "delivery_date": frappe.utils.today()}], + "items": [ + { + "item_code": item_code, + "qty": 10, + "delivery_date": frappe.utils.today(), + "warehouse": "_Test Warehouse - _TC", + } + ], } ) sales_order.submit() @@ -309,7 +319,7 @@ class TestPickList(FrappeTestCase): "purpose": "Delivery", "locations": [ { - "item_code": "_Test Item", + "item_code": item_code, "qty": 5, "stock_qty": 5, "conversion_factor": 1, @@ -317,7 +327,7 @@ class TestPickList(FrappeTestCase): "sales_order_item": "_T-Sales Order-1_item", }, { - "item_code": "_Test Item", + "item_code": item_code, "qty": 5, "stock_qty": 5, "conversion_factor": 1, @@ -329,18 +339,19 @@ class TestPickList(FrappeTestCase): ) pick_list.set_item_locations() - self.assertEqual(pick_list.locations[0].item_code, "_Test Item") + self.assertEqual(pick_list.locations[0].item_code, item_code) self.assertEqual(pick_list.locations[0].warehouse, "_Test Warehouse - _TC") self.assertEqual(pick_list.locations[0].qty, 5) self.assertEqual(pick_list.locations[0].sales_order_item, "_T-Sales Order-1_item") - self.assertEqual(pick_list.locations[1].item_code, "_Test Item") + self.assertEqual(pick_list.locations[1].item_code, item_code) self.assertEqual(pick_list.locations[1].warehouse, "_Test Warehouse - _TC") self.assertEqual(pick_list.locations[1].qty, 5) self.assertEqual(pick_list.locations[1].sales_order_item, sales_order.items[0].name) def test_pick_list_for_items_with_multiple_UOM(self): - purchase_receipt = make_purchase_receipt(item_code="_Test Item", qty=10) + item_code = make_item().name + purchase_receipt = make_purchase_receipt(item_code=item_code, qty=10) purchase_receipt.submit() sales_order = frappe.get_doc( @@ -350,17 +361,19 @@ class TestPickList(FrappeTestCase): "company": "_Test Company", "items": [ { - "item_code": "_Test Item", + "item_code": item_code, "qty": 1, "conversion_factor": 5, "stock_qty": 5, "delivery_date": frappe.utils.today(), + "warehouse": "_Test Warehouse - _TC", }, { - "item_code": "_Test Item", + "item_code": item_code, "qty": 1, "conversion_factor": 1, "delivery_date": frappe.utils.today(), + "warehouse": "_Test Warehouse - _TC", }, ], } @@ -376,7 +389,7 @@ class TestPickList(FrappeTestCase): "purpose": "Delivery", "locations": [ { - "item_code": "_Test Item", + "item_code": item_code, "qty": 2, "stock_qty": 1, "conversion_factor": 0.5, @@ -384,7 +397,7 @@ class TestPickList(FrappeTestCase): "sales_order_item": sales_order.items[0].name, }, { - "item_code": "_Test Item", + "item_code": item_code, "qty": 1, "stock_qty": 1, "conversion_factor": 1, From 03c631d7238a0e058235a3e4057d88451cd97ee6 Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Mon, 11 Apr 2022 07:19:18 +0200 Subject: [PATCH 28/30] fix: update translation (#30654) --- erpnext/translations/fr.csv | 67 +++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/erpnext/translations/fr.csv b/erpnext/translations/fr.csv index db454def73..3295136047 100644 --- a/erpnext/translations/fr.csv +++ b/erpnext/translations/fr.csv @@ -951,14 +951,14 @@ End time cannot be before start time,L'heure de fin ne peut pas être avant l'he Ends On date cannot be before Next Contact Date.,La date de fin ne peut pas être avant la prochaine date de contact, Energy,Énergie, Engineer,Ingénieur, -Enough Parts to Build,Pièces Suffisantes pour Construire, +Enough Parts to Build,Pièces Suffisantes pour Construire Enroll,Inscrire, Enrolling student,Inscrire un étudiant, Enrolling students,Inscription des étudiants, Enter depreciation details,Veuillez entrer les détails de l'amortissement, -Enter the Bank Guarantee Number before submittting.,Entrez le numéro de garantie bancaire avant de soumettre., -Enter the name of the Beneficiary before submittting.,Entrez le nom du bénéficiaire avant de soumettre., -Enter the name of the bank or lending institution before submittting.,Entrez le nom de la banque ou de l'institution de prêt avant de soumettre., +Enter the Bank Guarantee Number before submittting.,Entrez le numéro de garantie bancaire avant de valider. +Enter the name of the Beneficiary before submittting.,Entrez le nom du bénéficiaire avant de valider. +Enter the name of the bank or lending institution before submittting.,Entrez le nom de la banque ou de l'institution de prêt avant de valider., Enter value betweeen {0} and {1},Entrez une valeur entre {0} et {1}, Entertainment & Leisure,Divertissement et Loisir, Entertainment Expenses,Charges de Représentation, @@ -1068,7 +1068,7 @@ For Employee,Employé, For Quantity (Manufactured Qty) is mandatory,Pour Quantité (Qté Produite) est obligatoire, For Supplier,Pour Fournisseur, For Warehouse,Pour l’Entrepôt, -For Warehouse is required before Submit,Pour l’Entrepôt est requis avant de Soumettre, +For Warehouse is required before Submit,Pour l’Entrepôt est requis avant de Valider, "For an item {0}, quantity must be negative number","Pour l'article {0}, la quantité doit être un nombre négatif", "For an item {0}, quantity must be positive number","Pour un article {0}, la quantité doit être un nombre positif", "For job card {0}, you can only make the 'Material Transfer for Manufacture' type stock entry","Pour la carte de travail {0}, vous pouvez uniquement saisir une entrée de stock de type "Transfert d'article pour fabrication".", @@ -1693,7 +1693,7 @@ No Items with Bill of Materials to Manufacture,Aucun Article avec une Liste de M No Items with Bill of Materials.,Aucun article avec nomenclature., No Permission,Aucune autorisation, No Remarks,Aucune Remarque, -No Result to submit,Aucun résultat à soumettre, +No Result to submit,Aucun résultat à valider, No Salary Structure assigned for Employee {0} on given date {1},Aucune structure de salaire attribuée à l'employé {0} à la date donnée {1}, No Staffing Plans found for this Designation,Aucun plan de dotation trouvé pour cette désignation, No Student Groups created.,Aucun Groupe d'Étudiants créé., @@ -2847,12 +2847,12 @@ Sub Type,Sous type, Sub-contracting,Sous-traitant, Subcontract,Sous-traiter, Subject,Sujet, -Submit,Soumettre, -Submit Proof,Soumettre une preuve, -Submit Salary Slip,Soumettre la Fiche de Paie, -Submit this Work Order for further processing.,Soumettre cet ordre de travail pour continuer son traitement., -Submit this to create the Employee record,Soumettre pour créer la fiche employé, -Submitting Salary Slips...,Soumission des bulletins de salaire ..., +Submit,Valider, +Submit Proof,Valider une preuve, +Submit Salary Slip,Valider la Fiche de Paie, +Submit this Work Order for further processing.,Valider cet ordre de travail pour continuer son traitement., +Submit this to create the Employee record,Valider pour créer la fiche employé, +Submitting Salary Slips...,Validation des bulletins de salaire ..., Subscription,Abonnement, Subscription Management,Gestion des abonnements, Subscriptions,Abonnements, @@ -2954,7 +2954,7 @@ The Term End Date cannot be earlier than the Term Start Date. Please correct the The Term End Date cannot be later than the Year End Date of the Academic Year to which the term is linked (Academic Year {}). Please correct the dates and try again.,La Date de Fin de Terme ne peut pas être postérieure à la Date de Fin de l'Année Académique à laquelle le terme est lié (Année Académique {}). Veuillez corriger les dates et essayer à nouveau., The Term Start Date cannot be earlier than the Year Start Date of the Academic Year to which the term is linked (Academic Year {}). Please correct the dates and try again.,La Date de Début de Terme ne peut pas être antérieure à la Date de Début de l'Année Académique à laquelle le terme est lié (Année Académique {}). Veuillez corriger les dates et essayer à nouveau., The Year End Date cannot be earlier than the Year Start Date. Please correct the dates and try again.,La Date de Fin d'Année ne peut pas être antérieure à la Date de Début d’Année. Veuillez corriger les dates et essayer à nouveau., -The amount of {0} set in this payment request is different from the calculated amount of all payment plans: {1}. Make sure this is correct before submitting the document.,Le montant {0} défini dans cette requête de paiement est différent du montant calculé de tous les plans de paiement: {1}.\nVeuillez vérifier que c'est correct avant de soumettre le document., +The amount of {0} set in this payment request is different from the calculated amount of all payment plans: {1}. Make sure this is correct before submitting the document.,Le montant {0} défini dans cette requête de paiement est différent du montant calculé de tous les plans de paiement: {1}.\nVeuillez vérifier que c'est correct avant de valider le document., The day(s) on which you are applying for leave are holidays. You need not apply for leave.,Le(s) jour(s) pour le(s)quel(s) vous demandez un congé sont des jour(s) férié(s). Vous n’avez pas besoin d’effectuer de demande., The field From Shareholder cannot be blank,Le champ 'De l'actionnaire' ne peut pas être vide, The field To Shareholder cannot be blank,Le champ 'A l'actionnaire' ne peut pas être vide, @@ -3011,7 +3011,7 @@ This is based on transactions against this Healthcare Practitioner.,Ce graphique This is based on transactions against this Patient. See timeline below for details,Ceci est basé sur les transactions de ce patient. Voir la chronologie ci-dessous pour plus de détails, This is based on transactions against this Sales Person. See timeline below for details,Ceci est basé sur les transactions contre ce vendeur. Voir la chronologie ci-dessous pour plus de détails, This is based on transactions against this Supplier. See timeline below for details,Basé sur les transactions avec ce fournisseur. Voir la chronologie ci-dessous pour plus de détails, -This will submit Salary Slips and create accrual Journal Entry. Do you want to proceed?,Cela permettra de soumettre des bulletins de salaire et de créer une écriture de journal d'accumulation. Voulez-vous poursuivre?, +This will submit Salary Slips and create accrual Journal Entry. Do you want to proceed?,Cela permettra de valider des bulletins de salaire et de créer une écriture de journal d'accumulation. Voulez-vous poursuivre?, This {0} conflicts with {1} for {2} {3},Ce {0} est en conflit avec {1} pour {2} {3}, Time Sheet for manufacturing.,Feuille de Temps pour la production., Time Tracking,Suivi du temps, @@ -3312,7 +3312,7 @@ Work Order {0} must be cancelled before cancelling this Sales Order,L'ordre de t Work Order {0} must be submitted,L'ordre de travail {0} doit être soumis, Work Orders Created: {0},Ordres de travail créés: {0}, Work Summary for {0},Résumé de travail de {0}, -Work-in-Progress Warehouse is required before Submit,L'entrepôt des Travaux en Cours est nécessaire avant de Soumettre, +Work-in-Progress Warehouse is required before Submit,L'entrepôt des Travaux en Cours est nécessaire avant de Valider, Workflow,Flux de Travail, Working,Travail en cours, Working Hours,Heures de travail, @@ -3331,7 +3331,7 @@ You can only have Plans with the same billing cycle in a Subscription,Vous ne po You can only redeem max {0} points in this order.,Vous pouvez uniquement échanger un maximum de {0} points dans cet commande., You can only renew if your membership expires within 30 days,Vous ne pouvez renouveler que si votre abonnement expire dans les 30 jours, You can only select a maximum of one option from the list of check boxes.,Vous pouvez sélectionner au maximum une option dans la liste des cases à cocher., -You can only submit Leave Encashment for a valid encashment amount,Vous pouvez uniquement soumettre un encaissement de congé pour un montant d'encaissement valide, +You can only submit Leave Encashment for a valid encashment amount,Vous pouvez uniquement valider un encaissement de congé pour un montant d'encaissement valide, You can't redeem Loyalty Points having more value than the Grand Total.,Vous ne pouvez pas échanger des points de fidélité ayant plus de valeur que le total général., You cannot credit and debit same account at the same time,Vous ne pouvez pas créditer et débiter le même compte simultanément, You cannot delete Fiscal Year {0}. Fiscal Year {0} is set as default in Global Settings,Vous ne pouvez pas supprimer l'exercice fiscal {0}. L'exercice fiscal {0} est défini par défaut dans les Paramètres Globaux, @@ -3684,8 +3684,8 @@ Create Quality Inspection for Item {0},Créer un contrôle qualité pour l'artic Creating Accounts...,Création de comptes ..., Creating bank entries...,Création d'entrées bancaires ..., Credit limit is already defined for the Company {0},La limite de crédit est déjà définie pour la société {0}., -Ctrl + Enter to submit,Ctrl + Entrée pour soumettre, -Ctrl+Enter to submit,Ctrl + Entrée pour soumettre, +Ctrl + Enter to submit,Ctrl + Entrée pour valider, +Ctrl+Enter to submit,Ctrl + Entrée pour valider, Currency,Devise, Current Status,Statut Actuel, Customer PO,Bon de commande client, @@ -3709,7 +3709,7 @@ Dimension Filter,Filtre de dimension, Disabled,Desactivé, Disbursement and Repayment,Décaissement et remboursement, Distance cannot be greater than 4000 kms,La distance ne peut pas dépasser 4000 km, -Do you want to submit the material request,Voulez-vous soumettre la demande de matériel, +Do you want to submit the material request,Voulez-vous valider la demande de matériel, Doctype,Doctype, Document {0} successfully uncleared,Document {0} non effacé avec succès, Download Template,Télécharger le Modèle, @@ -4309,7 +4309,7 @@ Requested,Demandé, Partially Paid,Partiellement payé, Invalid Account Currency,Devise de compte non valide, "Row {0}: The item {1}, quantity must be positive number","Ligne {0}: l'article {1}, la quantité doit être un nombre positif", -"Please set {0} for Batched Item {1}, which is used to set {2} on Submit.","Veuillez définir {0} pour l'article par lots {1}, qui est utilisé pour définir {2} sur Soumettre.", +"Please set {0} for Batched Item {1}, which is used to set {2} on Submit.","Veuillez définir {0} pour l'article par lots {1}, qui est utilisé pour définir {2} sur Valider.", Expiry Date Mandatory,Date d'expiration obligatoire, Variant Item,Élément de variante, BOM 1 {0} and BOM 2 {1} should not be same,La nomenclature 1 {0} et la nomenclature 2 {1} ne doivent pas être identiques, @@ -4589,7 +4589,7 @@ Bank Transaction Entries,Ecritures de transactions bancaires, New Transactions,Nouvelles transactions, Match Transaction to Invoices,Faire correspondre la transaction aux factures, Create New Payment/Journal Entry,Créer un nouveau paiement / écriture de journal, -Submit/Reconcile Payments,Soumettre / rapprocher les paiements, +Submit/Reconcile Payments,Valider / rapprocher les paiements, Matching Invoices,Factures correspondantes, Payment Invoice Items,Articles de la facture de paiement, Reconciled Transactions,Transactions rapprochées, @@ -6208,7 +6208,7 @@ Collect Fee for Patient Registration,Collecter les honoraires pour l'inscription Checking this will create new Patients with a Disabled status by default and will only be enabled after invoicing the Registration Fee.,Cochez cette case pour créer de nouveaux patients avec un statut Désactivé par défaut et ne seront activés qu'après facturation des frais d'inscription., Registration Fee,Frais d'Inscription, Automate Appointment Invoicing,Automatiser la facturation des rendez-vous, -Manage Appointment Invoice submit and cancel automatically for Patient Encounter,Gérer les factures de rendez-vous soumettre et annuler automatiquement pour la consultation des patients, +Manage Appointment Invoice submit and cancel automatically for Patient Encounter,Gérer les factures de rendez-vous valider et annuler automatiquement pour la consultation des patients, Enable Free Follow-ups,Activer les suivis gratuits, Number of Patient Encounters in Valid Days,Nombre de rencontres de patients en jours valides, The number of free follow ups (Patient Encounters in valid days) allowed,Le nombre de suivis gratuits (rencontres de patients en jours valides) autorisés, @@ -8679,7 +8679,7 @@ Book Deferred Entries Based On,Enregistrer les entrées différées en fonction Days,Journées, Months,Mois, Book Deferred Entries Via Journal Entry,Enregistrer les écritures différées via l'écriture au journal, -Submit Journal Entries,Soumettre les entrées de journal, +Submit Journal Entries,Valider les entrées de journal, If this is unchecked Journal Entries will be saved in a Draft state and will have to be submitted manually,"Si cette case n'est pas cochée, les entrées de journal seront enregistrées dans un état Brouillon et devront être soumises manuellement", Enable Distributed Cost Center,Activer le centre de coûts distribués, Distributed Cost Center,Centre de coûts distribués, @@ -9065,7 +9065,7 @@ Rented To Date,Loué à ce jour, Monthly Eligible Amount,Montant mensuel admissible, Total Eligible HRA Exemption,Exemption HRA totale éligible, Validating Employee Attendance...,Validation de la présence des employés ..., -Submitting Salary Slips and creating Journal Entry...,Soumettre des fiches de salaire et créer une écriture au journal ..., +Submitting Salary Slips and creating Journal Entry...,Validation des fiches de salaire et créer une écriture au journal ..., Calculate Payroll Working Days Based On,Calculer les jours ouvrables de paie en fonction de, Consider Unmarked Attendance As,Considérez la participation non marquée comme, Fraction of Daily Salary for Half Day,Fraction du salaire journalier pour une demi-journée, @@ -9166,8 +9166,8 @@ Enter customer's phone number,Entrez le numéro de téléphone du client, Customer contact updated successfully.,Contact client mis à jour avec succès., Item will be removed since no serial / batch no selected.,L'article sera supprimé car aucun numéro de série / lot sélectionné., Discount (%),Remise (%), -You cannot submit the order without payment.,Vous ne pouvez pas soumettre la commande sans paiement., -You cannot submit empty order.,Vous ne pouvez pas soumettre de commande vide., +You cannot submit the order without payment.,Vous ne pouvez pas valider la commande sans paiement., +You cannot submit empty order.,Vous ne pouvez pas valider de commande vide., To Be Paid,Être payé, Create POS Opening Entry,Créer une entrée d'ouverture de PDV, Please add Mode of payments and opening balance details.,Veuillez ajouter le mode de paiement et les détails du solde d'ouverture., @@ -9305,7 +9305,7 @@ Courses updated,Cours mis à jour, {0} {1} has been added to all the selected topics successfully.,{0} {1} a bien été ajouté à tous les sujets sélectionnés., Topics updated,Sujets mis à jour, Academic Term and Program,Terme académique et programme, -Please remove this item and try to submit again or update the posting time.,Veuillez supprimer cet élément et réessayer de le soumettre ou mettre à jour l'heure de publication., +Please remove this item and try to submit again or update the posting time.,Veuillez supprimer cet élément et réessayer de le valider ou mettre à jour l'heure de publication., Failed to Authenticate the API key.,Échec de l'authentification de la clé API., Invalid Credentials,Les informations d'identification invalides, URL can only be a string,L'URL ne peut être qu'une chaîne, @@ -9416,7 +9416,7 @@ Import Italian Supplier Invoice.,Importer la facture du fournisseur italien., "Valuation Rate for the Item {0}, is required to do accounting entries for {1} {2}.",Le taux de valorisation de l'article {0} est requis pour effectuer des écritures comptables pour {1} {2}., Here are the options to proceed:,Voici les options pour continuer:, "If the item is transacting as a Zero Valuation Rate item in this entry, please enable 'Allow Zero Valuation Rate' in the {0} Item table.","Si l'article est traité comme un article à taux de valorisation nul dans cette entrée, veuillez activer "Autoriser le taux de valorisation nul" dans le {0} tableau des articles.", -"If not, you can Cancel / Submit this entry ","Sinon, vous pouvez annuler / soumettre cette entrée", +"If not, you can Cancel / Submit this entry ","Sinon, vous pouvez annuler / valider cette entrée", performing either one below:,effectuer l'un ou l'autre ci-dessous:, Create an incoming stock transaction for the Item.,Créez une transaction de stock entrante pour l'article., Mention Valuation Rate in the Item master.,Mentionnez le taux de valorisation dans la fiche article., @@ -9573,7 +9573,7 @@ Accounting entries are frozen up to this date. Nobody can create or modify entri Role Allowed to Set Frozen Accounts and Edit Frozen Entries,Rôle autorisé à définir des comptes gelés et à modifier les entrées gelées, Address used to determine Tax Category in transactions,Adresse utilisée pour déterminer la catégorie de taxe dans les transactions, "The percentage you are allowed to bill more against the amount ordered. For example, if the order value is $100 for an item and tolerance is set as 10%, then you are allowed to bill up to $110 ","Le pourcentage que vous êtes autorisé à facturer davantage par rapport au montant commandé. Par exemple, si la valeur de la commande est de 100 USD pour un article et que la tolérance est définie sur 10%, vous êtes autorisé à facturer jusqu'à 110 USD.", -This role is allowed to submit transactions that exceed credit limits,Ce rôle est autorisé à soumettre des transactions qui dépassent les limites de crédit, +This role is allowed to submit transactions that exceed credit limits,Ce rôle est autorisé à valider des transactions qui dépassent les limites de crédit, "If ""Months"" is selected, a fixed amount will be booked as deferred revenue or expense for each month irrespective of the number of days in a month. It will be prorated if deferred revenue or expense is not booked for an entire month","Si «Mois» est sélectionné, un montant fixe sera comptabilisé en tant que revenus ou dépenses différés pour chaque mois, quel que soit le nombre de jours dans un mois. Il sera calculé au prorata si les revenus ou les dépenses différés ne sont pas comptabilisés pour un mois entier", "If this is unchecked, direct GL entries will be created to book deferred revenue or expense","Si cette case n'est pas cochée, des entrées GL directes seront créées pour enregistrer les revenus ou les dépenses différés", Show Inclusive Tax in Print,Afficher la taxe incluse en version imprimée, @@ -9744,7 +9744,7 @@ Print Receipt,Imprimer le reçu, Edit Receipt,Modifier le reçu, Focus on search input,Focus sur l'entrée de recherche, Focus on Item Group filter,Focus sur le filtre de groupe d'articles, -Checkout Order / Submit Order / New Order,Commander la commande / Soumettre la commande / Nouvelle commande, +Checkout Order / Submit Order / New Order,Commander la commande / Valider la commande / Nouvelle commande, Add Order Discount,Ajouter une remise de commande, Item Code: {0} is not available under warehouse {1}.,Code d'article: {0} n'est pas disponible dans l'entrepôt {1}., Serial numbers unavailable for Item {0} under warehouse {1}. Please try changing warehouse.,Numéros de série non disponibles pour l'article {0} sous l'entrepôt {1}. Veuillez essayer de changer d’entrepôt., @@ -9787,11 +9787,11 @@ because expense is booked against this account in Purchase Receipt {},car les d as no Purchase Receipt is created against Item {}. ,car aucun reçu d'achat n'est créé pour l'article {}., This is done to handle accounting for cases when Purchase Receipt is created after Purchase Invoice,Ceci est fait pour gérer la comptabilité des cas où le reçu d'achat est créé après la facture d'achat, Purchase Order Required for item {},Bon de commande requis pour l'article {}, -To submit the invoice without purchase order please set {} ,"Pour soumettre la facture sans bon de commande, veuillez définir {}", +To submit the invoice without purchase order please set {} ,"Pour valider la facture sans bon de commande, veuillez définir {}", as {} in {},un péché {}, Mandatory Purchase Order,Bon de commande obligatoire, Purchase Receipt Required for item {},Reçu d'achat requis pour l'article {}, -To submit the invoice without purchase receipt please set {} ,"Pour soumettre la facture sans reçu d'achat, veuillez définir {}", +To submit the invoice without purchase receipt please set {} ,"Pour valider la facture sans reçu d'achat, veuillez définir {}", Mandatory Purchase Receipt,Reçu d'achat obligatoire, POS Profile {} does not belongs to company {},Le profil PDV {} n'appartient pas à l'entreprise {}, User {} is disabled. Please select valid user/cashier,L'utilisateur {} est désactivé. Veuillez sélectionner un utilisateur / caissier valide, @@ -9864,9 +9864,10 @@ Control Historical Stock Transactions,Controle de l'historique des stransact No stock transactions can be created or modified before this date.,Aucune transaction ne peux être créée ou modifié avant cette date. Stock transactions that are older than the mentioned days cannot be modified.,Les transactions de stock plus ancienne que le nombre de jours ci-dessus ne peuvent être modifiées Role Allowed to Create/Edit Back-dated Transactions,Rôle autorisé à créer et modifier des transactions anti-datée -"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.","LEs utilisateur de ce role pourront creer et modifier des transactions dans le passé. Si vide tout les utilisateurs pourrons le faire" +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.","Les utilisateur de ce role pourront creer et modifier des transactions dans le passé. Si vide tout les utilisateurs pourrons le faire" Auto Insert Item Price If Missing,Création du prix de l'article dans les listes de prix si abscent Update Existing Price List Rate,Mise a jour automatique du prix dans les listes de prix Show Barcode Field in Stock Transactions,Afficher le champ Code Barre dans les transactions de stock Convert Item Description to Clean HTML in Transactions,Convertir les descriptions d'articles en HTML valide lors des transactions Have Default Naming Series for Batch ID?,Nom de série par défaut pour les Lots ou Séries +"The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units","Le pourcentage de quantité que vous pourrez réceptionner en plus de la quantité commandée. Par exemple, vous avez commandé 100 unités, votre pourcentage de dépassement est de 10%, vous pourrez réceptionner 110 unités" From 086d31b59f2a960b463c88ea1c32fac71958b142 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sat, 26 Mar 2022 13:06:20 +0530 Subject: [PATCH 29/30] fix: dont validate currency exchange in setup Redues ~4-5 seconds of time and chances of setup failure. --- .../currency_exchange_settings.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py index edea37dcfd..d618c5ca11 100644 --- a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py +++ b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py @@ -11,6 +11,8 @@ from frappe.utils import nowdate class CurrencyExchangeSettings(Document): def validate(self): self.set_parameters_and_result() + if frappe.flags.in_test or frappe.flags.in_install or frappe.flags.in_setup_wizard: + return response, value = self.validate_parameters() self.validate_result(response, value) @@ -35,9 +37,6 @@ class CurrencyExchangeSettings(Document): self.append("req_params", {"key": "symbols", "value": "{to_currency}"}) def validate_parameters(self): - if frappe.flags.in_test: - return None, None - params = {} for row in self.req_params: params[row.key] = row.value.format( @@ -59,9 +58,6 @@ class CurrencyExchangeSettings(Document): return response, value def validate_result(self, response, value): - if frappe.flags.in_test: - return - try: for key in self.result_key: value = value[ From c3e1f0e3692e87e8f2c9385f4a24271dfab47138 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 27 Mar 2022 11:52:31 +0530 Subject: [PATCH 30/30] refactor: ignore mandatory fields during setup --- .../doctype/selling_settings/test_selling_settings.py | 9 +++++++-- erpnext/setup/install.py | 9 ++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/erpnext/selling/doctype/selling_settings/test_selling_settings.py b/erpnext/selling/doctype/selling_settings/test_selling_settings.py index fc6754a7c5..7290e685b2 100644 --- a/erpnext/selling/doctype/selling_settings/test_selling_settings.py +++ b/erpnext/selling/doctype/selling_settings/test_selling_settings.py @@ -1,9 +1,14 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -# import frappe import unittest +import frappe + class TestSellingSettings(unittest.TestCase): - pass + def test_defaults_populated(self): + # Setup default values are not populated on migrate, this test checks + # if setup was completed correctly + default = frappe.db.get_single_value("Selling Settings", "maintain_same_rate_action") + self.assertEqual("Stop", default) diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 2b055d2dd3..8dae23db77 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -56,12 +56,11 @@ def set_single_defaults(): ) if default_values: try: - b = frappe.get_doc(dt, dt) + doc = frappe.get_doc(dt, dt) for fieldname, value in default_values: - b.set(fieldname, value) - b.save() - except frappe.MandatoryError: - pass + doc.set(fieldname, value) + doc.flags.ignore_mandatory = True + doc.save() except frappe.ValidationError: pass