Update file init_test.py
This commit is contained in:
@@ -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...")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user