addons portados en el repo de ecocentral

This commit is contained in:
GitHub Copilot 2026-08-07 16:34:38 +02:00
parent f2194c5367
commit 65818b0155
72 changed files with 2474 additions and 3 deletions

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_template_property_form" model="ir.ui.view">
<field
name="name"
>product.template.form.inherit.undelivered.product</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="stock.view_template_property_form" />
<field name="arch" type="xml">
<group name="group_lots_and_weight" position="inside">
<field name="display_undelivered_in_picking" />
</group>
</field>
</record>
</odoo>

View file

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="undeliverd_product">
<t
t-if="o.partner_id.display_undelivered_in_picking and o.state == 'done'"
>
<!-- Get stock moves from backorder according to setting values -->
<t
t-if="not o.company_id.undelivered_product_slip_report_method or o.company_id.undelivered_product_slip_report_method == 'all'"
>
<t
t-set="undelivered_moves"
t-value="o.mapped('move_ids').filtered(lambda l: l.quantity == 0.0 and l.state == 'cancel' and l.product_id.display_undelivered_in_picking)"
/>
</t>
<t
t-if="o.company_id.undelivered_product_slip_report_method == 'partially_undelivered'"
>
<t
t-set="undelivered_moves"
t-value="o.mapped('move_ids').filtered(lambda l: l.state == 'cancel' and l.product_id.display_undelivered_in_picking and l.splitted_stock_move_orig_id)"
/>
</t>
<t
t-if="o.company_id.undelivered_product_slip_report_method == 'completely_undelivered'"
>
<t
t-set="undelivered_moves"
t-value="o.mapped('move_ids').filtered(lambda l: l.state == 'cancel' and l.product_id.display_undelivered_in_picking and not l.splitted_stock_move_orig_id)"
/>
</t>
<table
t-if="undelivered_moves"
class="table table-sm table-bordered mt0"
id="undelivered_product"
>
<thead>
<tr><th colspan="7"><strong
>Remaining products (not delivered yet)</strong></th></tr>
<tr>
<th><strong>Reference</strong></th>
<th><strong>Product</strong></th>
<th class="text-end"><strong>Quantity</strong></th>
</tr>
</thead>
<tbody>
<t
t-foreach="undelivered_moves.sorted(key=lambda l: (l.product_id.default_code or '', l.product_id.name))"
t-as="undelivered_move"
>
<tr
t-att-class="'partially_undelivered_line' if undelivered_move.splitted_stock_move_orig_id else 'completely_undelivered_line'"
>
<td>
<span
t-field="undelivered_move.product_id.default_code"
/>
</td>
<td>
<span
t-field="undelivered_move.product_id.name"
/>
</td>
<td class="text-end">
<span
t-field="undelivered_move.product_uom_qty"
/> <span
groups="uom.group_uom"
t-field="undelivered_move.product_uom"
/>
</td>
</tr>
</t>
</tbody>
</table>
</t>
</template>
<template
id="report_delivery_document"
inherit_id="stock.report_delivery_document"
priority="200"
>
<xpath expr="//table[@name='stock_move_line_table']" position="after">
<t
t-call="stock_picking_report_undelivered_product.undeliverd_product"
/>
</xpath>
</template>
</odoo>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field
name="name"
>res.config.settings.view.form.inherit.undelivered.product</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="stock.res_config_settings_view_form" />
<field name="arch" type="xml">
<block name="operations_setting_container" position="inside">
<setting
id="undelivered_product_slip_report_method"
string="Undelivered products"
help="Method to display undelivered product lines in the delivery slip report"
>
<field
name="undelivered_product_slip_report_method"
class="o_light_label"
widget="selection"
/>
</setting>
</block>
</field>
</record>
</odoo>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_partner_stock_form" model="ir.ui.view">
<field name="name">res.partner.form.inherit.undelivered.product</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="stock.view_partner_stock_form" />
<field name="arch" type="xml">
<group name="inventory" position="inside">
<field name="display_undelivered_in_picking" />
</group>
</field>
</record>
</odoo>