diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-03-26 13:50:27 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-03-26 13:50:27 +0700 |
| commit | 935393a6a58b3df18f3361b36a6ea60647cd8be4 (patch) | |
| tree | e4ec9d300aff98a38a8524c209a19f970aa24f23 /indoteknik_custom/models/product_template.py | |
| parent | db1780524b1e153338ced116f786b4d712d66aca (diff) | |
| parent | b2377426bec8aa334277aac48b0b25f0dfac420f (diff) | |
Merge branch 'purchasing-job' into production
# Conflicts:
# indoteknik_custom/models/__init__.py
# indoteknik_custom/models/sale_order.py
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 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: |
