diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-11-26 14:18:22 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-11-26 14:18:22 +0700 |
| commit | 75a1c83707d1c078e3e200e7bc3d3ca39497ad1c (patch) | |
| tree | 2dea9983826ae975202cf9dd2bca1c0a83f9d146 | |
| parent | 23c04baabdfe5df35d4aea2849004f86b285ce32 (diff) | |
fix typo and add some comment
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 10 |
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) |
