Merge branch 'version-13-hotfix' into crm-lead-validate-cleanup

This commit is contained in:
Anupam Kumar
2021-11-18 10:38:32 +05:30
committed by GitHub
6 changed files with 36 additions and 21 deletions

View File

@@ -617,7 +617,8 @@ def make_material_request(source_name, target_doc=None):
"doctype": "Material Request Item", "doctype": "Material Request Item",
"field_map": { "field_map": {
"required_qty": "qty", "required_qty": "qty",
"uom": "stock_uom" "uom": "stock_uom",
"name": "job_card_item"
}, },
"postprocess": update_item, "postprocess": update_item,
} }

View File

@@ -502,7 +502,8 @@ def make_stock_entry(source_name, target_doc=None):
"field_map": { "field_map": {
"name": "material_request_item", "name": "material_request_item",
"parent": "material_request", "parent": "material_request",
"uom": "stock_uom" "uom": "stock_uom",
"job_card_item": "job_card_item"
}, },
"postprocess": update_item, "postprocess": update_item,
"condition": lambda doc: doc.ordered_qty < doc.stock_qty "condition": lambda doc: doc.ordered_qty < doc.stock_qty

View File

@@ -52,6 +52,7 @@
"sales_order_item", "sales_order_item",
"production_plan", "production_plan",
"material_request_plan_item", "material_request_plan_item",
"job_card_item",
"col_break4", "col_break4",
"expense_account", "expense_account",
"section_break_46", "section_break_46",
@@ -444,16 +445,25 @@
{ {
"fieldname": "qty_info_col_break", "fieldname": "qty_info_col_break",
"fieldtype": "Column Break" "fieldtype": "Column Break"
},
{
"fieldname": "job_card_item",
"fieldtype": "Data",
"hidden": 1,
"no_copy": 1,
"print_hide": 1,
"label": "Job Card Item"
} }
], ],
"idx": 1, "idx": 1,
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2020-10-02 11:44:36.553064", "modified": "2021-11-03 14:40:24.409826",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Material Request Item", "name": "Material Request Item",
"naming_rule": "Random",
"owner": "Administrator", "owner": "Administrator",
"permissions": [], "permissions": [],
"sort_field": "modified", "sort_field": "modified",

View File

@@ -1,19 +1,19 @@
{% for d in data %} {% for d in data %}
<div class="dashboard-list-item" style="padding: 7px 15px;"> <div class="dashboard-list-item" style="padding: 7px 15px;">
<div class="row"> <div class="row">
<div class="col-sm-2 small" style="margin-top: 8px;"> <div class="col-sm-2" style="margin-top: 8px;">
<a data-type="warehouse" data-name="{{ d.warehouse }}">{{ d.warehouse }}</a> <a data-type="warehouse" data-name="{{ d.warehouse }}">{{ d.warehouse }}</a>
</div> </div>
<div class="col-sm-2 small" style="margin-top: 8px; "> <div class="col-sm-2" style="margin-top: 8px; ">
<a data-type="item" data-name="{{ d.item_code }}">{{ d.item_code }}</a> <a data-type="item" data-name="{{ d.item_code }}">{{ d.item_code }}</a>
</div> </div>
<div class="col-sm-1 small" style="margin-top: 8px; "> <div class="col-sm-1" style="margin-top: 8px; ">
{{ d.stock_capacity }} {{ d.stock_capacity }}
</div> </div>
<div class="col-sm-2 small" style="margin-top: 8px; "> <div class="col-sm-2" style="margin-top: 8px; ">
{{ d.actual_qty }} {{ d.actual_qty }}
</div> </div>
<div class="col-sm-2 small"> <div class="col-sm-2">
<div class="progress" title="Occupied Qty: {{ d.actual_qty }}" style="margin-bottom: 4px; height: 7px; margin-top: 14px;"> <div class="progress" title="Occupied Qty: {{ d.actual_qty }}" style="margin-bottom: 4px; height: 7px; margin-top: 14px;">
<div class="progress-bar" role="progressbar" <div class="progress-bar" role="progressbar"
aria-valuenow="{{ d.percent_occupied }}" aria-valuenow="{{ d.percent_occupied }}"
@@ -23,16 +23,19 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-1 small" style="margin-top: 8px;"> <div class="col-sm-1" style="margin-top: 8px;">
{{ d.percent_occupied }}% {{ d.percent_occupied }}%
</div> </div>
{% if can_write %} {% if can_write %}
<div class="col-sm-1 text-right" style="margin-top: 2px;"> <div class="col-sm-2 text-right" style="margin-top: 2px;">
<button class="btn btn-default btn-xs btn-edit" <button
style="margin-top: 4px;margin-bottom: 4px;" class="btn btn-default btn-xs btn-edit"
data-warehouse="{{ d.warehouse }}" style="margin: 4px 0; float: left;"
data-item="{{ escape(d.item_code) }}" data-warehouse="{{ d.warehouse }}"
data-company="{{ escape(d.company) }}">{{ __("Edit Capacity") }}</a> data-item="{{ escape(d.item_code) }}"
data-company="{{ escape(d.company) }}">
{{ __("Edit Capacity") }}
</button>
</div> </div>
{% endif %} {% endif %}
</div> </div>

View File

@@ -4,7 +4,7 @@ frappe.pages['warehouse-capacity-summary'].on_page_load = function(wrapper) {
title: 'Warehouse Capacity Summary', title: 'Warehouse Capacity Summary',
single_column: true single_column: true
}); });
page.set_secondary_action('Refresh', () => page.capacity_dashboard.refresh(), 'octicon octicon-sync'); page.set_secondary_action('Refresh', () => page.capacity_dashboard.refresh(), 'refresh');
page.start = 0; page.start = 0;
page.company_field = page.add_field({ page.company_field = page.add_field({

View File

@@ -1,18 +1,18 @@
<div class="dashboard-list-item" style="padding: 12px 15px;"> <div class="dashboard-list-item" style="padding: 12px 15px;">
<div class="row"> <div class="row">
<div class="col-sm-2 small text-muted" style="margin-top: 8px;"> <div class="col-sm-2 text-muted" style="margin-top: 8px;">
Warehouse Warehouse
</div> </div>
<div class="col-sm-2 small text-muted" style="margin-top: 8px;"> <div class="col-sm-2 text-muted" style="margin-top: 8px;">
Item Item
</div> </div>
<div class="col-sm-1 small text-muted" style="margin-top: 8px;"> <div class="col-sm-1 text-muted" style="margin-top: 8px;">
Stock Capacity Stock Capacity
</div> </div>
<div class="col-sm-2 small text-muted" style="margin-top: 8px;"> <div class="col-sm-2 text-muted" style="margin-top: 8px;">
Balance Stock Qty Balance Stock Qty
</div> </div>
<div class="col-sm-2 small text-muted" style="margin-top: 8px;"> <div class="col-sm-2 text-muted" style="margin-top: 8px;">
% Occupied % Occupied
</div> </div>
</div> </div>