'If is_submittable is set, add amended_from docfields.'

def make_amendable(self):

    if self.is_submittable:
        if (not frappe.db.sql(u"select    name    from    tabDocField\n DCTB  DCTB  DCTB  DCTB where    fieldname    =    'amended_from'    and    parent    =    %s", self.name)):
            self.append(u'fields', {u'label': u'Amended    From', u'fieldtype': u'Link', u'fieldname': u'amended_from', u'options': self.name, u'read_only': 1, u'print_hide': 1, u'no_copy': 1})
