Initial commit: L10N_Me Africa packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:53 +02:00
commit c265268138
611 changed files with 75334 additions and 0 deletions

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<record id="view_move_form" model="ir.ui.view">
<field name="name">l10n_ae.account.move.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//tree//field[@name='tax_ids']" position="after">
<field name="l10n_ae_vat_amount" optional="show"/>
</xpath>
</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//div[@name='payment_term']" position="after">
<p t-if="o.company_id.country_id.code == 'AE' and o.partner_id.country_id.code != 'AE' and o.env.ref('l10n_ae.gcc_countries_group') in o.partner_id.country_id.country_group_ids">
Supply between <b>United Arab Emirates</b> and
<b>
<span t-field="o.partner_id.country_id.name"/>
</b>
</p>
</xpath>
<xpath expr="//h2/span" position="before">
<span t-if="o.company_id.country_id.code == 'AE' and o.move_type in ['out_invoice', 'out_refund']">TAX
</span>
</xpath>
<xpath expr="//thead//th[@name='th_taxes']" position="replace">
<th name="th_taxes"
t-attf-class="text-start {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-if="o.company_id.country_id.code == 'AE'">VAT</span>
<span t-else="">Taxes</span>
</th>
<th t-if="o.company_id.country_id.code == 'AE'" name="tax_amount"
t-attf-class="text-start {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span>VAT Amount</span>
</th>
</xpath>
<xpath expr="//span[@id='line_tax_ids']/.." position="after">
<td t-if="o.company_id.country_id.code == 'AE'">
<span t-field="line.l10n_ae_vat_amount" id="line_tax_amount"/>
</td>
</xpath>
<xpath expr="//div[hasclass('clearfix')]" position="after">
<div t-if="o.company_id.country_id.code == 'AE' and o.currency_id != o.company_id.currency_id"
id="aed_amounts" class="row clearfix ms-auto my-3 text-nowrap table table-borderless border-dark border-top border-2 pt-2 text-center">
<t t-set="aed_rate"
t-value="o.env['res.currency']._get_conversion_rate(o.currency_id, o.company_id.currency_id, o.company_id, o.invoice_date or datetime.date.today())"/>
<div name="exchange_rate" class="col-auto">
<strong>Exchange Rate</strong>
<p class="m-0" t-esc="aed_rate" t-options='{"widget": "float", "precision": 5}'/>
</div>
<div name="aed_subtotal" class="col-auto">
<strong>Subtotal (AED)</strong>
<p class="m-0" t-esc="o.amount_untaxed_signed"
t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</div>
<div name="aed_vat_amount" class="col-auto">
<strong>VAT Amount (AED)</strong>
<p class="m-0"
t-esc="o.currency_id._convert(o.amount_tax, o.company_id.currency_id, o.company_id, o.invoice_date or datetime.date.today())"
t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</div>
<div name="aed_total" class="col-auto">
<strong>Total (AED)</strong>
<p class="m-0" t-out="o.amount_total_signed"
t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
</div>
</div>
</xpath>
<xpath expr="//th[@name='th_subtotal']" position="after">
<th class="text-end" t-if="o.currency_id != o.company_currency_id">
<span groups="account.group_show_line_subtotals_tax_excluded">Amount (AED)</span>
<span groups="account.group_show_line_subtotals_tax_included">Total Price (AED)</span>
</th>
</xpath>
<xpath expr="//td[hasclass('o_price_total')]" position="after">
<td class="text-end o_price_total" t-if="o.currency_id != o.company_currency_id">
<span groups="account.group_show_line_subtotals_tax_excluded" class="text-nowrap" t-out="line.currency_id._convert(line.price_subtotal, o.company_currency_id, o.company_id, o.invoice_date or datetime.date.today())" t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}"/>
<span groups="account.group_show_line_subtotals_tax_included" class="text-nowrap" t-out="line.currency_id._convert(line.price_total, o.company_currency_id, o.company_id, o.invoice_date or datetime.date.today())" t-options="{'widget': 'monetary', 'display_currency': o.company_currency_id}"/>
</td>
</xpath>
</template>
</odoo>