mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
Merge pull request #44639 from frappe/version-14-hotfix
chore: release v14
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
from frappe import _
|
||||||
from frappe.model.docstatus import DocStatus
|
from frappe.model.docstatus import DocStatus
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
|
|
||||||
@@ -156,13 +157,17 @@ class BankTransaction(StatusUpdater):
|
|||||||
if self.party_type and self.party:
|
if self.party_type and self.party:
|
||||||
return
|
return
|
||||||
|
|
||||||
result = AutoMatchParty(
|
result = None
|
||||||
bank_party_account_number=self.bank_party_account_number,
|
try:
|
||||||
bank_party_iban=self.bank_party_iban,
|
result = AutoMatchParty(
|
||||||
bank_party_name=self.bank_party_name,
|
bank_party_account_number=self.bank_party_account_number,
|
||||||
description=self.description,
|
bank_party_iban=self.bank_party_iban,
|
||||||
deposit=self.deposit,
|
bank_party_name=self.bank_party_name,
|
||||||
).match()
|
description=self.description,
|
||||||
|
deposit=self.deposit,
|
||||||
|
).match()
|
||||||
|
except Exception:
|
||||||
|
frappe.log_error(title=_("Error in party matching for Bank Transaction {0}").format(self.name))
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
party_type, party = result
|
party_type, party = result
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ frappe.ui.form.on("Asset", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
frm.dashboard.render_graph({
|
frm.dashboard.render_graph({
|
||||||
title: "Asset Value",
|
title: __("Asset Value"),
|
||||||
data: {
|
data: {
|
||||||
labels: x_intervals,
|
labels: x_intervals,
|
||||||
datasets: [
|
datasets: [
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ def prepare_data(data, filters):
|
|||||||
|
|
||||||
|
|
||||||
def prepare_chart_data(pending, completed):
|
def prepare_chart_data(pending, completed):
|
||||||
labels = ["Amount to Bill", "Billed Amount"]
|
labels = [_("Amount to Bill"), _("Billed Amount")]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"data": {"labels": labels, "datasets": [{"values": [pending, completed]}]},
|
"data": {"labels": labels, "datasets": [{"values": [pending, completed]}]},
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ frappe.ui.form.on("BOM", {
|
|||||||
dialog.fields_dict.items.df.data.push({
|
dialog.fields_dict.items.df.data.push({
|
||||||
item_code: d.item_code,
|
item_code: d.item_code,
|
||||||
variant_item_code: "",
|
variant_item_code: "",
|
||||||
qty: d.qty,
|
qty: (d.qty / frm.doc.quantity) * (dialog.fields_dict.qty.value || 1),
|
||||||
source_warehouse: d.source_warehouse,
|
source_warehouse: d.source_warehouse,
|
||||||
operation: d.operation,
|
operation: d.operation,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -193,6 +193,24 @@ class BOM(WebsiteGenerator):
|
|||||||
self.update_cost(update_parent=False, from_child_bom=True, update_hour_rate=False, save=False)
|
self.update_cost(update_parent=False, from_child_bom=True, update_hour_rate=False, save=False)
|
||||||
self.set_process_loss_qty()
|
self.set_process_loss_qty()
|
||||||
self.validate_scrap_items()
|
self.validate_scrap_items()
|
||||||
|
self.set_default_uom()
|
||||||
|
|
||||||
|
def set_default_uom(self):
|
||||||
|
if not self.get("items"):
|
||||||
|
return
|
||||||
|
|
||||||
|
item_wise_uom = frappe._dict(
|
||||||
|
frappe.get_all(
|
||||||
|
"Item",
|
||||||
|
filters={"name": ("in", [item.item_code for item in self.items])},
|
||||||
|
fields=["name", "stock_uom"],
|
||||||
|
as_list=1,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
for row in self.get("items"):
|
||||||
|
if row.stock_uom != item_wise_uom.get(row.item_code):
|
||||||
|
row.stock_uom = item_wise_uom.get(row.item_code)
|
||||||
|
|
||||||
def get_context(self, context):
|
def get_context(self, context):
|
||||||
context.parents = [{"name": "boms", "title": _("All BOMs")}]
|
context.parents = [{"name": "boms", "title": _("All BOMs")}]
|
||||||
|
|||||||
@@ -755,6 +755,26 @@ class TestBOM(FrappeTestCase):
|
|||||||
self.assertTrue("_Test RM Item 2 Fixed Asset Item" not in items)
|
self.assertTrue("_Test RM Item 2 Fixed Asset Item" not in items)
|
||||||
self.assertTrue("_Test RM Item 3 Manufacture Item" in items)
|
self.assertTrue("_Test RM Item 3 Manufacture Item" in items)
|
||||||
|
|
||||||
|
def test_bom_raw_materials_stock_uom(self):
|
||||||
|
rm_item = make_item(
|
||||||
|
properties={"is_stock_item": 1, "valuation_rate": 1000.0, "stock_uom": "Nos"}
|
||||||
|
).name
|
||||||
|
fg_item = make_item(properties={"is_stock_item": 1}).name
|
||||||
|
|
||||||
|
from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom
|
||||||
|
|
||||||
|
bom = make_bom(item=fg_item, raw_materials=[rm_item], do_not_submit=True)
|
||||||
|
for row in bom.items:
|
||||||
|
self.assertEqual(row.stock_uom, "Nos")
|
||||||
|
|
||||||
|
frappe.db.set_value("Item", rm_item, "stock_uom", "Kg")
|
||||||
|
|
||||||
|
bom.items[0].qty = 2
|
||||||
|
bom.save()
|
||||||
|
|
||||||
|
for row in bom.items:
|
||||||
|
self.assertEqual(row.stock_uom, "Kg")
|
||||||
|
|
||||||
|
|
||||||
def get_default_bom(item_code="_Test FG Item 2"):
|
def get_default_bom(item_code="_Test FG Item 2"):
|
||||||
return frappe.db.get_value("BOM", {"item": item_code, "is_active": 1, "is_default": 1})
|
return frappe.db.get_value("BOM", {"item": item_code, "is_active": 1, "is_default": 1})
|
||||||
|
|||||||
@@ -131,11 +131,11 @@ def get_chart_data(periodic_data, columns):
|
|||||||
pending.append(periodic_data.get("Pending").get(d))
|
pending.append(periodic_data.get("Pending").get(d))
|
||||||
completed.append(periodic_data.get("Completed").get(d))
|
completed.append(periodic_data.get("Completed").get(d))
|
||||||
|
|
||||||
datasets.append({"name": "All Work Orders", "values": all_data})
|
datasets.append({"name": _("All Work Orders"), "values": all_data})
|
||||||
datasets.append({"name": "Not Started", "values": not_start})
|
datasets.append({"name": _("Not Started"), "values": not_start})
|
||||||
datasets.append({"name": "Overdue", "values": overdue})
|
datasets.append({"name": _("Overdue"), "values": overdue})
|
||||||
datasets.append({"name": "Pending", "values": pending})
|
datasets.append({"name": _("Pending"), "values": pending})
|
||||||
datasets.append({"name": "Completed", "values": completed})
|
datasets.append({"name": _("Completed"), "values": completed})
|
||||||
|
|
||||||
chart = {"data": {"labels": labels, "datasets": datasets}}
|
chart = {"data": {"labels": labels, "datasets": datasets}}
|
||||||
chart["type"] = "line"
|
chart["type"] = "line"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ def get_data(filters):
|
|||||||
|
|
||||||
|
|
||||||
def get_chart_data(periodic_data, columns):
|
def get_chart_data(periodic_data, columns):
|
||||||
labels = ["Rejected", "Accepted"]
|
labels = [_("Rejected"), _("Accepted")]
|
||||||
|
|
||||||
status_wise_data = {"Accepted": 0, "Rejected": 0}
|
status_wise_data = {"Accepted": 0, "Rejected": 0}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ def get_chart_data(periodic_data, columns):
|
|||||||
|
|
||||||
datasets.append(
|
datasets.append(
|
||||||
{
|
{
|
||||||
"name": "Qty Wise Chart",
|
"name": _("Qty Wise Chart"),
|
||||||
"values": [status_wise_data.get("Rejected"), status_wise_data.get("Accepted")],
|
"values": [status_wise_data.get("Rejected"), status_wise_data.get("Accepted")],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ def get_chart_data(data):
|
|||||||
on_track = on_track + 1
|
on_track = on_track + 1
|
||||||
charts = {
|
charts = {
|
||||||
"data": {
|
"data": {
|
||||||
"labels": ["On Track", "Delayed"],
|
"labels": [_("On Track"), _("Delayed")],
|
||||||
"datasets": [{"name": "Delayed", "values": [on_track, delay]}],
|
"datasets": [{"name": _("Delayed"), "values": [on_track, delay]}],
|
||||||
},
|
},
|
||||||
"type": "percentage",
|
"type": "percentage",
|
||||||
"colors": ["#84D5BA", "#CB4B5F"],
|
"colors": ["#84D5BA", "#CB4B5F"],
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ frappe.ui.form.on("Sales Order", {
|
|||||||
target: frm,
|
target: frm,
|
||||||
setters: [
|
setters: [
|
||||||
{
|
{
|
||||||
label: 'Supplier',
|
label: __('Supplier'),
|
||||||
fieldname: 'supplier',
|
fieldname: 'supplier',
|
||||||
fieldtype: 'Link',
|
fieldtype: 'Link',
|
||||||
options: 'Supplier'
|
options: 'Supplier'
|
||||||
@@ -376,7 +376,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
|
|||||||
target: me.frm,
|
target: me.frm,
|
||||||
setters: [
|
setters: [
|
||||||
{
|
{
|
||||||
label: "Customer",
|
label: __("Customer"),
|
||||||
fieldname: "party_name",
|
fieldname: "party_name",
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Customer",
|
options: "Customer",
|
||||||
@@ -430,7 +430,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const fields = [{
|
const fields = [{
|
||||||
label: 'Items',
|
label: __('Items'),
|
||||||
fieldtype: 'Table',
|
fieldtype: 'Table',
|
||||||
fieldname: 'items',
|
fieldname: 'items',
|
||||||
description: __('Select BOM and Qty for Production'),
|
description: __('Select BOM and Qty for Production'),
|
||||||
@@ -724,7 +724,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
|
|||||||
"default": 0
|
"default": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: 'items_for_po', fieldtype: 'Table', label: 'Select Items',
|
fieldname: 'items_for_po', fieldtype: 'Table', label: __('Select Items'),
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
fieldtype:'Data',
|
fieldtype:'Data',
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
fieldname: "mode_of_payment",
|
fieldname: "mode_of_payment",
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
in_list_view: 1,
|
in_list_view: 1,
|
||||||
label: "Mode of Payment",
|
label: __("Mode of Payment"),
|
||||||
options: "Mode of Payment",
|
options: "Mode of Payment",
|
||||||
reqd: 1,
|
reqd: 1,
|
||||||
},
|
},
|
||||||
@@ -38,7 +38,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
fieldname: "opening_amount",
|
fieldname: "opening_amount",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
in_list_view: 1,
|
in_list_view: 1,
|
||||||
label: "Opening Amount",
|
label: __("Opening Amount"),
|
||||||
options: "company:company_currency",
|
options: "company:company_currency",
|
||||||
change: function () {
|
change: function () {
|
||||||
dialog.fields_dict.balance_details.df.data.some((d) => {
|
dialog.fields_dict.balance_details.df.data.some((d) => {
|
||||||
@@ -87,7 +87,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
{
|
{
|
||||||
fieldname: "balance_details",
|
fieldname: "balance_details",
|
||||||
fieldtype: "Table",
|
fieldtype: "Table",
|
||||||
label: "Opening Balance Details",
|
label: __("Opening Balance Details"),
|
||||||
cannot_add_rows: false,
|
cannot_add_rows: false,
|
||||||
in_place_edit: true,
|
in_place_edit: true,
|
||||||
reqd: 1,
|
reqd: 1,
|
||||||
|
|||||||
@@ -959,13 +959,15 @@ erpnext.PointOfSale.ItemCart = class {
|
|||||||
|
|
||||||
if (!res.length) {
|
if (!res.length) {
|
||||||
transaction_container.html(
|
transaction_container.html(
|
||||||
`<div class="no-transactions-placeholder">No recent transactions found</div>`
|
`<div class="no-transactions-placeholder">${__("No recent transactions found")}</div>`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const elapsed_time = moment(res[0].posting_date + " " + res[0].posting_time).fromNow();
|
const elapsed_time = moment(res[0].posting_date + " " + res[0].posting_time).fromNow();
|
||||||
this.$customer_section.find(".customer-desc").html(`Last transacted ${elapsed_time}`);
|
this.$customer_section
|
||||||
|
.find(".customer-desc")
|
||||||
|
.html(`${__("Last transacted")} ${__(elapsed_time)}`);
|
||||||
|
|
||||||
res.forEach((invoice) => {
|
res.forEach((invoice) => {
|
||||||
const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format(
|
const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format(
|
||||||
@@ -990,7 +992,7 @@ erpnext.PointOfSale.ItemCart = class {
|
|||||||
</div>
|
</div>
|
||||||
<div class="invoice-status">
|
<div class="invoice-status">
|
||||||
<span class="indicator-pill whitespace-nowrap ${indicator_color[invoice.status]}">
|
<span class="indicator-pill whitespace-nowrap ${indicator_color[invoice.status]}">
|
||||||
<span>${invoice.status}</span>
|
<span>${__(invoice.status)}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
|||||||
|
|
||||||
init_email_print_dialog() {
|
init_email_print_dialog() {
|
||||||
const email_dialog = new frappe.ui.Dialog({
|
const email_dialog = new frappe.ui.Dialog({
|
||||||
title: "Email Receipt",
|
title: __("Email Receipt"),
|
||||||
fields: [
|
fields: [
|
||||||
{ fieldname: "email_id", fieldtype: "Data", options: "Email", label: "Email ID" },
|
{ fieldname: "email_id", fieldtype: "Data", options: "Email", label: "Email ID" },
|
||||||
// {fieldname:'remarks', fieldtype:'Text', label:'Remarks (if any)'}
|
// {fieldname:'remarks', fieldtype:'Text', label:'Remarks (if any)'}
|
||||||
@@ -59,7 +59,7 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
|||||||
this.email_dialog = email_dialog;
|
this.email_dialog = email_dialog;
|
||||||
|
|
||||||
const print_dialog = new frappe.ui.Dialog({
|
const print_dialog = new frappe.ui.Dialog({
|
||||||
title: "Print Receipt",
|
title: __("Print Receipt"),
|
||||||
fields: [{ fieldname: "print", fieldtype: "Data", label: "Print Preview" }],
|
fields: [{ fieldname: "print", fieldtype: "Data", label: "Print Preview" }],
|
||||||
primary_action: () => {
|
primary_action: () => {
|
||||||
this.print_receipt();
|
this.print_receipt();
|
||||||
@@ -112,7 +112,7 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
|||||||
get_discount_html(doc) {
|
get_discount_html(doc) {
|
||||||
if (doc.discount_amount) {
|
if (doc.discount_amount) {
|
||||||
return `<div class="summary-row-wrapper">
|
return `<div class="summary-row-wrapper">
|
||||||
<div>Discount (${doc.additional_discount_percentage} %)</div>
|
<div>${__("Discount")} (${doc.additional_discount_percentage} %)</div>
|
||||||
<div>${format_currency(doc.discount_amount, doc.currency)}</div>
|
<div>${format_currency(doc.discount_amount, doc.currency)}</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -584,7 +584,7 @@ erpnext.PointOfSale.Payment = class {
|
|||||||
const remaining = grand_total - doc.paid_amount;
|
const remaining = grand_total - doc.paid_amount;
|
||||||
const change = doc.change_amount || remaining <= 0 ? -1 * remaining : undefined;
|
const change = doc.change_amount || remaining <= 0 ? -1 * remaining : undefined;
|
||||||
const currency = doc.currency;
|
const currency = doc.currency;
|
||||||
const label = change ? __("Change") : __("To Be Paid");
|
const label = __("Change Amount");
|
||||||
|
|
||||||
this.$totals.html(
|
this.$totals.html(
|
||||||
`<div class="col">
|
`<div class="col">
|
||||||
|
|||||||
@@ -270,11 +270,11 @@ def prepare_chart(s_orders):
|
|||||||
"labels": [term.payment_term for term in s_orders],
|
"labels": [term.payment_term for term in s_orders],
|
||||||
"datasets": [
|
"datasets": [
|
||||||
{
|
{
|
||||||
"name": "Payment Amount",
|
"name": _("Payment Amount"),
|
||||||
"values": [x.base_payment_amount for x in s_orders],
|
"values": [x.base_payment_amount for x in s_orders],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Paid Amount",
|
"name": _("Paid Amount"),
|
||||||
"values": [x.paid_amount for x in s_orders],
|
"values": [x.paid_amount for x in s_orders],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ def prepare_data(data, so_elapsed_time, filters):
|
|||||||
|
|
||||||
|
|
||||||
def prepare_chart_data(pending, completed):
|
def prepare_chart_data(pending, completed):
|
||||||
labels = ["Amount to Bill", "Billed Amount"]
|
labels = [_("Amount to Bill"), _("Billed Amount")]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"data": {"labels": labels, "datasets": [{"values": [pending, completed]}]},
|
"data": {"labels": labels, "datasets": [{"values": [pending, completed]}]},
|
||||||
|
|||||||
@@ -713,7 +713,7 @@ def make_sales_invoice(source_name, target_doc=None, args=None):
|
|||||||
automatically_fetch_payment_terms = cint(
|
automatically_fetch_payment_terms = cint(
|
||||||
frappe.db.get_single_value("Accounts Settings", "automatically_fetch_payment_terms")
|
frappe.db.get_single_value("Accounts Settings", "automatically_fetch_payment_terms")
|
||||||
)
|
)
|
||||||
if automatically_fetch_payment_terms:
|
if automatically_fetch_payment_terms and not doc.is_return:
|
||||||
doc.set_payment_schedule()
|
doc.set_payment_schedule()
|
||||||
|
|
||||||
return doc
|
return doc
|
||||||
|
|||||||
@@ -173,13 +173,10 @@ class InventoryDimension(Document):
|
|||||||
dimension_fields = []
|
dimension_fields = []
|
||||||
if self.apply_to_all_doctypes:
|
if self.apply_to_all_doctypes:
|
||||||
for doctype in get_inventory_documents():
|
for doctype in get_inventory_documents():
|
||||||
if field_exists(doctype[0], self.source_fieldname):
|
|
||||||
continue
|
|
||||||
|
|
||||||
dimension_fields = self.get_dimension_fields(doctype[0])
|
dimension_fields = self.get_dimension_fields(doctype[0])
|
||||||
self.add_transfer_field(doctype[0], dimension_fields)
|
self.add_transfer_field(doctype[0], dimension_fields)
|
||||||
custom_fields.setdefault(doctype[0], dimension_fields)
|
custom_fields.setdefault(doctype[0], dimension_fields)
|
||||||
elif not field_exists(self.document_type, self.source_fieldname):
|
else:
|
||||||
dimension_fields = self.get_dimension_fields()
|
dimension_fields = self.get_dimension_fields()
|
||||||
|
|
||||||
self.add_transfer_field(self.document_type, dimension_fields)
|
self.add_transfer_field(self.document_type, dimension_fields)
|
||||||
@@ -198,8 +195,17 @@ class InventoryDimension(Document):
|
|||||||
dimension_field["fieldname"] = self.target_fieldname
|
dimension_field["fieldname"] = self.target_fieldname
|
||||||
custom_fields["Stock Ledger Entry"] = dimension_field
|
custom_fields["Stock Ledger Entry"] = dimension_field
|
||||||
|
|
||||||
|
filter_custom_fields = {}
|
||||||
if custom_fields:
|
if custom_fields:
|
||||||
create_custom_fields(custom_fields)
|
for doctype, fields in custom_fields.items():
|
||||||
|
if isinstance(fields, dict):
|
||||||
|
fields = [fields]
|
||||||
|
|
||||||
|
for field in fields:
|
||||||
|
if not field_exists(doctype, field["fieldname"]):
|
||||||
|
filter_custom_fields.setdefault(doctype, []).append(field)
|
||||||
|
|
||||||
|
create_custom_fields(filter_custom_fields)
|
||||||
|
|
||||||
def add_transfer_field(self, doctype, dimension_fields):
|
def add_transfer_field(self, doctype, dimension_fields):
|
||||||
if doctype not in [
|
if doctype not in [
|
||||||
|
|||||||
@@ -226,11 +226,16 @@ frappe.ui.form.on('Material Request', {
|
|||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
const d = item;
|
const d = item;
|
||||||
const allow_to_change_fields = ['actual_qty', 'projected_qty', 'min_order_qty', 'item_name', 'description', 'stock_uom', 'uom', 'conversion_factor', 'stock_qty'];
|
|
||||||
|
|
||||||
if(!r.exc) {
|
let allow_to_change_fields = ['actual_qty', 'projected_qty', 'min_order_qty', 'item_name', 'description', 'stock_uom', 'uom', 'conversion_factor', 'stock_qty'];
|
||||||
$.each(r.message, function(key, value) {
|
|
||||||
if(!d[key] || allow_to_change_fields.includes(key)) {
|
if (overwrite_warehouse) {
|
||||||
|
allow_to_change_fields.push("description");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!r.exc) {
|
||||||
|
$.each(r.message, function (key, value) {
|
||||||
|
if (!d[key] || allow_to_change_fields.includes(key)) {
|
||||||
d[key] = value;
|
d[key] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
{% if doc.status == "Open" %}
|
{% if doc.status == "Open" %}
|
||||||
{{ doc.priority }}
|
{{ doc.priority }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ doc.status }}
|
{{ _(doc.status) }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="indicator-pill {{ " red" if doc.status=="Open" else "darkgrey" }}">
|
<span class="indicator-pill {{ " red" if doc.status=="Open" else "darkgrey" }}">
|
||||||
{{ doc.status }}</span>
|
{{ _(doc.status) }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if doc["_assign"] %}
|
{% if doc["_assign"] %}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<span class="indicator-pill {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "gray") }} list-item-status">{{doc.status}}</span>
|
<span class="indicator-pill {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "gray") }} list-item-status">{{ _(doc.status) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="small text-muted items-preview ellipsis ellipsis-width">
|
<div class="small text-muted items-preview ellipsis ellipsis-width">
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<input type="text" class="form-control" name="Hours" readonly value= "{{ doc.hours }}">
|
<input type="text" class="form-control" name="Hours" readonly value= "{{ doc.hours }}">
|
||||||
|
|
||||||
<label for="status" class="control-label text-muted small">{{ __("Status") }}</label>
|
<label for="status" class="control-label text-muted small">{{ __("Status") }}</label>
|
||||||
<input type="text" class="form-control" name="status" readonly value= "{{ doc.status }}">
|
<input type="text" class="form-control" name="status" readonly value= "{{ _(doc.status) }}">
|
||||||
|
|
||||||
<label for="Note" class="control-label text-muted small">{{ __("Note") }}</label>
|
<label for="Note" class="control-label text-muted small">{{ __("Note") }}</label>
|
||||||
<textarea class="form-control" name="Hours" readonly> {{ doc.note }} </textarea>
|
<textarea class="form-control" name="Hours" readonly> {{ doc.note }} </textarea>
|
||||||
|
|||||||
Reference in New Issue
Block a user