Exemplo n.º 1
0
    def validate(self):
        self.update_status()
        self.validate_reference_doctype()
        self.validate_dates()
        self.validate_next_schedule_date()
        self.validate_email_id()
        self.link_party()

        validate_template(self.subject or "")
        validate_template(self.message or "")
Exemplo n.º 2
0
	def validate(self):
		validate_template(self.subject)
		validate_template(self.message)

		if self.event in ("Days Before", "Days After") and not self.date_changed:
			dataent.throw(_("Please specify which date field must be checked"))

		if self.event=="Value Change" and not self.value_changed:
			dataent.throw(_("Please specify which value field must be checked"))

		self.validate_forbidden_types()
		self.validate_condition()
		self.validate_standard()
		dataent.cache().hdel('notifications', self.document_type)
Exemplo n.º 3
0
    def validate(self):
        if not self.template:
            self.template = get_default_address_template()

        self.defaults = dataent.db.get_values("Address Template", {
            "is_default": 1,
            "name": ("!=", self.name)
        })
        if not self.is_default:
            if not self.defaults:
                self.is_default = 1
                if cint(
                        dataent.db.get_single_value('System Settings',
                                                    'setup_complete')):
                    dataent.msgprint(
                        _("Setting this Address Template as default as there is no other default"
                          ))

        validate_template(self.template)
Exemplo n.º 4
0
    def validate(self):
        if (self.standard == "Yes"
                and not dataent.local.conf.get("developer_mode")
                and not (dataent.flags.in_import or dataent.flags.in_test)):

            dataent.throw(dataent._("Standard Print Format cannot be updated"))

        # old_doc_type is required for clearing item cache
        self.old_doc_type = dataent.db.get_value('Print Format', self.name,
                                                 'doc_type')

        self.extract_images()

        if not self.module:
            self.module = dataent.db.get_value('DocType', self.doc_type,
                                               'module')

        if self.html and self.print_format_type != 'Js':
            validate_template(self.html)
Exemplo n.º 5
0
 def validate(self):
     if self.terms:
         validate_template(self.terms)
Exemplo n.º 6
0
	def validate(self):
		validate_template(self.response)
Exemplo n.º 7
0
 def validate(self):
     dataent.cache().delete_value('feedback_triggers')
     validate_template(self.subject)
     validate_template(self.message)
     self.validate_condition()