feat: add product barcode column to inventory backdate report and export wizard

This commit is contained in:
Suherdy Yacob 2026-04-02 14:28:51 +07:00
parent 005062bf0a
commit c77cbcf173
3 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"name": "Stock Inventory Backdate",
"summary": "Create backdated inventory adjustments with historical position view",
"version": "17.0.2.5.1",
"version": "17.0.2.5.2",
"category": "Warehouse",
"author": "Suherdy Yacob",
"license": "AGPL-3",

View File

@ -32,6 +32,7 @@
<thead>
<tr>
<th name="th_product"><strong>Product</strong></th>
<th name="th_barcode"><strong>Barcode</strong></th>
<th name="th_lot" t-if="any(l.lot_id for l in o.line_ids)"><strong>Lot/Serial</strong></th>
<th name="th_package" t-if="any(l.package_id for l in o.line_ids)"><strong>Package</strong></th>
<th class="text-end"><strong>Theoretical</strong></th>
@ -44,6 +45,7 @@
<t t-foreach="o.line_ids" t-as="line">
<tr>
<td><span t-field="line.product_id"/></td>
<td><span t-field="line.product_id.barcode"/></td>
<td t-if="any(l.lot_id for l in o.line_ids)"><span t-field="line.lot_id"/></td>
<td t-if="any(l.package_id for l in o.line_ids)"><span t-field="line.package_id"/></td>
<td class="text-end"><span t-field="line.theoretical_qty"/></td>

View File

@ -49,7 +49,7 @@ class StockInventoryBackdateExportWizard(models.TransientModel):
# Table Header
row = 5
col = 0
headers = [_('Product'), _('Lot/Serial'), _('Package'), _('Theoretical Qty'), _('Counted Qty'), _('Difference'), _('UoM')]
headers = [_('Product'), _('Barcode'), _('Lot/Serial'), _('Package'), _('Theoretical Qty'), _('Counted Qty'), _('Difference'), _('UoM')]
for h in headers:
sheet.write(row, col, h, header_format)
col += 1
@ -60,6 +60,8 @@ class StockInventoryBackdateExportWizard(models.TransientModel):
col = 0
sheet.write(row, col, line.product_id.display_name)
col += 1
sheet.write(row, col, line.product_id.barcode or '')
col += 1
sheet.write(row, col, line.lot_id.name or '')
col += 1
sheet.write(row, col, line.package_id.name or '')