summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/product_template.py10
-rwxr-xr-xindoteknik_custom/security/ir.model.access.csv1
2 files changed, 5 insertions, 6 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index 8d044695..fe459ee3 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -511,9 +511,9 @@ class ProductProduct(models.Model):
('product_id', '=', product.id),
('location_id', 'in', [57, 83]),
],
- fields=['qty_reserved'],
+ fields=['qty_need'],
groupby=[]
- )[0].get('qty_reserved', 0.0)
+ )[0].get('qty_need', 0.0)
product.qty_outgoing_bandengan = qty
def _get_qty_onhand_bandengan(self):
@@ -614,7 +614,6 @@ class OutstandingMove(models.Model):
product_id = fields.Many2one('product.product', string='Product')
reference = fields.Char(string='Reference', help='Nomor Dokumen terkait')
qty_need = fields.Float(string='Qty Need', help='Qty yang akan outgoing / incoming')
- qty_reserved = fields.Float(string='Qty Reserved', help='Qty yang sudah ter-reserved jika outgoing')
location_id = fields.Many2one('stock.location', string='Location', help='Lokasi asal')
location_dest_id = fields.Many2one('stock.location', string='Location To', help='Lokasi tujuan')
@@ -623,11 +622,10 @@ class OutstandingMove(models.Model):
tools.drop_view_if_exists(self.env.cr, self._table)
self.env.cr.execute("""
CREATE OR REPLACE VIEW %s AS
- select sml.id, sm.reference, sm.product_id,
- sm.product_uom_qty as qty_need, sml.product_uom_qty as qty_reserved,
+ select sm.id, sm.reference, sm.product_id,
+ sm.product_uom_qty as qty_need,
sm.location_id, sm.location_dest_id
from stock_move sm
- join stock_move_line sml on sml.move_id = sm.id
where 1=1
and sm.state in(
'waiting',
diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv
index e817a28d..7b5338d8 100755
--- a/indoteknik_custom/security/ir.model.access.csv
+++ b/indoteknik_custom/security/ir.model.access.csv
@@ -146,3 +146,4 @@ access_web_find_page,access.web.find.page,model_web_find_page,,1,1,1,1
access_v_requisition_match_po,access.v.requisition.match.po,model_v_requisition_match_po,,1,1,1,1
access_approval_retur_picking,access.approval.retur.picking,model_approval_retur_picking,,1,1,1,1
access_sales_order_fulfillment_v2,access.sales.order.fulfillment.v2,model_sales_order_fulfillment_v2,,1,1,1,1
+access_v_move_outstanding,access.v.move.outstanding,model_v_move_outstanding,,1,1,1,1