Merge pull request #13850 from netchampfaris/msgprint-to-alert

Change msgprint to alert
This commit is contained in:
Prateeksha Singh 2018-05-01 18:52:49 +05:30 committed by GitHub
commit 99be9d17d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -125,7 +125,7 @@ class JournalEntry(AccountsController):
if (d.party_type == 'Customer' and flt(d.credit) > 0) or \ if (d.party_type == 'Customer' and flt(d.credit) > 0) or \
(d.party_type == 'Supplier' and flt(d.debit) > 0): (d.party_type == 'Supplier' and flt(d.debit) > 0):
if d.is_advance=="No": if d.is_advance=="No":
msgprint(_("Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.").format(d.idx, d.account)) msgprint(_("Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.").format(d.idx, d.account), alert=1)
elif d.reference_type in ("Sales Order", "Purchase Order") and d.is_advance != "Yes": elif d.reference_type in ("Sales Order", "Purchase Order") and d.is_advance != "Yes":
frappe.throw(_("Row {0}: Payment against Sales/Purchase Order should always be marked as advance").format(d.idx)) frappe.throw(_("Row {0}: Payment against Sales/Purchase Order should always be marked as advance").format(d.idx))

View File

@ -524,7 +524,7 @@ def get_item_details(item, project = None):
if not res["bom_no"]: if not res["bom_no"]:
if project: if project:
res = get_item_details(item) res = get_item_details(item)
frappe.msgprint(_("Default BOM not found for Item {0} and Project {1}").format(item, project)) frappe.msgprint(_("Default BOM not found for Item {0} and Project {1}").format(item, project), alert=1)
else: else:
frappe.throw(_("Default BOM for {0} not found").format(item)) frappe.throw(_("Default BOM for {0} not found").format(item))