summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
-rwxr-xr-xindoteknik_custom/models/product_template.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index ba8fac55..4bab2cad 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -349,6 +349,11 @@ class ProductProduct(models.Model):
sla_version = fields.Integer(string="SLA Version", default=0)
is_edited = fields.Boolean(string='Is Edited')
qty_sold = fields.Float(string='Sold Quantity', compute='_get_qty_sold')
+
+ def _get_po_suggest(self, qty_purchase):
+ if self.qty_available_bandengan < qty_purchase:
+ return 'harus beli'
+ return 'masih cukup'
def _get_qty_upcoming(self):
for product in self: