-
-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD]l10n_es_sigaus: manage sigaus expenses
- Loading branch information
1 parent
218a2dd
commit 2a6c49b
Showing
46 changed files
with
2,911 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
============== | ||
L10n Es SIGAUS | ||
============== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:0b9e37c84abcb5a32f97a3d9a8bac4068c3f9085761220ae6438b48faf66110f | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--spain-lightgray.png?logo=github | ||
:target: https://github.com/OCA/l10n-spain/tree/16.0/l10n_es_sigaus | ||
:alt: OCA/l10n-spain | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/l10n-spain-16-0/l10n-spain-16-0-l10n_es_sigaus | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Este módulo permite calcular y agregar a las ventas, compras y facturas la aportación SIGAUS. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
Se tienen que configurar los siguientes aspectos: | ||
|
||
* La configuración del precio de la aportación SIGAUS que se aplica durante un periodo de tiempo se realiza desde Invoicing > Configuration > L10n Es Sigaus Amount. En caso de no rellenar el campo "Date To", el precio seleccionado se aplicará a partir de la fecha indicada en "Date To". El precio establecido dentro del periodo marcado se utilizará siempre que se calcule la aportación SIGAUS desde ventas, facturas o compras. | ||
|
||
* Es necesario indicar aquellas compañías en las que seaplicará la aportación SIGAUS. Para ello, hay que acceder a la pestaña SIGAUS de la configuración de la compañía y marcar la casilla "Enable SIGAUS". Dos opciones adicionales aparecen cuando esta opción está marcada: | ||
* "Show detailed SIGAUS amount in report lines": Si la opción está marcada, se mostrará la aportación SIGAUS de cada una de las líneas de venta, compra y facturas en los informes. | ||
* "Automate SIGAUS": Si la opción está marcada, la aportación SIGAUS se recalculará en los pedidos de venta de manera automática cada vez que se creen o se actualicen, sin necesidad de hacerlo manualmente y siempre que sea aplicable. Asimismo, en caso de que se marque la casilla "No subject to SIGAUS" en los pedidos de venta, se eliminarán las líneas de aportación SIGAUS en caso de haber alguna presente. | ||
|
||
* Se puede establecer que los productos de ciertas categorías de producto están sujetas a SIGAUS accediendo a la configuración de la categoría y marcando la casilla "Subject To Sigaus". | ||
|
||
* Desde la ficha de los productos, pueden establecerse varias opciones de sujeción a la aportación SIGAUS desde el campo "Subject To Sigaus". Existen tres opciones: | ||
* "Category": La aplicación o no de la aportación SIGAUS para ese producto depende se si la casilla "Subject To Sigaus" está o no marcada en la categoría establecida. | ||
* "Yes": Se aplica siempre la aportación SIGAUS, independientemente de lo seleccionado en la categoría de producto. | ||
* "No": No se aplica nunca la aportación SIGAUS, independientemente de lo seleccionado en la categoría de producto. | ||
|
||
Cuando se calcule la aportación SIGAUS en ventas, compras y facturas, se tendrá en cuenta el peso de todos aquellos productos a los que se les aplica la aportación SIGAUS para determinar el importe. | ||
|
||
* Todos los productos a los que se le aplica la aportación SIGAUS deben tener un peso establecido. | ||
|
||
Usage | ||
===== | ||
|
||
* Para aplicar la aportación SIGAUS en las ventas, las compras o las facturas, hay que pulsar en el botón "Apply Sigaus". | ||
|
||
* En caso de producirse cambios en las líneas, se puede recalcular la aportación SIGAUS pulsando en el botón "Recompute Sigaus". | ||
|
||
* El importe de la aportación SIGAUS se calculará a partir de los pesos de aquellos productos sujetos a dicha aportación y el precio establecido en "L10n Es Sigaus Amount" según la fecha actual. | ||
|
||
* Los productos sujetos a aportación SIGAUS son los siguientes: | ||
* Aquellos que tienen establecida la opción "Yes" en el campo "Subject to SIGAUS" | ||
* Aquellos que tienen establecida la opción "Category" en el campo "Subject to SIGAUS" y cuya categoría tenga marcada la opción "Subject to SIGAUS". | ||
|
||
* En caso de generar una factura parcial a partir de una venta o una compra, solamente se facturará la parte proporcional de la aportación SIGAUS correspondiente a los productos facturados. | ||
|
||
* En caso de generar una factura a partir de varios pedidos de venta o compra, se generará una línea de aportación SIGAUS por cada uno de los pedidos que contengan dicha aportación. | ||
|
||
* Saltará un error si al calcular la aportación SIGAUS, alguno de los productos sujetos no tiene un peso establecido. | ||
|
||
* La aportación SIGAUS establecida en ventas y compras se transfiere a las facturas. | ||
|
||
* En ventas y facturas, si se marca la opción "No subject to SIGAUS", no se aplicará la aportación SIGAUS. | ||
|
||
* Más información en https://www.sigaus.es | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-spain/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_sigaus%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Sygel | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Sygel <https://sygel.es>`_: | ||
* Manuel Regidor <[email protected]> | ||
* Harald Panten <[email protected]> | ||
* Valentín Vinagre <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/16.0/l10n_es_sigaus>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "L10n Es SIGAUS", | ||
"summary": "Apply SIGAUS to sales, purchases and invoices.", | ||
"version": "16.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "Sygel, Odoo Community Association (OCA)", | ||
"category": "Sales", | ||
"website": "https://github.com/OCA/l10n-spain", | ||
"depends": ["base", "account", "sale", "purchase", "base_automation"], | ||
"data": [ | ||
"data/data.xml", | ||
"security/ir.model.access.csv", | ||
"views/l10n_es_sigaus_amount_views.xml", | ||
"views/product_category_views.xml", | ||
"views/product_views.xml", | ||
"views/sale_order_views.xml", | ||
"views/purchase_views.xml", | ||
"views/account_move_views.xml", | ||
"views/report_invoice.xml", | ||
"views/res_company_views.xml", | ||
"views/account_fiscal_position_views.xml", | ||
"report/ir_actions_report_templates.xml", | ||
"report/purchase_order_templates.xml", | ||
"report/purchase_quotation_templates.xml", | ||
], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<odoo noupdate="1"> | ||
<!-- Copyright 2023 Manuel Regidor <[email protected]> | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> | ||
<data> | ||
<record id="aportacion_sigaus_product_template" model="product.product"> | ||
<field name="name">Aportación SIGAUS (R.D. 679/2006)</field> | ||
<field name="company_id" eval="False" /> | ||
<field name="detailed_type">service</field> | ||
<field name="list_price">0.0</field> | ||
<field name="subject_to_sigaus">no</field> | ||
<field name="invoice_policy">order</field> | ||
<field name="taxes_id" eval="False" /> | ||
<field name="supplier_taxes_id" eval="False" /> | ||
<field name="purchase_method">purchase</field> | ||
<field name="uom_id" ref="uom.product_uom_kgm" /> | ||
<field name="uom_po_id" ref="uom.product_uom_kgm" /> | ||
</record> | ||
</data> | ||
<data> | ||
<record id="aportacion_sigaus_2023" model="l10n.es.sigaus.amount"> | ||
<field name="name">Aportación SIGAUS 2023</field> | ||
<field name="date_from">2023-1-1</field> | ||
<field name="date_to">2023-12-31</field> | ||
<field name="price">0.06</field> | ||
</record> | ||
</data> | ||
<data> | ||
<record id="aportacion_sigaus_2024" model="l10n.es.sigaus.amount"> | ||
<field name="name">Aportación SIGAUS 2024</field> | ||
<field name="date_from">2024-1-1</field> | ||
<field name="price">0.05</field> | ||
</record> | ||
</data> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import sigaus_mixin | ||
from . import sigaus_line_mixin | ||
from . import l10n_es_sigaus_amount | ||
from . import product_category | ||
from . import product_template | ||
from . import product_product | ||
from . import sale_order | ||
from . import sale_order_line | ||
from . import purchase_order | ||
from . import purchase_order_line | ||
from . import account_move | ||
from . import account_move_line | ||
from . import res_company | ||
from . import account_fiscal_position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright 2023 Manuel Regidor <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class AccountFiscalPosition(models.Model): | ||
_inherit = "account.fiscal.position" | ||
|
||
subject_to_sigaus = fields.Boolean() |
Oops, something went wrong.