19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:21 +01:00
parent 7dc55599c6
commit 7f43bbbfcc
650 changed files with 45260 additions and 33436 deletions

View file

@ -2,10 +2,10 @@
<odoo>
<record id="action_account_move_bir_2307" model="ir.actions.server">
<field name="name">Download BIR 2307 XLS</field>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="group_ids" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="model_id" ref="account.model_account_move"/>
<field name="binding_model_id" ref="account.model_account_move"/>
<field name="binding_view_types">list,form</field>
<field name="binding_view_types">list,kanban,form</field>
<field name="state">code</field>
<field name="code">action = records.action_open_l10n_ph_2307_wizard()</field>
</record>

View file

@ -2,7 +2,7 @@
<odoo>
<record id="action_account_payment_bir_2307" model="ir.actions.server">
<field name="name">Download BIR 2307 XLS</field>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="group_ids" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="model_id" ref="account.model_account_payment"/>
<field name="binding_model_id" ref="account.model_account_payment"/>
<field name="binding_view_types">form</field>

View file

@ -0,0 +1,12 @@
<odoo>
<record id="action_report_disbursement_voucher_ph" model="ir.actions.report">
<field name="name">Philippines : Disbursement Voucher</field>
<field name="model">account.payment</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">l10n_ph.report_disbursement_voucher</field>
<field name="report_file">l10n_ph.report_disbursement_voucher</field>
<field name="binding_model_id" ref="account.model_account_payment"/>
<field name="binding_type">report</field>
<field name="domain" eval="[('company_id.country_code', '=', 'PH')]"/>
</record>
</odoo>

View file

@ -6,7 +6,7 @@
<field name="inherit_id" ref="account.view_tax_form" />
<field name="arch" type="xml">
<notebook position="inside">
<page name="l10n_ph" string="Philippines">
<page name="l10n_ph" string="Philippines" invisible="country_code != 'PH'">
<group>
<group>
<field name="l10n_ph_atc" />

View file

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="l10n_ph.minimal_layout" inherit_id="web.minimal_layout">
<xpath expr="//script[@t-if='subst']" position="after">
<t t-if="report_xml_id == 'l10n_ph.action_report_disbursement_voucher_ph'">
<script>
function display_footer_on_last_page_only() {
var vars = {};
var x = document.location.search.substring(1).split('&amp;');
for (var i in x) {
var z = x[i].split('=', 2);
vars[z[0]] = unescape(z[1]);
}
var elements = document.getElementsByClassName('last-page');
var isLastPage = vars.sitepage === vars.sitepages;
for (var i = 0; i&lt;elements.length; i++) {
elements[i].style.display = isLastPage ? 'inherit' : 'none';
}
}
</script>
</t>
</xpath>
<xpath expr="//body" position="attributes">
<attribute name="t-att-onload">(subst and 'subst();' or '') + (report_xml_id == 'l10n_ph.action_report_disbursement_voucher_ph' and 'display_footer_on_last_page_only()' or '')</attribute>
</xpath>
</template>
<template id="report_disbursement_voucher_document_footer">
<div class="last-page text-start">
<div class="row">
<div class="col-8">
Prepared By: <span t-out="user.name"/>
</div>
<div class="col-4">
Approved By:
</div>
</div>
<br/>
<div class="row">
<div class="col-8">
Received By:
</div>
<div class="col-4">
Received Date:
</div>
</div>
<br/>
</div>
</template>
<template inherit_id="account.report_payment_receipt_document" id="report_disbursement_voucher_document">
<xpath expr="//span[@t-field='o.payment_receipt_title']" position="replace">
<t t-if="is_l10n_ph_disbursement_voucher">
Disbursement Voucher:
</t>
<t t-else="">
<span t-field="o.payment_receipt_title">Payment Receipt</span>:
</t>
</xpath>
<xpath expr="//div[hasclass('row')][div[hasclass('col-6')][@t-if='o.memo']]" position="after">
<t t-if="is_l10n_ph_disbursement_voucher">
<div class="row">
<div class="col-6 offset-6" t-if="o.check_number">
Check Number: <span t-field="o.check_number"/>
</div>
</div>
</t>
</xpath>
<xpath expr="//table[@name='invoices']" position="attributes">
<attribute name="t-if">
('is_l10n_ph_disbursement_voucher' and (o.reconciled_invoice_ids or o.reconciled_bill_ids))
or (values['display_invoices'] and not is_l10n_ph_disbursement_voucher)
</attribute>
</xpath>
<xpath expr="//div[table[@name='invoices']]" position="after">
<t t-if="is_l10n_ph_disbursement_voucher">
<table name="journal_entries"
t-if="o.move_id and o.move_id.move_type == 'entry'"
class="table table-borderless"
style="page-break-inside: avoid;">
<thead>
<tr>
<th class="col-8"><span>Account</span></th>
<th class="text-end col-2"><span>Debit</span></th>
<th class="text-end col-2"><span>Credit</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="o.move_id.line_ids" t-as="line">
<tr>
<td><span t-field="line.account_id.name"/></td>
<td class="text-end">
<span t-field="line.debit" t-options="{'widget': 'monetary', 'display_currency': line.company_currency_id}"/>
</td>
<td class="text-end">
<span t-field="line.credit" t-options="{'widget': 'monetary', 'display_currency': line.company_currency_id}"/>
</td>
</tr>
</t>
</tbody>
</table>
</t>
</xpath>
</template>
<template id="report_disbursement_voucher">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-set="is_l10n_ph_disbursement_voucher" t-value="True"/>
<t t-set="lang" t-value="o.partner_id.lang or o.company_id.partner_id.lang"/>
<t t-call="l10n_ph.report_disbursement_voucher_document" t-lang="lang"/>
</t>
</t>
</template>
</odoo>

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="l10n_ph.external_layout_standard" inherit_id="web.external_layout_standard">
<xpath expr="//div[hasclass('o_footer_content')]" position="before">
<t t-if="is_l10n_ph_disbursement_voucher">
<t t-call="l10n_ph.report_disbursement_voucher_document_footer"/>
</t>
</xpath>
</template>
<template id="l10n_ph.external_layout_bold" inherit_id="web.external_layout_bold">
<xpath expr="//div[hasclass('o_footer_content')]" position="before">
<t t-if="is_l10n_ph_disbursement_voucher">
<t t-call="l10n_ph.report_disbursement_voucher_document_footer"/>
</t>
</xpath>
</template>
<template id="l10n_ph.external_layout_boxed" inherit_id="web.external_layout_boxed">
<xpath expr="//div[hasclass('o_footer_content')]" position="before">
<t t-if="is_l10n_ph_disbursement_voucher">
<t t-call="l10n_ph.report_disbursement_voucher_document_footer"/>
</t>
</xpath>
</template>
<template id="l10n_ph.external_layout_striped" inherit_id="web.external_layout_striped">
<xpath expr="//div[hasclass('o_footer_content')]" position="before">
<t t-if="is_l10n_ph_disbursement_voucher">
<t t-call="l10n_ph.report_disbursement_voucher_document_footer"/>
</t>
</xpath>
</template>
<template id="l10n_ph.external_layout_bubble" inherit_id="web.external_layout_bubble">
<xpath expr="//div[hasclass('border-top')][@t-field='company.report_footer']" position="before">
<t t-if="is_l10n_ph_disbursement_voucher">
<t t-call="l10n_ph.report_disbursement_voucher_document_footer"/>
</t>
</xpath>
</template>
<template id="l10n_ph.external_layout_wave" inherit_id="web.external_layout_wave">
<xpath expr="//div[@t-field='company.report_footer']" position="before">
<t t-if="is_l10n_ph_disbursement_voucher">
<t t-call="l10n_ph.report_disbursement_voucher_document_footer"/>
</t>
</xpath>
</template>
<template id="l10n_ph.external_layout_folder" inherit_id="web.external_layout_folder">
<xpath expr="//div[hasclass('o_footer_content')]" position="before">
<t t-if="is_l10n_ph_disbursement_voucher">
<t t-call="l10n_ph.report_disbursement_voucher_document_footer"/>
</t>
</xpath>
</template>
</odoo>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_company_form_inherit_l10n_ph" model="ir.ui.view">
<field name="name">res.company.form.inherit.l10n_ph</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="after">
<field name="branch_code" invisible="country_code != 'PH'"/>
<field name="l10n_ph_rdo" invisible="country_code != 'PH'"/>
</xpath>
</field>
</record>
</odoo>

View file

@ -3,13 +3,14 @@
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form.inherit.l10n_ph_bir</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="after">
<field name="branch_code"/>
<field name="first_name" attrs="{'invisible': [('is_company','=', True)]}"/>
<field name="middle_name" attrs="{'invisible': [('is_company','=', True)]}"/>
<field name="last_name" attrs="{'invisible': [('is_company','=', True)]}"/>
<field name="branch_code" invisible="'PH' not in fiscal_country_codes"/>
<field name="l10n_ph_rdo" invisible="'PH' not in fiscal_country_codes or not ref_company_ids"/>
<field name="first_name" invisible="'PH' not in fiscal_country_codes or is_company"/>
<field name="middle_name" invisible="'PH' not in fiscal_country_codes or is_company"/>
<field name="last_name" invisible="'PH' not in fiscal_country_codes or is_company"/>
</xpath>
</field>
</record>