From 75a1c83707d1c078e3e200e7bc3d3ca39497ad1c Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 26 Nov 2024 14:18:22 +0700 Subject: fix typo and add some comment --- indoteknik_custom/models/product_template.py | 10 ++++++++-- 1 file 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) -- cgit v1.2.3