-
Notifications
You must be signed in to change notification settings - Fork 19
FEAT #59280: l10n_ve_account_move_line #376
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?
FEAT #59280: l10n_ve_account_move_line #376
Conversation
Problema: -Al cambiar la moneda de la factura, los asientos se muestran desbalanceados en las líneas de cŕedito y débito alterno. Solución: -Se añaden validaciones para ajustar los casos según la moneda de la factura, si la moneda de la factura es la principal, sigue el flujo que estaba anteriormente. Si la moneda de la factura es la misma que la foranea, el precio foraneo es igual al precio standar. En el caso de tener una moneda diferente a la principal y secundaria, entonces se realiza una conversión a la moneda principal y a partir de esta, se convierte a la foranea. Tarea (Link): https://binaural.odoo.com/web#id=59280&cids=2&menu_id=309&model=project.task&view_type=form Tarea de proyecto [x] Ticket de soporte []
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 enhances the foreign price computation logic in the Venezuelan accounting localization module to handle multiple currency scenarios. The version has been updated from 1.0 to 1.4 to reflect these changes.
Key Changes:
- Enhanced
_compute_foreign_pricemethod to handle three currency scenarios: company currency, foreign currency, and other currencies - Added
currency_idto the@api.dependsdecorator to ensure proper recomputation when currency changes - Updated module version to 1.4
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| l10n_ve_accountant/models/account_move_line.py | Enhanced foreign price computation with multi-currency support and Spanish comments explaining the logic |
| l10n_ve_accountant/manifest.py | Bumped module version from 1.0 to 1.4 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| line.move_id.invoice_date or fields.Date.today(), | ||
| ) | ||
| # Luego convertir de la moneda principal a la foránea usando la tasa de la factura | ||
| line.foreign_price = price_in_company * line.foreign_inverse_rate |
Copilot
AI
Nov 9, 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.
Hay un espacio en blanco adicional al final de la línea 149 que debe eliminarse.
| company_currency = line.company_id.currency_id | ||
| foreign_currency = line.company_id.foreign_currency_id | ||
| # Si la línea está en moneda principal de la compañía | ||
| if line.currency_id.id == company_currency.id: |
Copilot
AI
Nov 9, 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.
En Odoo, es mejor usar == directamente con objetos recordset en lugar de comparar IDs. Cambiar a if line.currency_id == company_currency: para mejor legibilidad y consistencia con las mejores prácticas de Odoo.
| if line.currency_id.id == company_currency.id: | ||
| line.foreign_price = line.price_unit * line.foreign_inverse_rate | ||
| # Si la línea está en moneda foránea | ||
| elif line.currency_id.id == foreign_currency.id: |
Copilot
AI
Nov 9, 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.
En Odoo, es mejor usar == directamente con objetos recordset en lugar de comparar IDs. Cambiar a elif line.currency_id == foreign_currency: para mejor legibilidad y consistencia con las mejores prácticas de Odoo.
Problema:
-Al cambiar la moneda de la factura, los asientos se muestran desbalanceados en las líneas de cŕedito y débito alterno.
Solución:
-Se añaden validaciones para ajustar los casos según la moneda de la factura, si la moneda de la factura es la principal, sigue el flujo que estaba anteriormente. Si la moneda de la factura es la misma que la foranea, el precio foraneo es igual al precio standar. En el caso de tener una moneda diferente a la principal y secundaria, entonces se realiza una conversión a la moneda principal y a partir de esta, se convierte a la foranea.
Tarea (Link):
https://binaural.odoo.com/web#id=59280&cids=2&menu_id=309&model=project.task&view_type=form
Tarea de proyecto [x]
Ticket de soporte []