[imp] Shorten lastname und fix width and truncate text

This commit is contained in:
Niels Göttsch 2024-06-06 19:00:08 +02:00
parent 758501a645
commit d89102e6d0
3 changed files with 22 additions and 6 deletions

View file

@ -5,7 +5,7 @@
"website": "https://www.bakeup.org", "website": "https://www.bakeup.org",
"category": "Stock", "category": "Stock",
"version": "16.0.1.0.2", "version": "16.0.1.0.2",
"depends": ["stock"], "depends": ["stock", "partner_firstname"],
"data": [ "data": [
"views/report_deliveryslip.xml", "views/report_deliveryslip.xml",
"views/report_deliveryslip_compact.xml", "views/report_deliveryslip_compact.xml",

View file

@ -5,6 +5,17 @@ th.fit {
min-width: fit-content; min-width: fit-content;
} }
th.partner {
min-width: 80px;
max-width: 80px;
white-space: nowrap;
text-align: left;
}
td.product {
max-width: 160px;
}
.scissors { .scissors {
width: 100%; width: 100%;
border-top: 3px dashed black; border-top: 3px dashed black;

View file

@ -9,25 +9,30 @@
t-value="docs.filtered(lambda p:p.partner_id).mapped('move_ids').filtered(lambda x: x.product_uom_qty)" t-value="docs.filtered(lambda p:p.partner_id).mapped('move_ids').filtered(lambda x: x.product_uom_qty)"
/> />
<t t-set="products" t-value="lines.mapped('product_id')"/> <t t-set="products" t-value="lines.mapped('product_id')"/>
<t t-set="pagination" t-value="12"/> <t t-set="pagination" t-value="9"/>
<t <t
t-set="partner_chunks" t-set="partner_chunks"
t-value="[partners[i:i+pagination] for i in range(0, len(partners), pagination)]" t-value="[partners[i:i+pagination] for i in range(0, len(partners), pagination)]"
/> />
<t t-foreach="partner_chunks" t-as="partner_chunk"> <t t-foreach="partner_chunks" t-as="partner_chunk">
<div style="page-break-inside: avoid;"> <div style="page-break-inside: avoid;">
<table class="table table-bordered table-sm w-auto" name="nfu_ekg_packing_list"> <table class="table table-bordered table-sm w-auto border-dark" name="nfu_ekg_packing_list">
<thead> <thead>
<tr> <tr>
<th width="160"><strong>Product</strong></th> <th class="product align-top"><strong>Product</strong></th>
<th class="partner align-top"><strong>Batch Size</strong></th>
<t t-foreach="partner_chunk" t-as="partner"> <t t-foreach="partner_chunk" t-as="partner">
<th width="80"><strong t-esc="partner.name"/></th> <th class="partner align-top"><div class="text-truncate"><t
t-esc="partner.firstname"
/>kjhajdshlsadh<br/>
<t t-esc="partner.lastname[0]"/>.</div></th>
</t> </t>
</tr> </tr>
</thead> </thead>
<t t-foreach="products" t-as="product"> <t t-foreach="products" t-as="product">
<tr> <tr>
<td><strong t-esc="product.name"/></td> <td class="product text-truncate"><strong t-esc="product.name"/></td>
<td/>
<t t-foreach="partner_chunk" t-as="partner"> <t t-foreach="partner_chunk" t-as="partner">
<td> <td>
<t <t