Skip to content

Commit 39782e8

Browse files
committed
[IMP] stock_grn: Improve label template
Add more GRN fields on label Allows to print as more labels as more pallets and boxes numbers.
1 parent 2b3f346 commit 39782e8

File tree

4 files changed

+37
-6
lines changed

4 files changed

+37
-6
lines changed

stock_grn/README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ It allows to notify in odoo that goods have been received from a transporter
3434
without performing any stock move. The GRN is linked to existing picking IN to
3535
mark them as ready to process.
3636

37+
ZPL labels printing are also available. When having filled the GRN in, click
38+
on the print action. The amount of labels will depend on pallets and boxes
39+
numbers (total amount of them). You can print one label even if pallets and
40+
boxes numbers haven't been filled in.
41+
3742
**Table of contents**
3843

3944
.. contents::

stock_grn/readme/DESCRIPTION.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ The Goods Received Note is the step at the reception of goods in the warehouse.
33
It allows to notify in odoo that goods have been received from a transporter
44
without performing any stock move. The GRN is linked to existing picking IN to
55
mark them as ready to process.
6+
7+
ZPL labels printing are also available. When having filled the GRN in, click
8+
on the print action. The amount of labels will depend on pallets and boxes
9+
numbers (total amount of them). You can print one label even if pallets and
10+
boxes numbers haven't been filled in.

stock_grn/reports/stock_grn.xml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
<template id="label_stock_grn">
66
<t t-set="curr_date" t-value="datetime.datetime.today()" />
77
<t t-foreach="docs" t-as="grn">
8-
8+
<t
9+
t-set="total"
10+
t-value="(grn.qty_box + grn.qty_pallet) if (grn.qty_box or grn.qty_pallet) else 1"
11+
/>
12+
<t t-foreach="range(1, total + 1, 1)" t-as="number">
913
^XA
1014
<t t-name="supplier_name">
1115
^CF0,60
@@ -17,20 +21,33 @@
1721
</t>
1822
<t t-name="origin">
1923
^FO10,150^FDORIGIN: <t
20-
t-esc="','.join([origin for origin in grn.picking_ids.mapped('origin') if origin])"
21-
/>^FS
24+
t-esc="','.join([origin for origin in grn.picking_ids.mapped('origin') if origin])"
25+
/>^FS
2226
</t>
23-
<t t-name="grn_name">
24-
^FO10,185^FDGRN: <t t-esc="grn.name" />^FS
27+
<t t-name="grn_supplier">
28+
^FO10,185^FDSUPPLIER REF: <t t-esc="delivery_note_supplier_number" />^FS
2529
</t>
2630
<t t-name="grn_date">
2731
^FO10,220^FDDATE: <t t-esc="curr_date" t-options='{"widget": "date"}' />^FS
2832
</t>
33+
<t t-name="grn_boxes">
34+
^FO10,255^FDBOXES: <t t-esc="grn.qty_box" />^FS
35+
</t>
36+
<t t-name="grn_pallets">
37+
^FO10,290^FDPALLETS: <t t-esc="grn.qty_pallet" />^FS
38+
</t>
39+
<t t-name="grn_number">
40+
^FO450,325^FDNUMBER: <t t-esc="number" /> / <t t-esc="total" /> ^FS
41+
</t>
2942
<t t-name="grn_qr">
3043
^BQN,2,6,M,7
31-
^FO500,50^FH^FDQA,<t t-esc="grn.name" />^FS
44+
^FO500,115^FH^FDQA,<t t-esc="grn.name" />^FS
45+
</t>
46+
<t t-name="grn_name">
47+
^FO450,290^FDGRN: <t t-esc="grn.name" />^FS
3248
</t>
3349
^XZ
50+
</t>
3451
</t>
3552
</template>
3653

stock_grn/static/description/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ <h1 class="title">Goods Received Note</h1>
375375
It allows to notify in odoo that goods have been received from a transporter
376376
without performing any stock move. The GRN is linked to existing picking IN to
377377
mark them as ready to process.</p>
378+
<p>ZPL labels printing are also available. When having filled the GRN in, click
379+
on the print action. The amount of labels will depend on pallets and boxes
380+
numbers (total amount of them). You can print one label even if pallets and
381+
boxes numbers haven’t been filled in.</p>
378382
<p><strong>Table of contents</strong></p>
379383
<div class="contents local topic" id="contents">
380384
<ul class="simple">

0 commit comments

Comments
 (0)