feat(reports): packing slip PDF uses customer_line_header macro (Sub 2 Task 20)
Rewired portrait + landscape variants of report_fp_packing_slip to use the shared customer_line_header QWeb macro. The packing slip iterates stock.move records (doc.move_ids_without_package); the adapter `<t t-set="line" t-value="move.sale_line_id or move"/>` bridges the macro's `line.x_fc_part_catalog_id` lookup to the sale line when the move is tied to a sale (preferred path), falling back to rendering the stock.move's product_id for stray moves with no sale line. SKU + PRODUCT columns collapsed into a single PART column (width adjusted to absorb the removed SKU column). Both variants render successfully on entech with a real picking whose move has a sale_line_id. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -77,8 +77,7 @@
|
||||
<table class="bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 12%;">SKU</th>
|
||||
<th class="text-start" style="width: 44%;">PRODUCT</th>
|
||||
<th class="text-start" style="width: 56%;">PART</th>
|
||||
<th style="width: 12%;">QTY</th>
|
||||
<th style="width: 10%;">UOM</th>
|
||||
<th style="width: 22%;">LOT / SERIAL</th>
|
||||
@@ -87,8 +86,10 @@
|
||||
<tbody>
|
||||
<t t-foreach="doc.move_ids_without_package" t-as="move">
|
||||
<tr>
|
||||
<td class="text-center"><span t-esc="move.product_id.default_code or ''"/></td>
|
||||
<td><span t-field="move.product_id"/></td>
|
||||
<td>
|
||||
<t t-set="line" t-value="move.sale_line_id or move"/>
|
||||
<t t-call="fusion_plating_reports.customer_line_header"/>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span t-esc="int(move.quantity) if move.quantity == int(move.quantity) else move.quantity"/>
|
||||
</td>
|
||||
@@ -212,8 +213,7 @@
|
||||
<table class="bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10%;">SKU</th>
|
||||
<th class="text-start" style="width: 34%;">PRODUCT</th>
|
||||
<th class="text-start" style="width: 44%;">PART</th>
|
||||
<th style="width: 10%;">ORDERED</th>
|
||||
<th style="width: 10%;">DONE</th>
|
||||
<th style="width: 8%;">UOM</th>
|
||||
@@ -224,8 +224,10 @@
|
||||
<tbody>
|
||||
<t t-foreach="doc.move_ids_without_package" t-as="move">
|
||||
<tr>
|
||||
<td class="text-center"><span t-esc="move.product_id.default_code or ''"/></td>
|
||||
<td><span t-field="move.product_id"/></td>
|
||||
<td>
|
||||
<t t-set="line" t-value="move.sale_line_id or move"/>
|
||||
<t t-call="fusion_plating_reports.customer_line_header"/>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span t-esc="int(move.product_uom_qty) if move.product_uom_qty == int(move.product_uom_qty) else move.product_uom_qty"/>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user