Movidos los informes de Impuestos y Productos al plugin Informes#1887
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request moves tax and product report functionality from the FacturaScripts Core to the "Informes" (Reports) plugin. This is a significant refactoring that extracts reporting features into a separate plugin while maintaining backward compatibility through the Dinamic class system.
Changes:
- Deleted Core implementations of ReportTaxes and ReportProducto controllers along with their associated models, views, and XML configurations
- Updated Dinamic wrapper classes to extend from the Informes plugin instead of Core
- Added Dashboard icon to the main menu navigation bar
- Configured Dashboard to not appear in the menu (showonmenu = false)
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Core/Controller/ReportTaxes.php | Deleted - Tax report controller moved to plugin |
| Core/Controller/ReportProducto.php | Deleted - Product report controller moved to plugin |
| Core/Model/Join/FacturaProveedorProducto.php | Deleted - Supplier invoice product join model moved to plugin |
| Core/Model/Join/FacturaClienteProducto.php | Deleted - Customer invoice product join model moved to plugin |
| Core/Model/Join/AlbaranProveedorProducto.php | Deleted - Supplier delivery note product join model moved to plugin |
| Core/Model/Join/AlbaranClienteProducto.php | Deleted - Customer delivery note product join model moved to plugin |
| Core/XMLView/FacturaProveedorProducto.xml | Deleted - XML view configuration moved to plugin |
| Core/XMLView/FacturaClienteProducto.xml | Deleted - XML view configuration moved to plugin |
| Core/View/ReportTaxes.html.twig | Deleted - Twig template moved to plugin |
| Dinamic/Model/Join/FacturaProveedorProducto.php | Updated to extend from Informes plugin |
| Dinamic/Model/Join/FacturaClienteProducto.php | Updated to extend from Informes plugin |
| Dinamic/Model/Join/AlbaranProveedorProducto.php | Updated to extend from Informes plugin |
| Dinamic/Model/Join/AlbaranClienteProducto.php | Updated to extend from Informes plugin |
| Core/Controller/Dashboard.php | Added showonmenu = false to prevent Dashboard from appearing in menu |
| Core/View/Master/MenuTemplate.html.twig | Added Dashboard icon to navigation bar |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * @author FacturaScripts <carlos@facturascripts.com> | ||
| */ | ||
| class FacturaProveedorProducto extends \FacturaScripts\Core\Model\Join\FacturaProveedorProducto | ||
| class FacturaProveedorProducto extends \FacturaScripts\Plugins\Informes\Model\Join\FacturaProveedorProducto |
There was a problem hiding this comment.
The Dinamic classes now extend classes from the Informes plugin. If the Informes plugin is not installed or enabled, these Dinamic classes will fail to load because their parent classes won't exist. This creates a hard dependency on the plugin.
Consider one of these approaches:
- If the Informes plugin should be a required core dependency, ensure it's documented and enforced through the plugin system
- If these models are optional functionality, the Dinamic files should also be in the plugin (not in Core), and should be auto-deployed when the plugin is enabled
- Keep fallback implementations in Core if the plugin is optional
The current approach of having Dinamic wrapper classes in Core that extend plugin classes suggests the Informes plugin is required, but this should be explicitly managed.
¿Cómo has probado los cambios?
Toda modificación debe haber sido mínimamente probada. Marca o describe las pruebas que has realizado: