From 8a10587c8582ed68944634928c9a7c34d3321dbe Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Fri, 22 Dec 2023 13:35:26 +0700 Subject: matches so on po and matches po on so --- indoteknik_custom/models/product_template.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indoteknik_custom/models/product_template.py') 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: -- cgit v1.2.3