feat: add product barcode column to inventory backdate report and export wizard
This commit is contained in:
parent
005062bf0a
commit
c77cbcf173
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Stock Inventory Backdate",
|
"name": "Stock Inventory Backdate",
|
||||||
"summary": "Create backdated inventory adjustments with historical position view",
|
"summary": "Create backdated inventory adjustments with historical position view",
|
||||||
"version": "17.0.2.5.1",
|
"version": "17.0.2.5.2",
|
||||||
"category": "Warehouse",
|
"category": "Warehouse",
|
||||||
"author": "Suherdy Yacob",
|
"author": "Suherdy Yacob",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
|
|||||||
@ -32,6 +32,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th name="th_product"><strong>Product</strong></th>
|
<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_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 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>
|
<th class="text-end"><strong>Theoretical</strong></th>
|
||||||
@ -44,6 +45,7 @@
|
|||||||
<t t-foreach="o.line_ids" t-as="line">
|
<t t-foreach="o.line_ids" t-as="line">
|
||||||
<tr>
|
<tr>
|
||||||
<td><span t-field="line.product_id"/></td>
|
<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.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 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>
|
<td class="text-end"><span t-field="line.theoretical_qty"/></td>
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class StockInventoryBackdateExportWizard(models.TransientModel):
|
|||||||
# Table Header
|
# Table Header
|
||||||
row = 5
|
row = 5
|
||||||
col = 0
|
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:
|
for h in headers:
|
||||||
sheet.write(row, col, h, header_format)
|
sheet.write(row, col, h, header_format)
|
||||||
col += 1
|
col += 1
|
||||||
@ -60,6 +60,8 @@ class StockInventoryBackdateExportWizard(models.TransientModel):
|
|||||||
col = 0
|
col = 0
|
||||||
sheet.write(row, col, line.product_id.display_name)
|
sheet.write(row, col, line.product_id.display_name)
|
||||||
col += 1
|
col += 1
|
||||||
|
sheet.write(row, col, line.product_id.barcode or '')
|
||||||
|
col += 1
|
||||||
sheet.write(row, col, line.lot_id.name or '')
|
sheet.write(row, col, line.lot_id.name or '')
|
||||||
col += 1
|
col += 1
|
||||||
sheet.write(row, col, line.package_id.name or '')
|
sheet.write(row, col, line.package_id.name or '')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user