From eb119dcb4da1b280ae946463e58da4c69e793df1 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Sat, 20 Apr 2024 01:24:35 +0200 Subject: [PATCH] fix: language in sales transactions --- erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 8 +++++--- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- erpnext/selling/doctype/quotation/quotation.json | 5 +++-- erpnext/selling/doctype/quotation/quotation.py | 2 +- erpnext/selling/doctype/sales_order/sales_order.json | 7 +++++-- erpnext/selling/doctype/sales_order/sales_order.py | 2 +- erpnext/stock/doctype/delivery_note/delivery_note.json | 7 +++++-- erpnext/stock/doctype/delivery_note/delivery_note.py | 2 +- 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 20326e865b8b..f88c8f2a928e 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -1575,12 +1575,14 @@ "print_hide": 1 }, { + "fetch_from": "customer.language", + "fetch_if_empty": 1, "fieldname": "language", - "fieldtype": "Data", + "fieldtype": "Link", "hide_days": 1, "hide_seconds": 1, "label": "Print Language", - "length": 6, + "options": "Language", "print_hide": 1, "read_only": 1 }, @@ -2203,7 +2205,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2024-04-11 11:30:26.272441", + "modified": "2024-04-20 01:21:44.055127", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 206cdf93366d..8aeaa6826b93 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -136,7 +136,7 @@ class SalesInvoice(SellingController): is_pos: DF.Check is_return: DF.Check items: DF.Table[SalesInvoiceItem] - language: DF.Data | None + language: DF.Link | None letter_head: DF.Link | None loyalty_amount: DF.Currency loyalty_points: DF.Int diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 7d0a1bb79585..548e645acdf4 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -826,8 +826,9 @@ }, { "fieldname": "language", - "fieldtype": "Data", + "fieldtype": "Link", "label": "Print Language", + "options": "Language", "print_hide": 1, "read_only": 1 }, @@ -1073,7 +1074,7 @@ "idx": 82, "is_submittable": 1, "links": [], - "modified": "2024-03-27 13:10:30.774058", + "modified": "2024-04-20 01:15:19.171383", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 4b23af1ee697..4381531fc4ba 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -69,7 +69,7 @@ class Quotation(SellingController): in_words: DF.Data | None incoterm: DF.Link | None items: DF.Table[QuotationItem] - language: DF.Data | None + language: DF.Link | None letter_head: DF.Link | None lost_reasons: DF.TableMultiSelect[QuotationLostReasonDetail] named_place: DF.Data | None diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 0df03c37eb2c..9508264b48f4 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -1195,11 +1195,14 @@ "label": "Print Settings" }, { + "fetch_from": "customer.language", + "fetch_if_empty": 1, "fieldname": "language", - "fieldtype": "Data", + "fieldtype": "Link", "hide_days": 1, "hide_seconds": 1, "label": "Print Language", + "options": "Language", "print_hide": 1, "read_only": 1 }, @@ -1658,7 +1661,7 @@ "idx": 105, "is_submittable": 1, "links": [], - "modified": "2024-03-29 16:27:41.539613", + "modified": "2024-04-20 01:20:11.190908", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 298fd4be2db5..6e5e0f472697 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -115,7 +115,7 @@ class SalesOrder(SellingController): inter_company_order_reference: DF.Link | None is_internal_customer: DF.Check items: DF.Table[SalesOrderItem] - language: DF.Data | None + language: DF.Link | None letter_head: DF.Link | None loyalty_amount: DF.Currency loyalty_points: DF.Int diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index 497f6742aed0..58dba622d567 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -1046,9 +1046,12 @@ "report_hide": 1 }, { + "fetch_from": "customer.language", + "fetch_if_empty": 1, "fieldname": "language", - "fieldtype": "Data", + "fieldtype": "Link", "label": "Print Language", + "options": "Language", "print_hide": 1, "read_only": 1 }, @@ -1397,7 +1400,7 @@ "idx": 146, "is_submittable": 1, "links": [], - "modified": "2024-03-27 13:06:49.519676", + "modified": "2024-04-20 01:18:20.679692", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 771ceccade7a..6935d38355e2 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -83,7 +83,7 @@ class DeliveryNote(SellingController): is_return: DF.Check issue_credit_note: DF.Check items: DF.Table[DeliveryNoteItem] - language: DF.Data | None + language: DF.Link | None letter_head: DF.Link | None lr_date: DF.Date | None lr_no: DF.Data | None