Merge branch 'develop' into co
This commit is contained in:
commit
ebda4d67bd
23
.github/workflows/backport.yml
vendored
23
.github/workflows/backport.yml
vendored
@ -1,16 +1,25 @@
|
|||||||
name: Backport
|
name: Backport
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
types:
|
types:
|
||||||
- closed
|
- closed
|
||||||
- labeled
|
- labeled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backport:
|
main:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
name: Backport
|
|
||||||
steps:
|
steps:
|
||||||
- name: Backport
|
- name: Checkout Actions
|
||||||
uses: tibdex/backport@v1
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
repository: "ankush/backport"
|
||||||
|
path: ./actions
|
||||||
|
ref: develop
|
||||||
|
- name: Install Actions
|
||||||
|
run: npm install --production --prefix ./actions
|
||||||
|
- name: Run backport
|
||||||
|
uses: ./actions/backport
|
||||||
|
with:
|
||||||
|
token: ${{secrets.BACKPORT_BOT_TOKEN}}
|
||||||
|
labelsToAdd: "backport"
|
||||||
|
title: "{{originalTitle}}"
|
||||||
|
@ -25,7 +25,8 @@ doctype_js = {
|
|||||||
"Address": "public/js/address.js",
|
"Address": "public/js/address.js",
|
||||||
"Communication": "public/js/communication.js",
|
"Communication": "public/js/communication.js",
|
||||||
"Event": "public/js/event.js",
|
"Event": "public/js/event.js",
|
||||||
"Newsletter": "public/js/newsletter.js"
|
"Newsletter": "public/js/newsletter.js",
|
||||||
|
"Contact": "public/js/contact.js"
|
||||||
}
|
}
|
||||||
|
|
||||||
override_doctype_class = {
|
override_doctype_class = {
|
||||||
|
@ -774,7 +774,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite
|
|||||||
item.image,
|
item.image,
|
||||||
bom.project,
|
bom.project,
|
||||||
bom_item.rate,
|
bom_item.rate,
|
||||||
bom_item.amount,
|
sum(bom_item.{qty_field}/ifnull(bom.quantity, 1)) * bom_item.rate * %(qty)s as amount,
|
||||||
item.stock_uom,
|
item.stock_uom,
|
||||||
item.item_group,
|
item.item_group,
|
||||||
item.allow_alternative_item,
|
item.allow_alternative_item,
|
||||||
|
@ -487,21 +487,20 @@ class WorkOrder(Document):
|
|||||||
return
|
return
|
||||||
|
|
||||||
operations = []
|
operations = []
|
||||||
if not self.use_multi_level_bom:
|
|
||||||
bom_qty = frappe.db.get_value("BOM", self.bom_no, "quantity")
|
if self.use_multi_level_bom:
|
||||||
operations.extend(_get_operations(self.bom_no, qty=1.0/bom_qty))
|
|
||||||
else:
|
|
||||||
bom_tree = frappe.get_doc("BOM", self.bom_no).get_tree_representation()
|
bom_tree = frappe.get_doc("BOM", self.bom_no).get_tree_representation()
|
||||||
bom_traversal = list(reversed(bom_tree.level_order_traversal()))
|
bom_traversal = reversed(bom_tree.level_order_traversal())
|
||||||
bom_traversal.append(bom_tree) # add operation on top level item last
|
|
||||||
|
|
||||||
for d in bom_traversal:
|
for node in bom_traversal:
|
||||||
if d.is_bom:
|
if node.is_bom:
|
||||||
operations.extend(_get_operations(d.name, qty=d.exploded_qty))
|
operations.extend(_get_operations(node.name, qty=node.exploded_qty))
|
||||||
|
|
||||||
for correct_index, operation in enumerate(operations, start=1):
|
bom_qty = frappe.db.get_value("BOM", self.bom_no, "quantity")
|
||||||
operation.idx = correct_index
|
operations.extend(_get_operations(self.bom_no, qty=1.0/bom_qty))
|
||||||
|
|
||||||
|
for correct_index, operation in enumerate(operations, start=1):
|
||||||
|
operation.idx = correct_index
|
||||||
|
|
||||||
self.set('operations', operations)
|
self.set('operations', operations)
|
||||||
self.calculate_time()
|
self.calculate_time()
|
||||||
@ -656,7 +655,7 @@ class WorkOrder(Document):
|
|||||||
for item in sorted(item_dict.values(), key=lambda d: d['idx'] or 9999):
|
for item in sorted(item_dict.values(), key=lambda d: d['idx'] or 9999):
|
||||||
self.append('required_items', {
|
self.append('required_items', {
|
||||||
'rate': item.rate,
|
'rate': item.rate,
|
||||||
'amount': item.amount,
|
'amount': item.rate * item.qty,
|
||||||
'operation': item.operation or operation,
|
'operation': item.operation or operation,
|
||||||
'item_code': item.item_code,
|
'item_code': item.item_code,
|
||||||
'item_name': item.item_name,
|
'item_name': item.item_name,
|
||||||
|
@ -296,3 +296,4 @@ erpnext.patches.v13_0.update_job_card_details
|
|||||||
erpnext.patches.v13_0.update_level_in_bom #1234sswef
|
erpnext.patches.v13_0.update_level_in_bom #1234sswef
|
||||||
erpnext.patches.v13_0.add_missing_fg_item_for_stock_entry
|
erpnext.patches.v13_0.add_missing_fg_item_for_stock_entry
|
||||||
erpnext.patches.v13_0.update_subscription_status_in_memberships
|
erpnext.patches.v13_0.update_subscription_status_in_memberships
|
||||||
|
erpnext.patches.v13_0.update_amt_in_work_order_required_items
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
""" Correct amount in child table of required items table."""
|
||||||
|
|
||||||
|
frappe.reload_doc("manufacturing", "doctype", "work_order")
|
||||||
|
frappe.reload_doc("manufacturing", "doctype", "work_order_item")
|
||||||
|
|
||||||
|
frappe.db.sql("""UPDATE `tabWork Order Item` SET amount = rate * required_qty""")
|
||||||
|
|
16
erpnext/public/js/contact.js
Normal file
16
erpnext/public/js/contact.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
frappe.ui.form.on("Contact", {
|
||||||
|
refresh(frm) {
|
||||||
|
frm.set_query('link_doctype', "links", function() {
|
||||||
|
return {
|
||||||
|
query: "frappe.contacts.address_and_contact.filter_dynamic_link_doctypes",
|
||||||
|
filters: {
|
||||||
|
fieldtype: ["in", ["HTML", "Text Editor"]],
|
||||||
|
fieldname: ["in", ["contact_html", "company_description"]],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
frm.refresh_field("links");
|
||||||
|
}
|
||||||
|
});
|
@ -84,7 +84,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
|
|||||||
this.manipulate_grand_total_for_inclusive_tax();
|
this.manipulate_grand_total_for_inclusive_tax();
|
||||||
this.calculate_totals();
|
this.calculate_totals();
|
||||||
this._cleanup();
|
this._cleanup();
|
||||||
},
|
}
|
||||||
|
|
||||||
validate_conversion_rate() {
|
validate_conversion_rate() {
|
||||||
this.frm.doc.conversion_rate = flt(this.frm.doc.conversion_rate, (cur_frm) ? precision("conversion_rate") : 9);
|
this.frm.doc.conversion_rate = flt(this.frm.doc.conversion_rate, (cur_frm) ? precision("conversion_rate") : 9);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user