diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-12-22 13:35:26 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-12-22 13:35:26 +0700 |
| commit | 8a10587c8582ed68944634928c9a7c34d3321dbe (patch) | |
| tree | 99d93c45df499d9701e2f31d995d5b7160a34a2f /indoteknik_custom/models/product_template.py | |
| parent | fbb11ab07e66b28459375af175459c3a23148597 (diff) | |
matches so on po and matches po on so
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 5 |
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: |
