fix in purchase order validate currency's error messages, production order's produced qty field marked as no copy
This commit is contained in:
parent
3b091418ec
commit
e012f06452
@ -407,9 +407,21 @@ class DocType(TransactionBase):
|
||||
if not default_currency:
|
||||
msgprint('Message: Please enter default currency in Company Master')
|
||||
raise Exception
|
||||
if (obj.doc.currency == default_currency and flt(obj.doc.conversion_rate) != 1.00) or not obj.doc.conversion_rate or (obj.doc.currency != default_currency and flt(obj.doc.conversion_rate) == 1.00):
|
||||
msgprint("Message: Please Enter Appropriate Conversion Rate.")
|
||||
raise Exception
|
||||
|
||||
if obj.doc.conversion_rate == 0:
|
||||
msgprint('Conversion Rate cannot be 0', raise_exception=1)
|
||||
elif not obj.doc.conversion_rate:
|
||||
msgprint('Please specify Conversion Rate', raise_exception=1)
|
||||
elif obj.doc.currency == default_currency and \
|
||||
flt(obj.doc.conversion_rate) != 1.00:
|
||||
msgprint("""Conversion Rate should be equal to 1.00, \
|
||||
since the specified Currency and the company's currency \
|
||||
are same""", raise_exception=1)
|
||||
elif obj.doc.currency != default_currency and \
|
||||
flt(obj.doc.conversion_rate) == 1.00:
|
||||
msgprint("""Conversion Rate should not be equal to 1.00, \
|
||||
since the specified Currency and the company's currency \
|
||||
are different""", raise_exception=1)
|
||||
|
||||
def validate_doc(self, obj, prevdoc_doctype, prevdoc_docname):
|
||||
if prevdoc_docname :
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-27 14:36:05',
|
||||
'creation': '2012-05-15 12:14:48',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-27 14:45:50',
|
||||
'modified': '2012-05-28 19:03:56',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -23,7 +23,7 @@
|
||||
'section_style': u'Tabbed',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 190
|
||||
'version': 1
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -323,6 +323,7 @@
|
||||
'fieldname': u'produced_qty',
|
||||
'fieldtype': u'Currency',
|
||||
'label': u'Produced Qty',
|
||||
'no_copy': 1,
|
||||
'oldfieldname': u'produced_qty',
|
||||
'oldfieldtype': u'Currency',
|
||||
'permlevel': 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user