Merge branch 'develop' into cancel_frappe_1
This commit is contained in:
commit
06ed72a859
@ -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",
|
||||||
|
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user