summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/ir_attachment.py5
-rw-r--r--indoteknik_custom/models/promotion_program_line.py2
2 files changed, 6 insertions, 1 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
diff --git a/indoteknik_custom/models/promotion_program_line.py b/indoteknik_custom/models/promotion_program_line.py
index a8ee2c43..b6c9a532 100644
--- a/indoteknik_custom/models/promotion_program_line.py
+++ b/indoteknik_custom/models/promotion_program_line.py
@@ -16,7 +16,7 @@ class PromotionProgramLine(models.Model):
], string="Discount Type")
discount_amount = fields.Float(string="Discount Amount")
promotion_type = fields.Selection(selection=[
- ("specific_product", "Specific Product"),
+ ("special_price", "Special Price"),
("bundling", "Bundling"),
("discount_loading", "Discount Loading"),
("merchandise", "Merchandise")