summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-07-22 11:12:14 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-07-22 11:12:14 +0700
commit2a1179b22cd1b8ee9e3e31c157821dbbeb66195f (patch)
tree89f85127c41b13c95db04725771ed7f78a379798 /indoteknik_custom/models
parentf4c02f0ca17c0c72314334c03417c2f54382dfa1 (diff)
fix bug api product sla stock vendor
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/stock_vendor.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/indoteknik_custom/models/stock_vendor.py b/indoteknik_custom/models/stock_vendor.py
index e72748c3..dcbeb399 100755
--- a/indoteknik_custom/models/stock_vendor.py
+++ b/indoteknik_custom/models/stock_vendor.py
@@ -17,12 +17,10 @@ class StockVendor(models.Model):
('done', 'Done')
], string="Cache Reset")
- @api.model
- def get_stock_updated_last_7_days(self, id):
+ def get_stock_updated_last_7_days(self):
date_7_days_ago = datetime.now() - timedelta(days=7)
stocks = self.search([
- ('product_variant_id', '=', id),
('write_date', '>=', date_7_days_ago.strftime("%Y-%m-%d %H:%M:%S"))
], limit=1)