Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][REF] l10n_do_accounting: path references update to v17 #1137

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions l10n_do_accounting/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
"security/res_groups.xml",
# "data/l10n_latam.document.type.csv",
# "wizard/account_move_reversal_views.xml",
# "wizard/account_move_cancel_views.xml",
# "wizard/account_debit_note_views.xml",
# "views/res_config_settings_view.xml",
# "views/account_move_views.xml",
# "views/res_partner_views.xml",
# "views/res_company_views.xml",
# "views/account_dgii_menuitem.xml",
# "views/account_journal_views.xml",
# "views/l10n_latam_document_type_views.xml",
# "views/report_templates.xml",
# "views/report_invoice.xml",
"wizard/account_move_cancel_views.xml",
"wizard/account_debit_note_views.xml",
"views/res_config_settings_view.xml",
"views/account_move_views.xml",
"views/res_partner_views.xml",
"views/res_company_views.xml",
"views/account_dgii_menuitem.xml",
"views/account_journal_views.xml",
"views/l10n_latam_document_type_views.xml",
"views/report_templates.xml",
"views/report_invoice.xml",
],
# only loaded in demonstration mode
"demo": [
Expand Down
21 changes: 7 additions & 14 deletions l10n_do_accounting/views/account_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
invisible="state in ('draft', 'cancel') or country_code != 'DO'"/>
</xpath>
<xpath expr="//button[@name='button_draft']" position="attributes">
<attribute name="invisible">restrict_mode_hash_table
or (state not in ('posted', 'cancel') and country_code != 'DO')
or (state != 'cancel' and country_code == 'DO')</attribute>
<attribute name="invisible">restrict_mode_hash_table == True or (state not in ('posted', 'cancel') and country_code != 'DO') or (state != 'cancel' and country_code == 'DO')</attribute>
</xpath>
<xpath expr="//h1/span/.." position="after">
<h4 invisible="state != 'cancel' or country_code != 'DO'">
Expand All @@ -46,21 +44,16 @@
</xpath>
<xpath expr="//field[@name='l10n_latam_document_number']" position="attributes">
<attribute name="required">l10n_do_enable_first_sequence or l10n_latam_manual_document_number and (l10n_latam_use_documents and country_code == 'DO')</attribute>
<attribute name="invisible">
(not l10n_latam_use_documents and country_code == 'DO')
or (not l10n_do_enable_first_sequence and not l10n_latam_manual_document_number and state == 'draft')
or (not l10n_do_enable_first_sequence and l10n_latam_manual_document_number and state == 'draft')
and (move_type in ('out_invoice', 'out_refund', 'in_refund') and country_code == 'DO')
</attribute>
<attribute name="invisible">(not l10n_latam_use_documents and country_code == 'DO') or (not l10n_do_enable_first_sequence and not l10n_latam_manual_document_number and state == 'draft') or (not l10n_do_enable_first_sequence and l10n_latam_manual_document_number and state == 'draft') and (move_type in ('out_invoice', 'out_refund', 'in_refund') and country_code == 'DO')</attribute>
<attribute name="readonly">(state != 'draft' and country_code == 'DO') or (posted_before and country_code == 'DO')</attribute>
</xpath>
<xpath expr="//form[1]/sheet[1]/group[1]/group[1]/field[@name='partner_id']" position="after">
<xpath expr="//field[@name='l10n_latam_document_type_id']" position="move"/>
<xpath expr="//field[@name='l10n_latam_document_number']" position="move"/>
<field name="l10n_do_origin_ncf"
invisible="(move_type not in ('in_refund', 'out_refund') and not debit_origin_id) or (move_type not in ('in_refund', 'out_refund') and (not l10n_latam_use_documents or country_code != 'DO')"
invisible="(move_type not in ('in_refund', 'out_refund') and not debit_origin_id) or (move_type not in ('in_refund', 'out_refund') and not l10n_latam_use_documents or country_code != 'DO')"
required="(move_type in ('in_refund', 'out_refund') and l10n_latam_use_documents) or debit_origin_id"
readonly="state != draft"/>
readonly="state != 'draft'"/>
<field name="l10n_do_ecf_modification_code"
invisible="(move_type not in ('in_refund', 'out_refund') and not debit_origin_id) or (move_type in ('in_refund', 'out_refund') and not is_ecf_invoice) or (debit_origin_id and not is_ecf_invoice) or country_code != 'DO'"
required="is_ecf_invoice and (move_type in ('in_refund', 'out_refund') or debit_origin_id)"
Expand All @@ -69,12 +62,12 @@
</xpath>
<xpath expr="//field[@name='l10n_latam_document_number']" position="after">
<field name="l10n_do_income_type"
invisible="not l10n_latam_use_documents or (move_type != 'out_invoice or country_code != 'DO')"
required="l10n_latam_use_documents and move_type = 'out_invoice'"
invisible="not l10n_latam_use_documents or (move_type != 'out_invoice' or country_code != 'DO')"
required="l10n_latam_use_documents and move_type == 'out_invoice'"
readonly="state != 'draft'"/>
<field name="l10n_do_expense_type"
invisible="not l10n_latam_use_documents or (move_type != 'in_invoice' or country_code != 'DO')"
required="l10n_latam_use_documents and move_type = 'in_invoice'"
required="l10n_latam_use_documents and move_type == 'in_invoice'"
readonly="state != 'draft'"/>
</xpath>
<xpath expr="//div[@name='journal_div']" position="after">
Expand Down
4 changes: 2 additions & 2 deletions l10n_do_accounting/views/report_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
</xpath>

<!-- Total monto descuento en líneas -->
<xpath expr="//th[@name='th_price_unit']" position="after">
<xpath expr="//th[@name='th_discount']" position="after">
<th t-if="is_l10n_do_invoice and display_discount and ecf_representation"
t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span>Monto descuento</span>
Expand Down Expand Up @@ -340,7 +340,7 @@

<template id="report_invoice_with_payments"
inherit_id="account.report_invoice_with_payments">
<xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
<xpath expr='//t[@t-set="print_with_payments"]' position="after">
<t t-if="o._get_name_invoice_report() == 'l10n_do_accounting.report_invoice_document_inherited'"
t-call="l10n_do_accounting.report_invoice_document_inherited"
t-lang="lang"/>
Expand Down
2 changes: 1 addition & 1 deletion l10n_do_accounting/views/report_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<template id="web_address_layout_inherited" inherit_id="web.address_layout">
<!-- do not show company address on document header -->
<xpath expr="//t[@t-if='address']/div" position="attributes">
<xpath expr="//div[@t-if='address']/div" position="attributes">
<attribute name="t-if">doc_model != "account.move" or (doc_model == "account.move" and o.country_code != "DO")</attribute>
</xpath>
</template>
Expand Down
Loading