Update file init_test.py

This commit is contained in:
2023-11-06 09:58:23 +00:00
parent cbe118244d
commit 4e943dd168

View File

@@ -18,25 +18,12 @@ class CustomModel(models.Model):
html_field = fields.Html('HTML Field')
external_content = fields.Text('Externe Inhoud')
raise UserError(external_content)
def get_external_content():
response = requests.get('http://localhost:8025')
return response.text
record = self.search([('id', '<', 2)])
record.write({'external_content': external_content})
external_content = get_external_content()
#self.write({'external_content': external_content})
#raise ValidationError(external_content)
# @api.model
# def action_refresh_mailhog(self):
# external_content = get_external_content()
# self.write({'external_content': external_content})
# raise ValidationError("De Actie action_refresh_mailhog is uitgevoerd...")