Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
18
sale_elaboration/reports/report_base.xml
Executable file
18
sale_elaboration/reports/report_base.xml
Executable file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2024 Moduon Team S.L. <info@moduon.team>
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<data>
|
||||
<!-- Reusable template for printing elaborations and notes -->
|
||||
<template id="elaboration_notes">
|
||||
<!-- `record` can be stock.move or stock.move.line -->
|
||||
<div
|
||||
class="fst-italic"
|
||||
t-if="record.elaboration_ids or record.elaboration_note"
|
||||
>
|
||||
<i class="fa fa-comment-o " />
|
||||
<span t-field="record.elaboration_ids" />
|
||||
<t t-if="record.elaboration_ids and record.elaboration_note">.</t>
|
||||
<span t-field="record.elaboration_note" />
|
||||
</div>
|
||||
</template>
|
||||
</data>
|
||||
57
sale_elaboration/reports/report_deliveryslip.xml
Executable file
57
sale_elaboration/reports/report_deliveryslip.xml
Executable file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
Copyright 2024 Moduon Team S.L. <info@moduon.team>
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<template
|
||||
id="report_delivery_document"
|
||||
inherit_id="stock.report_delivery_document"
|
||||
priority="20"
|
||||
>
|
||||
<!--
|
||||
Force to print lines from sml instead of aggregate data to display
|
||||
elaboration notes.
|
||||
Odoo has a bad design to do aggregate lines, see here
|
||||
https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_move_line.py#L738
|
||||
-->
|
||||
<xpath
|
||||
expr="//t[@t-value="o.move_line_ids.mapped('lot_id')"]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-value"
|
||||
add="or (o.move_ids.filtered('elaboration_ids') | o.move_ids.filtered('elaboration_note'))"
|
||||
separator=" "
|
||||
/>
|
||||
<attribute
|
||||
name="groups"
|
||||
add="sale_elaboration.group_elaboration_note_on_delivery_slip"
|
||||
separator=", "
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//p[span[@t-field='move.description_picking']]" position="after">
|
||||
<t
|
||||
t-if="move.picking_code != 'incoming'"
|
||||
t-call="sale_elaboration.elaboration_notes"
|
||||
groups="sale_elaboration.group_elaboration_note_on_delivery_slip"
|
||||
>
|
||||
<t t-set="record" t-value="move" />
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template
|
||||
id="stock_report_delivery_has_serial_move_line"
|
||||
inherit_id="stock.stock_report_delivery_has_serial_move_line"
|
||||
>
|
||||
<xpath expr="//span[@t-field='move_line.product_id']" position="after">
|
||||
<t
|
||||
t-if="move_line.picking_code != 'incoming'"
|
||||
t-call="sale_elaboration.elaboration_notes"
|
||||
groups="sale_elaboration.group_elaboration_note_on_delivery_slip"
|
||||
>
|
||||
<t t-set="record" t-value="move_line" />
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
19
sale_elaboration/reports/report_picking_operations.xml
Executable file
19
sale_elaboration/reports/report_picking_operations.xml
Executable file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2024 Moduon Team S.L.
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) -->
|
||||
<data>
|
||||
<template id="report_picking" inherit_id="stock.report_picking">
|
||||
<xpath
|
||||
expr="//td[span[@t-field='ml.product_id.display_name']]"
|
||||
position="inside"
|
||||
>
|
||||
<t
|
||||
t-if="ml.picking_code != 'incoming'"
|
||||
t-call="sale_elaboration.elaboration_notes"
|
||||
groups="sale_elaboration.group_elaboration_note_on_picking_operations"
|
||||
>
|
||||
<t t-set="record" t-value="ml" />
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
Reference in New Issue
Block a user