Merge pull request #9 from bakeupboys/35-16.0-add_packing_list
35 16.0 add packing list
This commit is contained in:
commit
7c676f662f
9 changed files with 322 additions and 38 deletions
|
|
@ -34,7 +34,9 @@ Changelog
|
|||
=========
|
||||
|
||||
|
||||
:1.0.0: Initial module.
|
||||
:1.0.0 Initial module.
|
||||
:1.0.1 Add EKG Delivery Sip
|
||||
:1.0.0 Add Packing List
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
|
|
|||
|
|
@ -4,9 +4,14 @@
|
|||
"author": "BAKEUP",
|
||||
"website": "https://www.bakeup.org",
|
||||
"category": "Stock",
|
||||
"version": "16.0.1.0.1",
|
||||
"depends": ["stock"],
|
||||
"data": ["views/report_deliveryslip.xml", "views/report_deliveryslip_compact.xml", "report/stock_report_views.xml"],
|
||||
"version": "16.0.1.0.2",
|
||||
"depends": ["stock", "partner_firstname"],
|
||||
"data": [
|
||||
"views/report_deliveryslip.xml",
|
||||
"views/report_deliveryslip_compact.xml",
|
||||
"views/report_packing_list.xml",
|
||||
"report/stock_report_views.xml",
|
||||
],
|
||||
"assets": {"web.report_assets_common": ["nfu_ekg_stock/static/src/scss/report_stock_rule.scss"]},
|
||||
"license": "LGPL-3",
|
||||
"application": True,
|
||||
|
|
|
|||
96
nfu_ekg_stock/i18n/de.po
Normal file
96
nfu_ekg_stock/i18n/de.po
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * nfu_ekg_stock
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-07-01 20:16+0000\n"
|
||||
"PO-Revision-Date: 2024-07-01 22:18+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.4.4\n"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model:ir.actions.report,print_report_name:nfu_ekg_stock.action_report_ekg_delivery
|
||||
msgid ""
|
||||
"'EKG Delivery Slip - %s - %s' % (object.partner_id.name or '', object.name)"
|
||||
msgstr ""
|
||||
"'EKG Lieferschein - %s - %s' % (object.partner_id.name or '', object.name)"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model:ir.actions.report,print_report_name:nfu_ekg_stock.action_report_ekg_delivery_compact
|
||||
msgid ""
|
||||
"'EKG Delivery Slip Compact - %s - %s' % (object.partner_id.name or '', "
|
||||
"object.name)"
|
||||
msgstr ""
|
||||
"'EKG kompakter Lieferschein - %s - %s' % (object.partner_id.name or '', "
|
||||
"object.name)"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model:ir.actions.report,print_report_name:nfu_ekg_stock.action_report_ekg_packing_list
|
||||
msgid ""
|
||||
"'EKG Packing List - %s - %s' % (object.partner_id.name or '', object.name)"
|
||||
msgstr ""
|
||||
"'EKG Packliste - %s - %s' % (object.partner_id.name or '', object.name)"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model_terms:ir.ui.view,arch_db:nfu_ekg_stock.report_ekg_delivery_document
|
||||
msgid "<strong>Available</strong>"
|
||||
msgstr "<strong>Verfügbar</strong>"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model_terms:ir.ui.view,arch_db:nfu_ekg_stock.report_ekg_delivery_document
|
||||
msgid "<strong>Batch Size</strong>"
|
||||
msgstr "<strong>Gebindegröße</strong>"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model_terms:ir.ui.view,arch_db:nfu_ekg_stock.report_ekg_delivery_document
|
||||
msgid "<strong>Product</strong>"
|
||||
msgstr "<strong>Produkt</strong>"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model_terms:ir.ui.view,arch_db:nfu_ekg_stock.report_ekg_delivery_compact_document
|
||||
msgid "<strong>Qty</strong>"
|
||||
msgstr "<strong>Menge</strong>"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model_terms:ir.ui.view,arch_db:nfu_ekg_stock.report_ekg_delivery_document
|
||||
msgid "<strong>Signature</strong>"
|
||||
msgstr "<strong>Unterschrift</strong>"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model_terms:ir.ui.view,arch_db:nfu_ekg_stock.report_ekg_packing_list
|
||||
msgid "Batch<br/>Size"
|
||||
msgstr "Gebinde<br/>größe"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model:ir.actions.report,name:nfu_ekg_stock.action_report_ekg_delivery
|
||||
msgid "EKG Delivery Slip"
|
||||
msgstr "EKG Lieferschein"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model:ir.actions.report,name:nfu_ekg_stock.action_report_ekg_delivery_compact
|
||||
msgid "EKG Delivery Slip Compact"
|
||||
msgstr "EKG kompakter Lieferschein"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model:ir.actions.report,name:nfu_ekg_stock.action_report_ekg_packing_list
|
||||
msgid "EKG Packing List"
|
||||
msgstr "EKG Packliste"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model_terms:ir.ui.view,arch_db:nfu_ekg_stock.report_ekg_packing_list
|
||||
msgid "Internal<br/>Reference"
|
||||
msgstr "Artikel<br/>nummer"
|
||||
|
||||
#. module: nfu_ekg_stock
|
||||
#: model_terms:ir.ui.view,arch_db:nfu_ekg_stock.report_ekg_packing_list
|
||||
msgid "Product"
|
||||
msgstr "Produkt"
|
||||
|
|
@ -1,2 +1,4 @@
|
|||
|
||||
:1.0.0: Initial module.
|
||||
:1.0.0 Initial module.
|
||||
:1.0.1 Add EKG Delivery Sip
|
||||
:1.0.0 Add Packing List
|
||||
|
|
@ -1,14 +1,69 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- custom pager format -->
|
||||
<record id="paperformat_packaging_list" model="report.paperformat">
|
||||
<field name="name">Custom Paperformat for the packaging list report</field>
|
||||
<field name="default" eval="False"/>
|
||||
<field name="disable_shrinking" eval="True"/>
|
||||
<field name="format">A4</field>
|
||||
<field name="orientation">Landscape</field>
|
||||
<field name="margin_top">10</field>
|
||||
<field name="margin_bottom">8</field>
|
||||
<field name="margin_left">5</field>
|
||||
<field name="margin_right">5</field>
|
||||
<field name="dpi">90</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_ekg_packing_list" model="ir.actions.report">
|
||||
<field name="name">EKG Packing List</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="paperformat_id" ref="paperformat_packaging_list"/>
|
||||
<field name="report_name">nfu_ekg_stock.report_ekg_packing_list</field>
|
||||
<field name="report_file">nfu_ekg_stock.report_packing_list</field>
|
||||
<field
|
||||
name="print_report_name"
|
||||
>'EKG Packing List - %s - %s' % (object.partner_id.name or '', object.name)</field>
|
||||
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_ekg_packing_list_lf" model="ir.actions.report">
|
||||
<field name="name">EKG Packing List LF</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="paperformat_id" ref="paperformat_packaging_list"/>
|
||||
<field name="report_name">nfu_ekg_stock.report_ekg_packing_list_lf</field>
|
||||
<field name="report_file">nfu_ekg_stock.report_packing_list</field>
|
||||
<field
|
||||
name="print_report_name"
|
||||
>'EKG Packing List - %s - %s' % (object.partner_id.name or '', object.name)</field>
|
||||
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_ekg_delivery" model="ir.actions.report">
|
||||
<field name="name">EKG Delivery Slip</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">nfu_ekg_stock.report_ekg_deliveryslip</field>
|
||||
<field name="report_file">nfu_ekg_stock.report_ekg_deliveryslip</field>
|
||||
<field name="report_file">nfu_ekg_stock.report_deliveryslip</field>
|
||||
<field
|
||||
name="print_report_name"
|
||||
>'EKG Delivery Slip - %s - %s' % (object.partner_id.name or '', object.name)</field>
|
||||
>'EKG Delivery Slip - %s, %s - %s' % (object.partner_id.lastname or '',object.partner_id.firstname or '', object.name)</field>
|
||||
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_ekg_delivery_lf" model="ir.actions.report">
|
||||
<field name="name">EKG Delivery Slip LF</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">nfu_ekg_stock.report_ekg_deliveryslip_lf</field>
|
||||
<field name="report_file">nfu_ekg_stock.report_deliveryslip</field>
|
||||
<field
|
||||
name="print_report_name"
|
||||
>'EKG Delivery Slip - %s, %s - %s' % (object.partner_id.lastname or '',object.partner_id.firstname or '', object.name)</field>
|
||||
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
|
@ -18,12 +73,12 @@
|
|||
<field name="model">stock.picking</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">nfu_ekg_stock.report_ekg_deliveryslip_compact</field>
|
||||
<field name="report_file">nfu_ekg_stock.report_ekg_deliveryslip_compact</field>
|
||||
<field name="report_file">nfu_ekg_stock.report_deliveryslip_compact</field>
|
||||
<field
|
||||
name="print_report_name"
|
||||
>'EKG Delivery Slip Compact - %s - %s' % (object.partner_id.name or '', object.name)</field>
|
||||
<field name="binding_model_id" ref="stock.model_stock_picking"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -386,14 +386,9 @@ ul.auto-toc {
|
|||
</div>
|
||||
<div class="section" id="changelog">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Changelog</a></h1>
|
||||
<table class="docutils field-list" frame="void" rules="none">
|
||||
<col class="field-name" />
|
||||
<col class="field-body" />
|
||||
<tbody valign="top">
|
||||
<tr class="field"><th class="field-name">1.0.0:</th><td class="field-body">Initial module.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>:1.0.0 Initial module.
|
||||
:1.0.1 Add EKG Delivery Sip
|
||||
:1.0.0 Add Packing List</p>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,43 @@
|
|||
td.fit,
|
||||
th.fit {
|
||||
width: 0;
|
||||
td.batch,
|
||||
th.batch {
|
||||
width: 90px;
|
||||
max-width: 90px;
|
||||
white-space: nowrap;
|
||||
min-width: fit-content;
|
||||
}
|
||||
|
||||
th.qty {
|
||||
max-width: 100px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
th.partner {
|
||||
min-width: 80px;
|
||||
max-width: 80px;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th.code {
|
||||
max-width: 60px;
|
||||
}
|
||||
|
||||
th.packaging {
|
||||
max-width: 70px;
|
||||
}
|
||||
|
||||
td.product {
|
||||
max-width: 150px;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
td.packaging {
|
||||
max-width: 70px;
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
td.code {
|
||||
max-width: 60px;
|
||||
font-size: xx-small;
|
||||
}
|
||||
|
||||
.scissors {
|
||||
|
|
|
|||
|
|
@ -7,37 +7,41 @@
|
|||
|
||||
<div class="scissors"/>
|
||||
<div class="page" style="page-break-inside: avoid;">
|
||||
<div class="row mt32">
|
||||
<div class="row mt16">
|
||||
<div class="col-auto" name="div_name" t-if="partner">
|
||||
<strong><span t-field="partner.name"/></strong>
|
||||
<t t-if="last_first">
|
||||
<strong><span t-field="partner.lastname"/>, <span t-field="partner.firstname"/></strong>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<strong><span t-field="partner.name"/></strong>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm" name="stock_move_table">
|
||||
<table class="table table-sm" name="stock_move_table" style="font-size: smaller">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fit" name="th_sm_product_qty"><strong>Batch Size</strong></th>
|
||||
<th name="th_sm_product"><strong>Product</strong></th>
|
||||
<th class="fit" name="th_sm_ordered"><strong>Ordered</strong></th>
|
||||
<th class="batch text-start" name="th_sm_product_qty"><strong>Batch Size</strong></th>
|
||||
<th class="text-start" name="th_sm_product"><strong>Product</strong></th>
|
||||
<th class="qty text-end" name="th_sm_ordered"><strong>Available</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-set="lines" t-value="o.move_ids.filtered(lambda x: x.product_uom_qty)"/>
|
||||
<tr t-foreach="lines" t-as="move">
|
||||
<td class="fit">
|
||||
<!-- Needs to be filled later -->
|
||||
<!-- <span t-field="move.product_uom_qty"/> -->
|
||||
<!-- <span t-field="move.product_uom"/> -->
|
||||
<td class="batch text-truncate">
|
||||
<t t-foreach="move.product_id.packaging_ids" t-as="packaging">
|
||||
<span t-esc="packaging.name"/>
|
||||
</t>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="move.product_id.name"/>
|
||||
<p
|
||||
<span t-field="move.product_id.name"/><br/>
|
||||
<span
|
||||
t-if="move.description_picking != move.product_id.name and move.description_picking != move.product_id.display_name"
|
||||
>
|
||||
<span t-field="move.description_picking"/>
|
||||
</p>
|
||||
t-field="move.description_picking"
|
||||
/>
|
||||
</td>
|
||||
<td class="fit">
|
||||
<span t-field="move.product_uom_qty"/>
|
||||
<td class="text-end">
|
||||
<span t-field="move.forecast_availability"/>
|
||||
<span t-field="move.product_uom"/>
|
||||
</td>
|
||||
|
||||
|
|
@ -68,4 +72,16 @@
|
|||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="report_ekg_deliveryslip_lf">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.basic_layout">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-set="last_first" t-value="True"/>
|
||||
<t t-call="nfu_ekg_stock.report_ekg_delivery_document" t-lang="o._get_report_lang()"/>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
78
nfu_ekg_stock/views/report_packing_list.xml
Normal file
78
nfu_ekg_stock/views/report_packing_list.xml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<template id="report_ekg_packing_document">
|
||||
<t t-set="partners" t-value="docs.mapped('partner_id')"/>
|
||||
<t
|
||||
t-set="lines"
|
||||
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="pagination" t-value="9"/>
|
||||
<t t-set="partner_chunks" t-value="[partners[i:i+pagination] for i in range(0, len(partners), pagination)]"/>
|
||||
<t t-foreach="partner_chunks" t-as="partner_chunk">
|
||||
<div style="page-break-inside: avoid;">
|
||||
<table class="table table-bordered table-sm w-auto border-dark" name="nfu_ekg_packing_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product align-top text-start">Product</th>
|
||||
<th class="code align-top text-truncate">Internal<br/>Reference</th>
|
||||
<th class="packaging align-top text-truncate">Batch<br/>Size</th>
|
||||
<t t-foreach="partner_chunk" t-as="partner">
|
||||
<th class="partner align-top">
|
||||
<div class="text-truncate">
|
||||
<t t-if="last_first">
|
||||
<t t-esc="partner.lastname"/>,<br/>
|
||||
<t t-esc="partner.firstname"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="partner.firstname"/><br/>
|
||||
<t t-esc="partner.lastname"/>
|
||||
</t>
|
||||
</div>
|
||||
</th>
|
||||
</t>
|
||||
</tr>
|
||||
</thead>
|
||||
<t t-foreach="products" t-as="product">
|
||||
<tr>
|
||||
<td class="product text-truncate"><span t-esc="product.name"/></td>
|
||||
<td class="code text-truncate"><span t-esc="product.default_code"/></td>
|
||||
<td class="packaging text-truncate">
|
||||
<t t-foreach="product.packaging_ids" t-as="packaging">
|
||||
<span t-esc="packaging.name"/>
|
||||
</t>
|
||||
</td>
|
||||
<t t-foreach="partner_chunk" t-as="partner">
|
||||
<td>
|
||||
<t
|
||||
t-set="qty"
|
||||
t-value="sum(lines.filtered(lambda p:p.picking_id.partner_id.id == partner.id).filtered(lambda p:p.product_id.id == product.id).mapped('product_uom_qty'))"
|
||||
/>
|
||||
<t t-if="qty" t-esc="qty"/>
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="report_ekg_packing_list">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.basic_layout">
|
||||
<t t-call="nfu_ekg_stock.report_ekg_packing_document"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="report_ekg_packing_list_lf">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.basic_layout">
|
||||
<t t-set="last_first" t-value="True"/>
|
||||
<t t-call="nfu_ekg_stock.report_ekg_packing_document"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
Loading…
Reference in a new issue