-
Notifications
You must be signed in to change notification settings - Fork 19
L10n ve accountant fix#58983 amounts #377
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
base: dev-19
Are you sure you want to change the base?
Conversation
…on #58513 Corrijiendo error al intentar instalar debido a las vistas. Link:https://binaural.odoo.com/web/#id=58513&cids=2&menu_id=975&action=341&model=project.task&view_type=form
Corrijiendo vistas para que se muestren los calculos foraneos 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 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
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 Require a review from approvers teamThis rule is failing.This rule requires someone from the approver's team to approve the PR
|
There was a problem hiding this 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
treeview terminology tolistin 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
- This write to property 'template' is useless, since another property write always overrides it.
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"; |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
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.
| TaxTotalsComponents.template = "l10n_ve_tax.TaxForeignTotalsField"; |
| 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 |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
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.
| 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); |
| <h1> | ||
| <span t-out="totals.currency_id.symbol"/> | ||
| </h1> |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
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.
| <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> |
| 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 |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
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.
| 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); |
| 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; |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
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.
| }, | ||
|
|
||
| formatMonetaryForeign(value) { | ||
| const currency = this.props.record.data.foreign_currency_id; |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
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.
| 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 ""; | |
| } |
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
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(-)
No description provided.