Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v13 #36178

Merged
merged 9 commits into from
Jul 18, 2023
38 changes: 38 additions & 0 deletions .github/workflows/release_notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This action:
#
# 1. Generates release notes using github API.
# 2. Strips unnecessary info like chore/style etc from notes.
# 3. Updates release info.

# This action needs to be maintained on all branches that do releases.

name: 'Release Notes'

on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag of release like v13.0.0'
required: true
type: string
release:
types: [released]

permissions:
contents: read

jobs:
regen-notes:
name: 'Regenerate release notes'
runs-on: ubuntu-latest

steps:
- name: Update notes
run: |
NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/generate-notes -f tag_name=$RELEASE_TAG | jq -r '.body' | sed -E '/^\* (chore|ci|test|docs|style)/d' )
RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/tags/$RELEASE_TAG | jq -r '.id')
gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/$RELEASE_ID -f body="$NEW_NOTES"
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }}
9 changes: 9 additions & 0 deletions erpnext/accounts/doctype/journal_entry/journal_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,15 @@ def validate_party(self):
d.idx, d.account
)
)
elif (
d.party_type
and frappe.db.get_value("Party Type", d.party_type, "account_type") != account_type
):
frappe.throw(
_("Row {0}: Account {1} and Party Type {2} have different account types").format(
d.idx, d.account, d.party_type
)
)

def check_credit_limit(self):
customers = list(
Expand Down
2 changes: 1 addition & 1 deletion erpnext/assets/doctype/asset_movement/asset_movement.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ frappe.ui.form.on('Asset Movement', {
fieldnames_to_be_altered = {
target_location: { read_only: 0, reqd: 1 },
source_location: { read_only: 1, reqd: 0 },
from_employee: { read_only: 0, reqd: 1 },
from_employee: { read_only: 0, reqd: 0 },
to_employee: { read_only: 1, reqd: 0 }
};
}
Expand Down
32 changes: 11 additions & 21 deletions erpnext/assets/doctype/asset_movement/asset_movement.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,20 @@ def validate_location(self):
frappe.throw(_("Source and Target Location cannot be same"))

if self.purpose == "Receipt":
# only when asset is bought and first entry is made
if not d.source_location and not (d.target_location or d.to_employee):
if not (d.source_location or d.from_employee) and not (d.target_location or d.to_employee):
frappe.throw(
_("Target Location or To Employee is required while receiving Asset {0}").format(d.asset)
)
elif d.source_location:
# when asset is received from an employee
if d.target_location and not d.from_employee:
frappe.throw(
_("From employee is required while receiving Asset {0} to a target location").format(
d.asset
)
)
if d.from_employee and not d.target_location:
frappe.throw(
_("Target Location is required while receiving Asset {0} from an employee").format(d.asset)
)
if d.to_employee and d.target_location:
frappe.throw(
_(
"Asset {0} cannot be received at a location and \
given to employee in a single movement"
).format(d.asset)
)
elif d.from_employee and not d.target_location:
frappe.throw(
_("Target Location is required while receiving Asset {0} from an employee").format(d.asset)
)
elif d.to_employee and d.target_location:
frappe.throw(
_(
"Asset {0} cannot be received at a location and given to an employee in a single movement"
).format(d.asset)
)

def validate_employee(self):
for d in self.assets:
Expand Down
2 changes: 1 addition & 1 deletion erpnext/public/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,14 +566,14 @@ erpnext.utils.update_child_items = function(opts) {
fields.splice(3, 0, {
fieldtype: 'Float',
fieldname: "conversion_factor",
in_list_view: 1,
label: __("Conversion Factor"),
precision: get_precision('conversion_factor')
})
}

new frappe.ui.Dialog({
title: __("Update Items"),
size: "extra-large",
fields: [
{
fieldname: "trans_items",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def execute(filters=None):
"gst_category",
"export_type",
"ecommerce_gstin",
"`tabPurchase Invoice Item`.gst_hsn_code",
"gst_hsn_code",
"bill_no",
"bill_date",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def execute(filters=None):
"gst_category",
"export_type",
"ecommerce_gstin",
"`tabSales Invoice Item`.gst_hsn_code",
"gst_hsn_code",
]

additional_conditions = get_conditions(filters, additional_query_columns)
Expand Down
5 changes: 3 additions & 2 deletions erpnext/stock/doctype/item/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled"
"label": "Disabled",
"search_index": 1
},
{
"default": "0",
Expand Down Expand Up @@ -956,7 +957,7 @@
"index_web_pages_for_search": 1,
"links": [],
"make_attachments_public": 1,
"modified": "2022-09-13 04:08:17.431731",
"modified": "2023-07-14 17:18:18.658942",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item",
Expand Down
Loading