diff options
| author | Prakash Prajapati <ppr@odoo.com> | 2019-05-21 11:54:59 +0000 |
|---|---|---|
| committer | William Henrotin <whe@odoo.com> | 2019-07-31 08:04:38 +0000 |
| commit | bdb61d2c2ffe33fb48d8ffc6a8fe8bfaee8cb7ce (patch) | |
| tree | a70ac63d667b4f1f763a83a94852569da50dbb50 /addons | |
| parent | 8aebeb2f0322892c42debf4ff434e288dd4953e7 (diff) | |
[IMP] stock, delivery: usability changes in the package barcode report.
task-1889404
Closes #29209
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/delivery/views/report_package_barcode.xml | 23 | ||||
| -rw-r--r-- | addons/stock/report/report_package_barcode.xml | 77 |
2 files changed, 43 insertions, 57 deletions
diff --git a/addons/delivery/views/report_package_barcode.xml b/addons/delivery/views/report_package_barcode.xml index b3cac1b32d0..320aaee3cbc 100644 --- a/addons/delivery/views/report_package_barcode.xml +++ b/addons/delivery/views/report_package_barcode.xml @@ -1,28 +1,19 @@ <odoo> <template id="report_package_barcode_delivery" inherit_id="stock.report_package_barcode"> <xpath expr="//div[hasclass('o_packaging_type')]" position="after"> - <table class="table table-sm"> - <thead> - <tr> - <th t-if="o.shipping_weight"><strong>Shipping Weight</strong></th> - </tr> - </thead> - <tbody> - <tr> - <td t-if="o.shipping_weight"> - <span t-field="o.shipping_weight"/> - <t t-esc="env['product.template']._get_weight_uom_id_from_ir_config_parameter().name"/> - </td> - </tr> - </tbody> - </table> + <div t-if="o.shipping_weight" class="col-auto"> + <strong>Shipping Weight:</strong> + <br/> + <span t-field="o.shipping_weight"/> + <span t-esc="env['product.template']._get_weight_uom_id_from_ir_config_parameter().display_name"/> + </div> </xpath> </template> <template id="report_package_barcode_small_delivery" inherit_id="stock.report_package_barcode_small"> <xpath expr="//div[hasclass('o_packaging_type')]" position="after"> <div class="row o_package_shipping_weight" t-if="o.shipping_weight"> - <div class="col-12" style="font-size:24px; font-weight:bold;">Shipping Weight: <span t-field="o.shipping_weight"/></div> + <div class="col-12 text-center" style="font-size:24px; font-weight:bold;">Shipping Weight: <span t-field="o.shipping_weight"/> <t t-esc="env['product.template']._get_weight_uom_id_from_ir_config_parameter().display_name"/></div> </div> </xpath> </template> diff --git a/addons/stock/report/report_package_barcode.xml b/addons/stock/report/report_package_barcode.xml index 1beca960d71..e4d3b520fb8 100644 --- a/addons/stock/report/report_package_barcode.xml +++ b/addons/stock/report/report_package_barcode.xml @@ -9,51 +9,49 @@ <div class="oe_structure"/> <table class="table table-condensed" style="border-bottom: 0px solid white !important;"> <tr> - <th> - <h1 t-field="o.name" class="mt0 float-left"/> - </th> + <th> + <h1 t-field="o.name" class="mt0 float-left"/> + </th> <th style="text-align: center"> <img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" alt="Barcode" style="width:300px;height:50px"/> <p t-field="o.name"/> </th> </tr> - </table> - <div class="row o_packaging_type" t-if="o.packaging_id"> - <div class="col-12" style="font-weight:bold;">Package Type: <span t-field="o.packaging_id.name"/></div> - </div> - <div class="row"> - <div class="col-12"> - <h2>Package Content</h2> - </div> - </div> - <div class="row"> - <div class="col-8"> - <table class="table table-sm" style="border-bottom: 0px solid white !important;"> - <thead> - <tr> - <th>Product</th> - <th class="text-right">Quantity</th> - <th class="text-right">Lot/Serial Number</th> - </tr> - </thead> - <tbody> - <tr t-foreach="o.quant_ids" t-as="l"> - <td> - <span t-field="l.product_id.name"/> - </td> - <td class="text-right"> - <span t-field="l.quantity"/> - <span groups="uom.group_uom" t-field="l.product_id.uom_id.name"/> - </td> - <td> - <t t-if="l.lot_id"><span t-field="l.lot_id.name"/></t> - </td> - </tr> - </tbody> - </table> + </table> + <div class="row mt32 mb32"> + <div t-if="o.packaging_id" class="o_packaging_type col-auto"> + <strong>Package Type:</strong> + <p t-field="o.packaging_id.name"/> </div> </div> + <table class="table table-sm" style="border-bottom: 0px solid white !important;"> + <t t-set="has_serial_number" t-value="o.quant_ids.mapped('lot_id')" /> + <thead> + <tr> + <th>Product</th> + <th class="text-right">Quantity</th> + <th groups="uom.group_uom"/> + <th class="text-right" t-if="has_serial_number">Lot/Serial Number</th> + </tr> + </thead> + <tbody> + <tr t-foreach="o.quant_ids" t-as="l"> + <td> + <span t-field="l.product_id.name"/> + </td> + <td class="text-right"> + <span t-field="l.quantity"/> + </td> + <td groups="uom.group_uom"> + <span t-field="l.product_id.uom_id.name"/> + </td> + <td class="text-right" t-if="has_serial_number"> + <t t-if="l.lot_id"><span t-field="l.lot_id.name"/></t> + </td> + </tr> + </tbody> + </table> </div> </t> </t> @@ -66,9 +64,6 @@ <t> <div class="page"> <div class="oe_structure"/> - <div class="row o_package_name text-center"> - <div class="col-xs-12" style="font-size:24px; font-weight:bold;">Package Reference: <span t-field="o.name"/></div> - </div> <div class="row"> <div class="col-12 text-center"> <img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:600px;height:100px" alt="Barcode"/> @@ -76,7 +71,7 @@ </div> </div> <div class="row o_packaging_type" t-if="o.packaging_id"> - <div class="col-12" style="font-size:24px; font-weight:bold;">Package Type: <span t-field="o.packaging_id.name"/></div> + <div class="col-12 text-center" style="font-size:24px; font-weight:bold;">Package Type: <span t-field="o.packaging_id.name"/></div> </div> </div> </t> |
