Merge branch 'develop' into cancel_frappe_1

This commit is contained in:
Suraj Shetty 2020-01-13 15:08:23 +05:30 committed by GitHub
commit 06ed72a859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -90,7 +90,6 @@
"fieldtype": "Column Break" "fieldtype": "Column Break"
}, },
{ {
"default": "Customer",
"fieldname": "party_type", "fieldname": "party_type",
"fieldtype": "Link", "fieldtype": "Link",
"in_list_view": 1, "in_list_view": 1,
@ -272,7 +271,7 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2019-10-02 12:23:21.693443", "modified": "2020-01-13 12:41:33.968025",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Journal Entry Account", "name": "Journal Entry Account",

View File

@ -132,6 +132,7 @@ class Asset(AccountsController):
if len(movements) > 1: if len(movements) > 1:
frappe.throw(_('Asset has multiple Asset Movement Entries which has to be \ frappe.throw(_('Asset has multiple Asset Movement Entries which has to be \
cancelled manually to cancel this asset.')) cancelled manually to cancel this asset.'))
if movements:
movement = frappe.get_doc('Asset Movement', movements[0].get('name')) movement = frappe.get_doc('Asset Movement', movements[0].get('name'))
movement.flags.ignore_validate = True movement.flags.ignore_validate = True
movement.cancel() movement.cancel()