summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-11-13 13:30:48 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-11-13 13:30:48 +0700
commit2bfd68b9145f064f1e231a2d674ea9faa39e1456 (patch)
treedafee4c214bafd395ba4a5651f77dbd4880b23f8 /indoteknik_custom/models
parent001002a2c56d241cf2340155683f43a8c62ac7b6 (diff)
parentc4e07cfcd682f5f22a1337571fa96bb60ea39c16 (diff)
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/sale_order.py9
-rw-r--r--indoteknik_custom/models/sales_order_fullfillment.py17
2 files changed, 22 insertions, 4 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index a0d70059..75332996 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -11,6 +11,7 @@ _logger = logging.getLogger(__name__)
class SaleOrder(models.Model):
_inherit = "sale.order"
+ fulfillment_line_v2 = fields.One2many('sales.order.fulfillment.v2', 'sale_order_id', string='Fullfillment2')
fullfillment_line = fields.One2many('sales.order.fullfillment', 'sales_order_id', string='Fullfillment')
reject_line = fields.One2many('sales.order.reject', 'sale_order_id', string='Reject Lines')
order_sales_match_line = fields.One2many('sales.order.purchase.match', 'sales_order_id', string='Purchase Match Lines', states={'cancel': [('readonly', True)], 'done': [('readonly', True)]}, copy=True)
@@ -346,10 +347,10 @@ class SaleOrder(models.Model):
def _compute_fullfillment(self):
for rec in self:
- rec.fullfillment_line.unlink()
-
- for line in rec.order_line:
- line._compute_reserved_from()
+ # rec.fullfillment_line.unlink()
+ #
+ # for line in rec.order_line:
+ # line._compute_reserved_from()
rec.compute_fullfillment = True
diff --git a/indoteknik_custom/models/sales_order_fullfillment.py b/indoteknik_custom/models/sales_order_fullfillment.py
index ab416e8d..42544c15 100644
--- a/indoteknik_custom/models/sales_order_fullfillment.py
+++ b/indoteknik_custom/models/sales_order_fullfillment.py
@@ -6,6 +6,23 @@ import logging
_logger = logging.getLogger(__name__)
+class SalesOrderFullfillmentV2(models.Model):
+ _name = 'sales.order.fulfillment.v2'
+
+ sale_order_id = fields.Many2one('sale.order', string='Sale Order')
+ sale_order_line_id = fields.Many2one('sale.order.line', string='Sale Order Line')
+ picking_id = fields.Many2one('stock.picking', string='Picking')
+ move_id = fields.Many2one('stock.move', string='Move')
+ move_line_id = fields.Many2one('stock.move.line', string='Move Line')
+ product_id = fields.Many2one('product.product', string='Product')
+ so_qty = fields.Float(string='SO Qty')
+ reserved_stock_qty = fields.Float(string='Reserved Stock Qty', help='Sudah ter-reserved oleh sistem')
+ delivered_qty = fields.Float(string='Delivered Qty', help='Yang sudah terkirim ke Customer')
+ po_ids = fields.Many2many('purchase.order', string='Purchase Order', help='PO yang dibuat, bisa lebih dari satu')
+ po_qty = fields.Float(string='PO Qty', help='Totalan dari semua PO Outstanding')
+ received_qty = fields.Float(string='Received Qty', help='Totalan dari barang yang diterima dari PO tsb')
+
+
class SalesOrderFullfillment(models.Model):
_name = 'sales.order.fullfillment'