summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-12-22 13:35:26 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-12-22 13:35:26 +0700
commit8a10587c8582ed68944634928c9a7c34d3321dbe (patch)
tree99d93c45df499d9701e2f31d995d5b7160a34a2f /indoteknik_custom/models/product_template.py
parentfbb11ab07e66b28459375af175459c3a23148597 (diff)
matches so on po and matches po on so
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 34aff4fa..7ec5a002 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -347,6 +347,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: