summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-11-07 15:59:57 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-11-07 15:59:57 +0700
commitf787f06a341f1775151d98be4490fe6126c511cd (patch)
tree049ae9c6319f5469c0a3d48f2fb564d085809c65 /indoteknik_custom/models/product_template.py
parent8b54606ef925ff2e6feb2794aabaafa4864e6961 (diff)
excelude incoming
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
-rwxr-xr-xindoteknik_custom/models/product_template.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index 35844c22..d3343e75 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -466,6 +466,16 @@ class ProductProduct(models.Model):
qty = sum(qty_incoming.mapped('product_uom_qty'))
product.qty_incoming_bandengan = qty
+ def _get_qty_incoming_bandengan_with_exclude(self):
+ for product in self:
+ qty_incoming = self.env['stock.move'].search([
+ ('product_id', '=', product.id),
+ ('location_dest_id', 'in', [57, 83]),
+ ('state', 'not in', ['done', 'cancel'])
+ ])
+ qty = sum(qty_incoming.mapped('product_uom_qty'))
+ product.qty_incoming_bandengan = qty
+
def _get_qty_outgoing_bandengan(self):
for product in self:
qty_incoming = self.env['stock.move'].search([
@@ -505,8 +515,6 @@ class ProductProduct(models.Model):
product.max_qty_reorder = 0
else:
product.max_qty_reorder = reordering.product_max_qty
- test = reordering.product_max_qty
- print(test)
def _get_plafon_qty_product(self):
for product in self: