summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_picking.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-10-15 10:06:12 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-10-15 10:06:12 +0700
commita831d928c740497c777b966020aa2f198bf0066a (patch)
tree2a3ed3458d7ce18f37d28af28cfa10240981d9f2 /indoteknik_custom/models/stock_picking.py
parente2860d19aebbd64b4c38fb18dd18d6dbcc932744 (diff)
add line number in stock picking (DO and Receipt)
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
-rw-r--r--indoteknik_custom/models/stock_picking.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index fb17d142..221aff31 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -43,6 +43,15 @@ class StockPicking(models.Model):
copy=False
)
+ def calculate_line_no(self):
+ line_no = 0
+ for picking in self:
+ for line in picking.move_ids_without_package:
+ if line.product_id.type == 'product':
+ line_no += 1
+ line.line_no = line_no
+ # _logger.info('Calculate PO Line No %s' % line.id)
+
def _compute_summary_qty(self):
sum_qty_detail = sum_qty_operation = count_line_detail = count_line_operation = 0
for picking in self: