Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
bdb61d2c
Commit
bdb61d2c
authored
5 years ago
by
Prakash Prajapati
Committed by
William Henrotin
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] stock, delivery: usability changes in the package barcode report.
task-1889404 Closes #29209
parent
8aebeb2f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/delivery/views/report_package_barcode.xml
+7
-16
7 additions, 16 deletions
addons/delivery/views/report_package_barcode.xml
addons/stock/report/report_package_barcode.xml
+36
-41
36 additions, 41 deletions
addons/stock/report/report_package_barcode.xml
with
43 additions
and
57 deletions
addons/delivery/views/report_package_barcode.xml
+
7
−
16
View file @
bdb61d2c
<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>
...
...
This diff is collapsed.
Click to expand it.
addons/stock/report/report_package_barcode.xml
+
36
−
41
View file @
bdb61d2c
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment