diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-11-13 09:04:27 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-11-13 09:04:27 +0700 |
| commit | b44f26591a67b1a33132bcbcb9190920eb52e6f3 (patch) | |
| tree | ed0714446391fa55a2687e992c3991cb15ee105b /indoteknik_custom/models | |
| parent | a3c057d4ddf660ce1214b55c791fd436cc7a6100 (diff) | |
view of fulfillment version 2
Diffstat (limited to 'indoteknik_custom/models')
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 9 | ||||
| -rw-r--r-- | indoteknik_custom/models/sales_order_fullfillment.py | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 5545e28c..31ea8902 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 9e9457f1..42544c15 100644 --- a/indoteknik_custom/models/sales_order_fullfillment.py +++ b/indoteknik_custom/models/sales_order_fullfillment.py @@ -16,8 +16,9 @@ class SalesOrderFullfillmentV2(models.Model): 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') - po_ids = fields.Many2many('purchase.order', string='Purchase Order') + 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') |
