diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-06-12 08:22:10 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-06-12 08:22:10 +0700 |
| commit | 1f2995a85428ac4335123bd33d48ae17d3c9f36f (patch) | |
| tree | 42d8558ac317fcb3b158b52fe01205c35b885c64 /indoteknik_custom/models/ir_attachment.py | |
| parent | db7481a490b87e3a1768112395bf096b93969562 (diff) | |
Update promotion program feature
Diffstat (limited to 'indoteknik_custom/models/ir_attachment.py')
| -rw-r--r-- | indoteknik_custom/models/ir_attachment.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/ir_attachment.py b/indoteknik_custom/models/ir_attachment.py index fd86ab1b..6417fa3f 100644 --- a/indoteknik_custom/models/ir_attachment.py +++ b/indoteknik_custom/models/ir_attachment.py @@ -22,4 +22,9 @@ class Attachment(models.Model): def api_image(self, model, field, id): base_url = self.env['ir.config_parameter'].get_param('web.base.url') is_found = self.is_found(model, field, id) + return base_url + 'api/image/' + model + '/' + field + '/' + str(id) if is_found else '' + + def api_image_local(self, model, field, id): + base_url = self.env['ir.config_parameter'].get_param('web.base.local_url') + is_found = self.is_found(model, field, id) return base_url + 'api/image/' + model + '/' + field + '/' + str(id) if is_found else ''
\ No newline at end of file |
