Merge branch 'hotfix'
This commit is contained in:
commit
0b9129e519
@ -5,7 +5,7 @@ import frappe
|
|||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
from frappe.utils import getdate
|
from frappe.utils import getdate
|
||||||
|
|
||||||
__version__ = '10.1.40'
|
__version__ = '10.1.41'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -819,6 +819,7 @@ frappe.ui.form.on('Payment Entry Reference', {
|
|||||||
|
|
||||||
reference_name: function(frm, cdt, cdn) {
|
reference_name: function(frm, cdt, cdn) {
|
||||||
var row = locals[cdt][cdn];
|
var row = locals[cdt][cdn];
|
||||||
|
if (row.reference_name && row.reference_doctype) {
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_reference_details",
|
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_reference_details",
|
||||||
args: {
|
args: {
|
||||||
@ -841,6 +842,7 @@ frappe.ui.form.on('Payment Entry Reference', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
allocated_amount: function(frm) {
|
allocated_amount: function(frm) {
|
||||||
|
@ -1239,7 +1239,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -3973,7 +3973,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2018-05-28 02:38:40.310899",
|
"modified": "2018-07-06 02:38:40.310899",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice",
|
"name": "Purchase Invoice",
|
||||||
|
@ -1459,7 +1459,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -4713,7 +4713,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2018-05-28 04:47:29.879475",
|
"modified": "2018-07-06 12:09:02.039783",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice",
|
"name": "Sales Invoice",
|
||||||
|
@ -318,6 +318,7 @@ class SalesInvoice(SellingController):
|
|||||||
if not for_validate and not self.customer:
|
if not for_validate and not self.customer:
|
||||||
self.customer = pos.customer
|
self.customer = pos.customer
|
||||||
|
|
||||||
|
self.ignore_pricing_rule = pos.ignore_pricing_rule
|
||||||
if pos.get('account_for_change_amount'):
|
if pos.get('account_for_change_amount'):
|
||||||
self.account_for_change_amount = pos.get('account_for_change_amount')
|
self.account_for_change_amount = pos.get('account_for_change_amount')
|
||||||
|
|
||||||
|
@ -39,6 +39,12 @@ frappe.query_reports["Budget Variance Report"] = {
|
|||||||
options: ["Cost Center", "Project"],
|
options: ["Cost Center", "Project"],
|
||||||
default: "Cost Center",
|
default: "Cost Center",
|
||||||
reqd: 1
|
reqd: 1
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
fieldname: "cost_center",
|
||||||
|
label: __("Cost Center"),
|
||||||
|
fieldtype: "Link",
|
||||||
|
options: "Cost Center"
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,13 @@ from erpnext.controllers.trends import get_period_date_ranges, get_period_month_
|
|||||||
|
|
||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters = {}
|
if not filters: filters = {}
|
||||||
|
validate_filters(filters)
|
||||||
columns = get_columns(filters)
|
columns = get_columns(filters)
|
||||||
|
if filters.get("cost_center"):
|
||||||
|
cost_centers = [filters.get("cost_center")]
|
||||||
|
else:
|
||||||
cost_centers = get_cost_centers(filters)
|
cost_centers = get_cost_centers(filters)
|
||||||
|
|
||||||
period_month_ranges = get_period_month_ranges(filters["period"], filters["fiscal_year"])
|
period_month_ranges = get_period_month_ranges(filters["period"], filters["fiscal_year"])
|
||||||
cam_map = get_cost_center_account_month_map(filters)
|
cam_map = get_cost_center_account_month_map(filters)
|
||||||
|
|
||||||
@ -39,6 +43,10 @@ def execute(filters=None):
|
|||||||
|
|
||||||
return columns, data
|
return columns, data
|
||||||
|
|
||||||
|
def validate_filters(filters):
|
||||||
|
if filters.get("budget_against")=="Project" and filters.get("cost_center"):
|
||||||
|
frappe.throw(_("Filter based on Cost Center is only applicable if Budget Against is selected as Cost Center"))
|
||||||
|
|
||||||
def get_columns(filters):
|
def get_columns(filters):
|
||||||
columns = [_(filters.get("budget_against")) + ":Link/%s:120"%(filters.get("budget_against")), _("Account") + ":Link/Account:120"]
|
columns = [_(filters.get("budget_against")) + ":Link/%s:120"%(filters.get("budget_against")), _("Account") + ":Link/Account:120"]
|
||||||
|
|
||||||
@ -66,12 +74,16 @@ def get_cost_centers(filters):
|
|||||||
|
|
||||||
#Get cost center & target details
|
#Get cost center & target details
|
||||||
def get_cost_center_target_details(filters):
|
def get_cost_center_target_details(filters):
|
||||||
|
cond = ""
|
||||||
|
if filters.get("cost_center"):
|
||||||
|
cond += " and b.cost_center='%s'" % frappe.db.escape(filters.get("cost_center"))
|
||||||
|
|
||||||
return frappe.db.sql("""
|
return frappe.db.sql("""
|
||||||
select b.{budget_against} as budget_against, b.monthly_distribution, ba.account, ba.budget_amount
|
select b.{budget_against} as budget_against, b.monthly_distribution, ba.account, ba.budget_amount
|
||||||
from `tabBudget` b, `tabBudget Account` ba
|
from `tabBudget` b, `tabBudget Account` ba
|
||||||
where b.name=ba.parent and b.docstatus = 1 and b.fiscal_year=%s
|
where b.name=ba.parent and b.docstatus = 1 and b.fiscal_year=%s
|
||||||
and b.budget_against = %s and b.company=%s
|
and b.budget_against = %s and b.company=%s {cond}
|
||||||
""".format(budget_against=filters.get("budget_against").replace(" ", "_").lower()),
|
""".format(budget_against=filters.get("budget_against").replace(" ", "_").lower(), cond=cond),
|
||||||
(filters.fiscal_year, filters.budget_against, filters.company), as_dict=True)
|
(filters.fiscal_year, filters.budget_against, filters.company), as_dict=True)
|
||||||
|
|
||||||
#Get target distribution details of accounts of cost center
|
#Get target distribution details of accounts of cost center
|
||||||
|
@ -53,7 +53,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
|||||||
delivery_note, d.income_account, d.cost_center, d.stock_qty, d.stock_uom
|
delivery_note, d.income_account, d.cost_center, d.stock_qty, d.stock_uom
|
||||||
]
|
]
|
||||||
|
|
||||||
row += [d.base_net_rate/d.stock_qty, d.base_net_amount] \
|
row += [(d.base_net_rate * d.qty)/d.stock_qty, d.base_net_amount] \
|
||||||
if d.stock_uom != d.uom else [d.base_net_rate, d.base_net_amount]
|
if d.stock_uom != d.uom else [d.base_net_rate, d.base_net_amount]
|
||||||
|
|
||||||
total_tax = 0
|
total_tax = 0
|
||||||
@ -133,7 +133,7 @@ def get_items(filters, additional_query_columns):
|
|||||||
`tabSales Invoice Item`.stock_uom, `tabSales Invoice Item`.base_net_rate,
|
`tabSales Invoice Item`.stock_uom, `tabSales Invoice Item`.base_net_rate,
|
||||||
`tabSales Invoice Item`.base_net_amount, `tabSales Invoice`.customer_name,
|
`tabSales Invoice Item`.base_net_amount, `tabSales Invoice`.customer_name,
|
||||||
`tabSales Invoice`.customer_group, `tabSales Invoice Item`.so_detail,
|
`tabSales Invoice`.customer_group, `tabSales Invoice Item`.so_detail,
|
||||||
`tabSales Invoice`.update_stock, `tabSales Invoice Item`.uom {0}
|
`tabSales Invoice`.update_stock, `tabSales Invoice Item`.uom, `tabSales Invoice Item`.qty {0}
|
||||||
from `tabSales Invoice`, `tabSales Invoice Item`
|
from `tabSales Invoice`, `tabSales Invoice Item`
|
||||||
where `tabSales Invoice`.name = `tabSales Invoice Item`.parent
|
where `tabSales Invoice`.name = `tabSales Invoice Item`.parent
|
||||||
and `tabSales Invoice`.docstatus = 1 %s %s
|
and `tabSales Invoice`.docstatus = 1 %s %s
|
||||||
|
@ -1207,7 +1207,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -3355,7 +3355,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-02-17 11:00:05.037716",
|
"modified": "2018-07-06 11:00:05.037716",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Purchase Order",
|
"name": "Purchase Order",
|
||||||
|
@ -781,7 +781,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -2549,7 +2549,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2018-05-28 02:45:48.616334",
|
"modified": "2018-07-06 02:45:48.616334",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Supplier Quotation",
|
"name": "Supplier Quotation",
|
||||||
|
@ -131,6 +131,8 @@ class AccountsController(TransactionBase):
|
|||||||
self.meta.get_label(date_field), self)
|
self.meta.get_label(date_field), self)
|
||||||
|
|
||||||
def validate_due_date(self):
|
def validate_due_date(self):
|
||||||
|
if self.get('is_pos'): return
|
||||||
|
|
||||||
from erpnext.accounts.party import validate_due_date
|
from erpnext.accounts.party import validate_due_date
|
||||||
if self.doctype == "Sales Invoice":
|
if self.doctype == "Sales Invoice":
|
||||||
if not self.due_date:
|
if not self.due_date:
|
||||||
|
@ -176,6 +176,14 @@ def create_variant(item, args):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def enqueue_multiple_variant_creation(item, args):
|
def enqueue_multiple_variant_creation(item, args):
|
||||||
# There can be innumerable attribute combinations, enqueue
|
# There can be innumerable attribute combinations, enqueue
|
||||||
|
if isinstance(args, basestring):
|
||||||
|
variants = json.loads(args)
|
||||||
|
total_variants = 1
|
||||||
|
for key in variants:
|
||||||
|
total_variants *= len(variants[key])
|
||||||
|
if total_variants >= 600:
|
||||||
|
frappe.msgprint("Please do not create more than 500 items at a time", raise_exception=1)
|
||||||
|
return
|
||||||
frappe.enqueue("erpnext.controllers.item_variant.create_multiple_variants",
|
frappe.enqueue("erpnext.controllers.item_variant.create_multiple_variants",
|
||||||
item=item, args=args, now=frappe.flags.in_test);
|
item=item, args=args, now=frappe.flags.in_test);
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
|
|||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.kra_template = function(doc, dt, dn) {
|
cur_frm.cscript.kra_template = function(doc, dt, dn) {
|
||||||
|
doc.goals = [];
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.hr.doctype.appraisal.appraisal.fetch_appraisal_template",
|
method: "erpnext.hr.doctype.appraisal.appraisal.fetch_appraisal_template",
|
||||||
source_name: cur_frm.doc.kra_template,
|
source_name: cur_frm.doc.kra_template,
|
||||||
|
@ -355,7 +355,7 @@ def get_approvers(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_number_of_leave_days(employee, leave_type, from_date, to_date, half_day = None, half_day_date = None):
|
def get_number_of_leave_days(employee, leave_type, from_date, to_date, half_day = None, half_day_date = None):
|
||||||
number_of_days = 0
|
number_of_days = 0
|
||||||
if half_day == 1:
|
if cint(half_day) == 1:
|
||||||
if from_date == to_date:
|
if from_date == to_date:
|
||||||
number_of_days = 0.5
|
number_of_days = 0.5
|
||||||
else:
|
else:
|
||||||
|
@ -22,6 +22,21 @@ frappe.ui.form.on('BOM Update Tool', {
|
|||||||
frm.disable_save();
|
frm.disable_save();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
replace: function(frm) {
|
||||||
|
if (frm.doc.current_bom && frm.doc.new_bom) {
|
||||||
|
frappe.call({
|
||||||
|
method: "erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.enqueue_replace_bom",
|
||||||
|
freeze: true,
|
||||||
|
args: {
|
||||||
|
args: {
|
||||||
|
"current_bom": frm.doc.current_bom,
|
||||||
|
"new_bom": frm.doc.new_bom
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
update_latest_price_in_all_boms: function() {
|
update_latest_price_in_all_boms: function() {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.enqueue_update_cost",
|
method: "erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.enqueue_update_cost",
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
"label": "Replace",
|
"label": "Replace",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "replace_bom",
|
"options": "",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
@ -208,7 +208,7 @@
|
|||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-07-31 18:08:05.919276",
|
"modified": "2018-07-02 16:17:09.014102",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Update Tool",
|
"name": "BOM Update Tool",
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe, json
|
||||||
from frappe.utils import cstr, flt
|
from frappe.utils import cstr, flt
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
from six import string_types
|
||||||
from erpnext.manufacturing.doctype.bom.bom import get_boms_in_bottom_up_order
|
from erpnext.manufacturing.doctype.bom.bom import get_boms_in_bottom_up_order
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
@ -17,12 +18,14 @@ class BOMUpdateTool(Document):
|
|||||||
updated_bom = []
|
updated_bom = []
|
||||||
for bom in bom_list:
|
for bom in bom_list:
|
||||||
bom_obj = frappe.get_doc("BOM", bom)
|
bom_obj = frappe.get_doc("BOM", bom)
|
||||||
|
bom_obj.get_doc_before_save()
|
||||||
updated_bom = bom_obj.update_cost_and_exploded_items(updated_bom)
|
updated_bom = bom_obj.update_cost_and_exploded_items(updated_bom)
|
||||||
bom_obj.calculate_cost()
|
bom_obj.calculate_cost()
|
||||||
bom_obj.update_parent_cost()
|
bom_obj.update_parent_cost()
|
||||||
bom_obj.db_update()
|
bom_obj.db_update()
|
||||||
|
if (getattr(bom_obj.meta, 'track_changes', False)
|
||||||
frappe.msgprint(_("BOM replaced"))
|
and bom_obj._doc_before_save and not bom_obj.flags.ignore_version):
|
||||||
|
bom_obj.save_version()
|
||||||
|
|
||||||
def validate_bom(self):
|
def validate_bom(self):
|
||||||
if cstr(self.current_bom) == cstr(self.new_bom):
|
if cstr(self.current_bom) == cstr(self.new_bom):
|
||||||
@ -54,6 +57,14 @@ class BOMUpdateTool(Document):
|
|||||||
|
|
||||||
return bom_list
|
return bom_list
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def enqueue_replace_bom(args):
|
||||||
|
if isinstance(args, string_types):
|
||||||
|
args = json.loads(args)
|
||||||
|
|
||||||
|
frappe.enqueue("erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.replace_bom", args=args)
|
||||||
|
frappe.msgprint(_("Queued for replacing the BOM. It may take a few minutes."))
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def enqueue_update_cost():
|
def enqueue_update_cost():
|
||||||
frappe.enqueue("erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.update_cost")
|
frappe.enqueue("erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.update_cost")
|
||||||
@ -63,6 +74,14 @@ def update_latest_price_in_all_boms():
|
|||||||
if frappe.db.get_single_value("Manufacturing Settings", "update_bom_costs_automatically"):
|
if frappe.db.get_single_value("Manufacturing Settings", "update_bom_costs_automatically"):
|
||||||
update_cost()
|
update_cost()
|
||||||
|
|
||||||
|
def replace_bom(args):
|
||||||
|
args = frappe._dict(args)
|
||||||
|
|
||||||
|
doc = frappe.get_doc("BOM Update Tool")
|
||||||
|
doc.current_bom = args.current_bom
|
||||||
|
doc.new_bom = args.new_bom
|
||||||
|
doc.replace_bom()
|
||||||
|
|
||||||
def update_cost():
|
def update_cost():
|
||||||
bom_list = get_boms_in_bottom_up_order()
|
bom_list = get_boms_in_bottom_up_order()
|
||||||
for bom in bom_list:
|
for bom in bom_list:
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -42,10 +43,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -73,10 +76,12 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -102,10 +107,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -133,15 +140,17 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "membership_validaty_section",
|
"fieldname": "membership_validity_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@ -150,7 +159,7 @@
|
|||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "membership validaty section",
|
"label": "Validity",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@ -163,10 +172,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -193,10 +204,12 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -223,10 +236,12 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -252,10 +267,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -282,10 +299,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -312,10 +331,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -342,10 +363,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -373,10 +396,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -403,6 +428,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -416,7 +442,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-12-05 07:02:56.859408",
|
"modified": "2018-06-26 19:23:17.911121",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Non Profit",
|
"module": "Non Profit",
|
||||||
"name": "Membership",
|
"name": "Membership",
|
||||||
@ -425,7 +451,6 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 0,
|
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
@ -445,7 +470,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 0,
|
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
@ -472,5 +496,6 @@
|
|||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
@ -4,7 +4,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
from frappe.utils import flt, getdate, get_url
|
from frappe.utils import flt, getdate, get_url, now
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
@ -60,6 +60,7 @@ class Project(Document):
|
|||||||
self.validate_weights()
|
self.validate_weights()
|
||||||
self.sync_tasks()
|
self.sync_tasks()
|
||||||
self.tasks = []
|
self.tasks = []
|
||||||
|
self.load_tasks()
|
||||||
self.send_welcome_email()
|
self.send_welcome_email()
|
||||||
|
|
||||||
def validate_project_name(self):
|
def validate_project_name(self):
|
||||||
@ -83,12 +84,21 @@ class Project(Document):
|
|||||||
"""sync tasks and remove table"""
|
"""sync tasks and remove table"""
|
||||||
if self.flags.dont_sync_tasks: return
|
if self.flags.dont_sync_tasks: return
|
||||||
task_names = []
|
task_names = []
|
||||||
|
|
||||||
|
existing_task_data = {}
|
||||||
|
for d in frappe.get_all('Project Task',
|
||||||
|
fields = ["title", "status", "start_date", "end_date", "description", "task_weight", "task_id"],
|
||||||
|
filters = {'parent': self.name}):
|
||||||
|
existing_task_data.setdefault(d.task_id, d)
|
||||||
|
|
||||||
for t in self.tasks:
|
for t in self.tasks:
|
||||||
if t.task_id:
|
if t.task_id:
|
||||||
task = frappe.get_doc("Task", t.task_id)
|
task = frappe.get_doc("Task", t.task_id)
|
||||||
else:
|
else:
|
||||||
task = frappe.new_doc("Task")
|
task = frappe.new_doc("Task")
|
||||||
task.project = self.name
|
task.project = self.name
|
||||||
|
|
||||||
|
if not t.task_id or self.is_row_updated(t, existing_task_data):
|
||||||
task.update({
|
task.update({
|
||||||
"subject": t.title,
|
"subject": t.title,
|
||||||
"status": t.status,
|
"status": t.status,
|
||||||
@ -103,16 +113,39 @@ class Project(Document):
|
|||||||
task.flags.ignore_links = True
|
task.flags.ignore_links = True
|
||||||
task.flags.from_project = True
|
task.flags.from_project = True
|
||||||
task.flags.ignore_feed = True
|
task.flags.ignore_feed = True
|
||||||
|
|
||||||
|
if t.task_id:
|
||||||
|
task.update({
|
||||||
|
"modified_by": frappe.session.user,
|
||||||
|
"modified": now()
|
||||||
|
})
|
||||||
|
|
||||||
|
task.validate()
|
||||||
|
task.db_update()
|
||||||
|
else:
|
||||||
task.save(ignore_permissions = True)
|
task.save(ignore_permissions = True)
|
||||||
task_names.append(task.name)
|
task_names.append(task.name)
|
||||||
|
else:
|
||||||
|
task_names.append(task.name)
|
||||||
|
|
||||||
# delete
|
# delete
|
||||||
for t in frappe.get_all("Task", ["name"], {"project": self.name, "name": ("not in", task_names)}):
|
for t in frappe.get_all("Task", ["name"], {"project": self.name, "name": ("not in", task_names)}):
|
||||||
frappe.delete_doc("Task", t.name)
|
frappe.delete_doc("Task", t.name)
|
||||||
|
|
||||||
|
def update_costing_and_percentage_complete(self):
|
||||||
self.update_percent_complete()
|
self.update_percent_complete()
|
||||||
self.update_costing()
|
self.update_costing()
|
||||||
|
|
||||||
|
def is_row_updated(self, row, existing_task_data):
|
||||||
|
if self.get("__islocal") or not existing_task_data: return True
|
||||||
|
|
||||||
|
d = existing_task_data.get(row.task_id)
|
||||||
|
|
||||||
|
if (d and (row.title != d.title or row.status != d.status
|
||||||
|
or getdate(row.start_date) != getdate(d.start_date) or getdate(row.end_date) != getdate(d.end_date)
|
||||||
|
or row.description != d.description or row.task_weight != d.task_weight)):
|
||||||
|
return True
|
||||||
|
|
||||||
def map_custom_fields(self, source, target):
|
def map_custom_fields(self, source, target):
|
||||||
project_task_custom_fields = frappe.get_all("Custom Field", {"dt": "Project Task"}, "fieldname")
|
project_task_custom_fields = frappe.get_all("Custom Field", {"dt": "Project Task"}, "fieldname")
|
||||||
|
|
||||||
@ -207,6 +240,9 @@ class Project(Document):
|
|||||||
|
|
||||||
self.total_billed_amount = total_billed_amount and total_billed_amount[0][0] or 0
|
self.total_billed_amount = total_billed_amount and total_billed_amount[0][0] or 0
|
||||||
|
|
||||||
|
def after_rename(self, old_name, new_name, merge=False):
|
||||||
|
if old_name == self.copied_from:
|
||||||
|
frappe.db.set_value('Project', new_name, 'copied_from', new_name)
|
||||||
|
|
||||||
def send_welcome_email(self):
|
def send_welcome_email(self):
|
||||||
url = get_url("/project/?name={0}".format(self.name))
|
url = get_url("/project/?name={0}".format(self.name))
|
||||||
@ -227,8 +263,7 @@ class Project(Document):
|
|||||||
user.welcome_email_sent=1
|
user.welcome_email_sent=1
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
self.load_tasks()
|
self.update_costing_and_percentage_complete()
|
||||||
self.sync_tasks()
|
|
||||||
self.update_dependencies_on_duplicated_project()
|
self.update_dependencies_on_duplicated_project()
|
||||||
|
|
||||||
def update_dependencies_on_duplicated_project(self):
|
def update_dependencies_on_duplicated_project(self):
|
||||||
@ -251,9 +286,7 @@ class Project(Document):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
name = _task.name
|
name = _task.name
|
||||||
depends_on_tasks = _task.depends_on_tasks
|
|
||||||
|
|
||||||
depends_on_tasks = [x for x in depends_on_tasks.split(',') if x]
|
|
||||||
dependency_map[task.title] = [ x['subject'] for x in frappe.get_list(
|
dependency_map[task.title] = [ x['subject'] for x in frappe.get_list(
|
||||||
'Task Depends On', {"parent": name}, ['subject'])]
|
'Task Depends On', {"parent": name}, ['subject'])]
|
||||||
|
|
||||||
@ -264,7 +297,8 @@ class Project(Document):
|
|||||||
for dt in value:
|
for dt in value:
|
||||||
dt_name = frappe.db.get_value('Task', {"subject": dt, "project": self.name })
|
dt_name = frappe.db.get_value('Task', {"subject": dt, "project": self.name })
|
||||||
task_doc.append('depends_on', {"task": dt_name})
|
task_doc.append('depends_on', {"task": dt_name})
|
||||||
task_doc.save()
|
|
||||||
|
task_doc.update_db()
|
||||||
|
|
||||||
def get_timeline_data(doctype, name):
|
def get_timeline_data(doctype, name):
|
||||||
'''Return timeline for attendance'''
|
'''Return timeline for attendance'''
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
"label": "Status",
|
"label": "Status",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Open\nWorking\nPending Review\nClosed\nCancelled",
|
"options": "Open\nWorking\nPending Review\nOverdue\nClosed\nCancelled",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -371,7 +371,7 @@
|
|||||||
"remember_last_selected_value": 1,
|
"remember_last_selected_value": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 1,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
@ -386,7 +386,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-12-19 14:49:15.886339",
|
"modified": "2018-07-05 19:34:31.204454",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Project Task",
|
"name": "Project Task",
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 1,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
@ -70,7 +70,7 @@
|
|||||||
"remember_last_selected_value": 1,
|
"remember_last_selected_value": 1,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 1,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
@ -1214,7 +1214,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 5,
|
"max_attachments": 5,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-11-10 18:37:19.660293",
|
"modified": "2018-06-26 11:46:06.678115",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Task",
|
"name": "Task",
|
||||||
|
@ -17,7 +17,7 @@ def setup(company=None, patch=True):
|
|||||||
def make_custom_fields():
|
def make_custom_fields():
|
||||||
invoice_fields = [
|
invoice_fields = [
|
||||||
dict(fieldname='vat_section', label='VAT Details', fieldtype='Section Break',
|
dict(fieldname='vat_section', label='VAT Details', fieldtype='Section Break',
|
||||||
insert_after='select_print_heading', print_hide=1, collapsible=1),
|
insert_after='group_same_items', print_hide=1, collapsible=1),
|
||||||
dict(fieldname='permit_no', label='Permit Number',
|
dict(fieldname='permit_no', label='Permit Number',
|
||||||
fieldtype='Data', insert_after='vat_section', print_hide=1),
|
fieldtype='Data', insert_after='vat_section', print_hide=1),
|
||||||
dict(fieldname='reverse_charge_applicable', label='Reverse Charge Applicable',
|
dict(fieldname='reverse_charge_applicable', label='Reverse Charge Applicable',
|
||||||
|
@ -186,7 +186,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
|||||||
return cur_frm.call({
|
return cur_frm.call({
|
||||||
method: "declare_order_lost",
|
method: "declare_order_lost",
|
||||||
doc: cur_frm.doc,
|
doc: cur_frm.doc,
|
||||||
args: args.reason,
|
args: args,
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
frappe.msgprint(__("There were errors."));
|
frappe.msgprint(__("There were errors."));
|
||||||
|
@ -1076,7 +1076,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -2911,7 +2911,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2018-05-28 03:23:15.354674",
|
"modified": "2018-07-06 03:23:15.354674",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Quotation",
|
"name": "Quotation",
|
||||||
|
@ -70,10 +70,10 @@ class Quotation(SellingController):
|
|||||||
opp.status = None
|
opp.status = None
|
||||||
opp.set_status(update=True)
|
opp.set_status(update=True)
|
||||||
|
|
||||||
def declare_order_lost(self, arg):
|
def declare_order_lost(self, reason):
|
||||||
if not self.has_sales_order():
|
if not self.has_sales_order():
|
||||||
frappe.db.set(self, 'status', 'Lost')
|
frappe.db.set(self, 'status', 'Lost')
|
||||||
frappe.db.set(self, 'order_lost_reason', arg)
|
frappe.db.set(self, 'order_lost_reason', reason)
|
||||||
self.update_opportunity()
|
self.update_opportunity()
|
||||||
self.update_lead()
|
self.update_lead()
|
||||||
else:
|
else:
|
||||||
|
@ -1131,7 +1131,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -3529,7 +3529,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-01-12 15:56:12.483019",
|
"modified": "2018-07-06 15:56:12.483019",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order",
|
"name": "Sales Order",
|
||||||
|
@ -1253,7 +1253,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -3731,7 +3731,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2018-05-28 03:03:35.035396",
|
"modified": "2018-07-06 03:03:35.035396",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Delivery Note",
|
"name": "Delivery Note",
|
||||||
|
@ -294,7 +294,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -716,7 +716,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-10-05 18:24:17.148782",
|
"modified": "2018-07-06 18:24:17.148782",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Material Request",
|
"name": "Material Request",
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
|
from erpnext.controllers.print_settings import print_settings_for_item_table
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class MaterialRequestItem(Document):
|
class MaterialRequestItem(Document):
|
||||||
pass
|
def __setup__(self):
|
||||||
|
print_settings_for_item_table(self)
|
||||||
|
|
||||||
def on_doctype_update():
|
def on_doctype_update():
|
||||||
frappe.db.add_index("Material Request Item", ["item_code", "warehouse"])
|
frappe.db.add_index("Material Request Item", ["item_code", "warehouse"])
|
@ -1038,7 +1038,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 1,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -3301,7 +3301,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2018-05-28 02:59:59.609643",
|
"modified": "2018-07-06 02:59:59.609643",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Purchase Receipt",
|
"name": "Purchase Receipt",
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<div class="row transaction-subheading">
|
<div class="row transaction-subheading">
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<span class="indicator {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
|
<span class="indicator {{ doc.indicator_color or ("blue" if doc.docstatus==1 else "darkgrey") }}">
|
||||||
{{ _(doc.indicator_title) or _(doc.status) or _("Submitted") }}
|
{{ _(doc.get("status")) or _(doc.get("indicator_title")) or _("Submitted") }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 text-muted text-right small">
|
<div class="col-xs-6 text-muted text-right small">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user