summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/product_template.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index 3642c0d7..df131ff6 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -616,7 +616,7 @@ class ProductProduct(models.Model):
class OutstandingMove(models.Model):
- _name = 'v.move.oustanding'
+ _name = 'v.move.outstanding'
_auto = False
_rec_name = 'id'
@@ -627,6 +627,7 @@ class OutstandingMove(models.Model):
qty_reserved = fields.Float(string='Qty Reserved', help='Qty yang sudah ter-reserved jika outgoing')
def init(self):
+ # where clause 'state in' follow the origin of outgoing and incoming odoo
tools.drop_view_if_exists(self.env.cr, self._table)
self.env.cr.execute("""
CREATE OR REPLACE VIEW %s AS
@@ -635,5 +636,10 @@ class OutstandingMove(models.Model):
from stock_move sm
join stock_move_line sml on sml.move_id = sm.id
where 1=1
- and sm.state not in('done', 'cancel', 'draft')
+ and sm.state in(
+ 'waiting',
+ 'confirmed',
+ 'assigned',
+ 'partially_available'
+ )
""" % self._table)