Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Update account invoice !-->
<record id="view_move_form" model="ir.ui.view">
<field name="name">account.move - </field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account_invoice_fixed_discount.view_move_form" />
<field name="arch" type="xml">
<field name="discount_fixed" position="attributes">
<attribute name="groups">sale.group_discount_per_so_line</attribute>
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017-20 ForgeFlow S.L.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_order_form" model="ir.ui.view">
<field name="name">sale.order.form - sale_fixed_discount</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='order_line']/form//label[@for='discount']"
position="before"
>
<field name="discount_fixed" groups="sale.group_discount_per_so_line" />
</xpath>
<xpath
expr="//field[@name='order_line']/list/field[@name='discount']"
position="before"
>
<field name="discount_fixed" groups="sale.group_discount_per_so_line" />
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="sale_order_portal_content"
inherit_id="sale.sale_order_portal_content"
>
<xpath
expr="//section[@id='details']//t[@t-set='display_discount']"
position="after"
>
<t
t-set="display_discount_fixed"
t-value="True in [line.discount_fixed > 0 for line in sale_order.order_line]"
/>
</xpath>
<xpath
expr="//section[@id='details']//table/thead//th[@t-if='display_discount']"
position="before"
>
<th
t-if="display_discount_fixed"
t-attf-class="text-end {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}"
>
<span>Disc. Fixed Amount</span>
</th>
</xpath>
<xpath expr="//div[@t-field='line.price_unit']" position="attributes">
<attribute
name="t-if"
>line.discount &gt;= 0 or line.fixed_discount &gt;= 0</attribute>
<attribute
name="t-att-style"
>(line.discount or line.discount_fixed) and 'text-decoration: line-through' or None</attribute>
<attribute
name="t-att-class"
>((line.discount or line.discount_fixed) and 'text-danger' or '') + ' text-right'</attribute>
</xpath>
<xpath expr="//div[@t-if='line.discount']/t" position="attributes">
<attribute name="t-out">line.price_unit - line.discount_fixed</attribute>
</xpath>
<xpath expr="//td[@t-if='display_discount']" position="before">
<td
t-if="display_discount_fixed"
t-attf-class="text-end {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}"
>
<strong t-if="line.discount_fixed &gt; 0" class="text-info">
<t t-esc="line.discount_fixed" />
</strong>
</td>
</xpath>
</template>
</odoo>