Skip to content

Conversation

@Ivan-Binaural
Copy link
Contributor

No description provided.

Corrijiendo vistas para que se muestren los calculos foraneos, tanto en moneda alterna como en totales impuestos

Link:https://binaural.odoo.com/web/#id=58983&cids=2&menu_id=975&action=341&model=project.task&view_type=form
Corrijiendo vistas para que se muestren los calculos foraneos, tanto en moneda alterna como en totales impuestos

Link:https://binaural.odoo.com/web/#id=58983&cids=2&menu_id=975&action=341&model=project.task&view_type=form
Corrijiendo vistas para que se muestren solo los calculos en bolivares a peticion del cliente en un componente personalizado
Link:https://binaural.odoo.com/web/#id=58983&cids=2&menu_id=975&action=341&model=project.task&view_type=form
Corrijiendo vistas para que se muestren solo los calculos en bolivares a peticion del cliente en un componente personalizado
agregando dichos campos en el componente de javascript tax_totals para que se reflejen en las vistas correspondientes
Link:https://binaural.odoo.com/web/#id=58983&cids=2&menu_id=975&action=341&model=project.task&view_type=form
Corrijiendo vistas para que se muestren solo los calculos en bolivares a peticion del cliente en un componente personalizado

agregando dichos campos en el componente de javascript tax_totals para que se reflejen en las vistas correspondientes
y se toma en cuenta como estan organizados tanto en backend como en front-end
Link:https://binaural.odoo.com/web/#id=58983&cids=2&menu_id=975&action=341&model=project.task&view_type=form
@Ivan-Binaural Ivan-Binaural self-assigned this Nov 10, 2025
Copilot AI review requested due to automatic review settings November 10, 2025 13:08
@Ivan-Binaural Ivan-Binaural added ❌ Cambios funcionales Se requieren ajustes de funcionalidad antes de la aprobación final ⚙️ Cambios técnicos Etiqueta de estado de revisión: Se requieren ajustes de implementación, rendimiento o arquitectura. 19.0 labels Nov 10, 2025
@mergify
Copy link

mergify bot commented Nov 10, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require a review from approvers team

This rule is failing.

This rule requires someone from the approver's team to approve the PR

  • approved-reviews-by = @probadores

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates Odoo view definitions and tax totals components to align with modern Odoo conventions and adds support for displaying tax totals in VES currency.

Key changes:

  • Migration from deprecated tree view terminology to list in XML view definitions
  • Addition of VES currency-specific tax totals display widget
  • Simplification of search filter definitions by removing nested groups
  • Version bumps for both modules

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
l10n_ve_payment_extension/views/tax_unit.xml Updates view names and tags from tree to list
l10n_ve_payment_extension/views/payment_concept.xml Changes view_mode from tree to list
l10n_ve_payment_extension/views/ir_sequence.xml Updates view_mode for sequence actions from tree to list
l10n_ve_payment_extension/views/fees_retention.xml Updates view name and view_mode from tree to list
l10n_ve_payment_extension/views/economic_branch.xml Migrates to list view and simplifies search filters
l10n_ve_payment_extension/views/economic_activity.xml Changes view_mode from tree to list
l10n_ve_payment_extension/views/account_retention_municipal.xml Simplifies search filters and removes nested groups
l10n_ve_payment_extension/views/account_retention_iva.xml Simplifies search filters and removes nested groups
l10n_ve_payment_extension/manifest.py Version bump to 1.1
l10n_ve_accountant/views/account_move.xml Adds VES tax totals widget display to invoice form
l10n_ve_accountant/static/src/components/tax_totals/tax_totals.xml Adds VES-specific tax totals template with formatting
l10n_ve_accountant/static/src/components/tax_totals/tax_totals.js Implements VES currency formatting logic and registration
l10n_ve_accountant/models/account_tax.py Adds VES currency formatted amounts to tax totals
l10n_ve_accountant/manifest.py Version bump to 1.3
Comments suppressed due to low confidence (3)

l10n_ve_accountant/static/src/components/tax_totals/tax_totals.xml:33

  • Inappropriate or informal label text 'Subtotal pinga' should be replaced with proper label text like 'Subtotal'
                    <label class="o_form_label o_tax_total_label">Subtotal pinga</label>

l10n_ve_accountant/static/src/components/tax_totals/tax_totals.js:19

  • This expression assigns property formatted_total_amount_currency_ves to itself.
    totals.formatted_total_amount_currency_ves = totals.formatted_total_amount_currency_ves

l10n_ve_accountant/static/src/components/tax_totals/tax_totals.js:56

TaxTotalsComponents.template = "l10n_ve_tax.TaxForeignTotalsField";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


export class TaxTotalsComponents extends TaxTotalsComponent {
}
TaxTotalsComponents.template = "l10n_ve_tax.TaxForeignTotalsField";
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template property is assigned twice consecutively. The first assignment on line 56 is immediately overwritten by line 57, making it ineffective. Remove line 56 if only the VES template should be used, or clarify the intended logic.

Suggested change
TaxTotalsComponents.template = "l10n_ve_tax.TaxForeignTotalsField";

Copilot uses AI. Check for mistakes.
return;
}
const foreignCurrencyFmtOpts = { currencyId: props.record.data.foreign_currency_id && props.record.data.foreign_currency_id[0] };
totals.formatted_total_amount_currency_ves = totals.formatted_total_amount_currency_ves
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line assigns a property to itself, which has no effect. Either remove this line or implement the intended formatting logic.

Suggested change
totals.formatted_total_amount_currency_ves = totals.formatted_total_amount_currency_ves
totals.formatted_total_amount_currency_ves = formatMonetary(totals.total_amount_currency_ves, currencyFmtOpts);

Copilot uses AI. Check for mistakes.
Comment on lines +61 to +63
<h1>
<span t-out="totals.currency_id.symbol"/>
</h1>
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <h1> element is incorrectly placed inside a <tbody> element. Table body elements should only contain <tr> elements. Consider moving this to a table header (<thead>) or using a different approach to display the currency symbol.

Suggested change
<h1>
<span t-out="totals.currency_id.symbol"/>
</h1>
<tr>
<td colspan="2" style="text-align: center;">
<span style="font-size: 2em; font-weight: bold;" t-out="totals.currency_id.symbol"/>
</td>
</tr>

Copilot uses AI. Check for mistakes.
Comment on lines 20 to 26
if (totals.subtotals && Array.isArray(totals.subtotals)) {
for (let subtotal of totals.subtotals) {
subtotal.formatted_base_amount_foreign_currency = formatMonetary(subtotal.base_amount_foreign_currency, foreignCurrencyFmtOpts);
subtotal.formatted_base_amount_currency = formatMonetary(subtotal.base_amount_currency, currencyFmtOpts);
subtotal.formatted_base_amount_currency_ves = totals.formatted_base_amount_currency_ves
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assigns a value from totals to each subtotal, but totals.formatted_base_amount_currency_ves is only assigned to itself on line 19 (no-op). This will propagate undefined or stale values. The VES formatting should be applied properly to each subtotal's actual amount.

Suggested change
if (totals.subtotals && Array.isArray(totals.subtotals)) {
for (let subtotal of totals.subtotals) {
subtotal.formatted_base_amount_foreign_currency = formatMonetary(subtotal.base_amount_foreign_currency, foreignCurrencyFmtOpts);
subtotal.formatted_base_amount_currency = formatMonetary(subtotal.base_amount_currency, currencyFmtOpts);
subtotal.formatted_base_amount_currency_ves = totals.formatted_base_amount_currency_ves
const vesCurrencyFmtOpts = { currencyId: props.record.data.ves_currency_id && props.record.data.ves_currency_id[0] };
if (totals.subtotals && Array.isArray(totals.subtotals)) {
for (let subtotal of totals.subtotals) {
subtotal.formatted_base_amount_foreign_currency = formatMonetary(subtotal.base_amount_foreign_currency, foreignCurrencyFmtOpts);
subtotal.formatted_base_amount_currency = formatMonetary(subtotal.base_amount_currency, currencyFmtOpts);
subtotal.formatted_base_amount_currency_ves = formatMonetary(subtotal.base_amount_currency, vesCurrencyFmtOpts);

Copilot uses AI. Check for mistakes.
taxGroup.formatted_base_amount_foreign_currency = formatMonetary(taxGroup.base_amount_foreign_currency, foreignCurrencyFmtOpts);
taxGroup.formatted_tax_amount_currency = formatMonetary(taxGroup.tax_amount_currency, currencyFmtOpts);
taxGroup.formatted_base_amount_currency = formatMonetary(taxGroup.base_amount_currency, currencyFmtOpts);
taxGroup.formatted_tax_amount_currency_ves = totals.formatted_tax_amount_currency_ves;
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the subtotal issue, this assigns a value from totals to each taxGroup, but the source value is never properly calculated. Each tax group should have its VES-formatted amount calculated individually based on its own values.

Copilot uses AI. Check for mistakes.
},

formatMonetaryForeign(value) {
const currency = this.props.record.data.foreign_currency_id;
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If foreign_currency_id is null or undefined, accessing currency.id will cause a runtime error. Add a null check before accessing the id property.

Suggested change
const currency = this.props.record.data.foreign_currency_id;
const currency = this.props.record.data.foreign_currency_id;
if (!currency || !currency.id) {
// Si no hay moneda extranjera, retornar el valor original o una cadena vacía
return "";
}

Copilot uses AI. Check for mistakes.
Corrijiendo vistas para que se muestren solo los calculos en bolivares a peticion del cliente en un componente personalizado

agregando dichos campos en el componente de javascript tax_totals para que se reflejen en las vistas correspondientes

y se toma en cuenta como estan organizados tanto en backend como en front-end.

Ajuste sugerido por omar, en donde se tiene en cuenta los montos de la moneda local, para la conversion, queda probar con diferentes monedas, debido a que mi ambiente esta algo raro al no mostrar el campo de moneda correspondiente

Link:https://binaural.odoo.com/web/#id=58983&cids=2&menu_id=975&action=341&model=project.task&view_type=form
Corrijiendo vistas para que se muestren solo los calculos en bolivares a peticion del cliente en un componente personalizado

agregando dichos campos en el componente de javascript tax_totals para que se reflejen en las vistas correspondientes

y se toma en cuenta como estan organizados tanto en backend como en front-end.

Ajuste sugerido por omar, en donde se tiene en cuenta los montos de la moneda local, para la conversion, queda probar con diferentes monedas, debido a que mi ambiente esta algo raro al no mostrar el campo de moneda correspondiente
Corrijiendo vistas para que se muestren solo los calculos en bolivares a peticion del cliente en un componente personalizado

agregando dichos campos en el componente de javascript tax_totals para que se reflejen en las vistas correspondientes

y se toma en cuenta como estan organizados tanto en backend como en front-end.

Ajuste sugerido por omar, en donde se tiene en cuenta los montos de la moneda local, para la conversion, queda probar con diferentes monedas, debido a que mi ambiente esta algo raro al no mostrar el campo de moneda correspondiente
@Ivan-Binaural Ivan-Binaural requested a review from a team November 10, 2025 20:00
Corrijiendo vistas para que se muestren solo los calculos en bolivares a peticion del cliente en un componente personalizado

agregando dichos campos en el componente de javascript tax_totals para que se reflejen en las vistas correspondientes

y se toma en cuenta como estan organizados tanto en backend como en front-end.

Ajuste sugerido por omar, en donde se tiene en cuenta los montos de la moneda local, para la conversion, queda probar con diferentes monedas, debido a que mi ambiente esta algo raro al no mostrar el campo de moneda correspondiente

1 file changed, 3 insertions(+), 3 deletions(-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

19.0 ❌ Cambios funcionales Se requieren ajustes de funcionalidad antes de la aprobación final ⚙️ Cambios técnicos Etiqueta de estado de revisión: Se requieren ajustes de implementación, rendimiento o arquitectura.

Development

Successfully merging this pull request may close these issues.

2 participants