Skip to content
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

[17.0][MIG] l10n_es_sigaus_sale: Migration to 17.0 #3774

Open
wants to merge 9 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions l10n_es_sigaus_sale/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
===============
SIGAUS - Ventas
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c6f83cd029bdcd1b54eca93e7faf2be6420909c4a255b6e2ae332e3d1795ec9d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/17.0/l10n_es_sigaus_sale
: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-17-0/l10n-spain-17-0-l10n_es_sigaus_sale
: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=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

El origen de SIGAUS responde a la iniciativa de los fabricantes de
lubricantes que, a través de su participación en este Sistema, cumplen
con las obligaciones establecidas en la normativa sobre aceites usados
(Real Decreto 679/2006, de 2 de junio, por el que se regula la gestión
de los aceites industriales usados).

Este módulo permite el cálculo de la aportación SIGAUS en los pedidos de
venta a partir del peso de aquellos productos en los que se aplica.
También traspasa la información referente a la aportación de SIGAUS
desde los pedidos de venta a las facturas generadas a partir de ellos.

- Más información en https://www.sigaus.es

**Table of contents**

.. contents::
:local:

Configuration
=============

La información de configuración puede obtenerse de la documentación del
módulo l10n_es_sigaus_account.

Usage
=====

La información básica de uso puede obtenerse de la documentación del
módulo l10n_es_sigaus_account. Además, es importante tener en cuenta los
siguientes aspectos:

- La aportación SIGAUS establecida en ventas se transfiere a las
facturas.
- En caso de generar una factura parcial a partir de una venta,
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, se
generará una línea de aportación SIGAUS por cada pedido que contengan
dicha aportación.

Known issues / Roadmap
======================

- El módulo no está preparado para añadir automáticamente las líneas de
aportación SIGAUS a los pedidos procedentes del comercio online.

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_sale%0Aversion:%2017.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/17.0/l10n_es_sigaus_sale>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions l10n_es_sigaus_sale/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2023 Manuel Regidor <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from .hooks import pre_init_hook
20 changes: 20 additions & 0 deletions l10n_es_sigaus_sale/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 Manuel Regidor <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "SIGAUS - Ventas",
"summary": "Sist. gestión aceites industriales usados en España - Ventas",
"version": "17.0.1.0.1",
"license": "AGPL-3",
"author": "Sygel, Odoo Community Association (OCA)",
"category": "Accounting",
"website": "https://github.com/OCA/l10n-spain",
"depends": ["l10n_es_sigaus_account", "sale"],
"data": [
"data/exception_templates.xml",
"views/sale_order_views.xml",
"report/ir_actions_report_templates.xml",
],
"pre_init_hook": "pre_init_hook",
"installable": True,
}
27 changes: 27 additions & 0 deletions l10n_es_sigaus_sale/data/exception_templates.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Copyright 2023 Manuel Regidor <[email protected]>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="exception_sigaus_sales">
<div>
Exception(s) occurred on the sales order:
<a
href="#"
data-oe-model="sale.order"
t-att-data-oe-id="origin_sale_order.id"
><t t-esc="origin_sale_order.name" /></a>.
The following products are subject to SIGAUS but have no weight.
<div class="mt16">
<p>Product(s):</p>
<ul t-foreach="products" t-as="product">
<li>
<a
href="#"
data-oe-model="product.product"
t-att-data-oe-id="product.id"
><t t-esc="product.name" /></a>
</li>
</ul>
</div>
</div>
</template>
</odoo>
33 changes: 33 additions & 0 deletions l10n_es_sigaus_sale/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2023 Manuel Regidor <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

import logging

from odoo import tools
from odoo.tools.sql import column_exists

_logger = logging.getLogger(__name__)


def create_columns(cr):
if not column_exists(cr, "sale_order", "is_sigaus"):
_logger.info("Initializing column is_sigaus on table sale_order")
tools.create_column(
cr=cr,
tablename="sale_order",
columnname="is_sigaus",
columntype="boolean",
)

if not column_exists(cr, "sale_order", "sigaus_is_date"):
_logger.info("Initializing column sigaus_is_date on table sale_order")
tools.create_column(
cr=cr,
tablename="sale_order",
columnname="sigaus_is_date",
columntype="boolean",
)


def pre_init_hook(env):
create_columns(env.cr)
104 changes: 104 additions & 0 deletions l10n_es_sigaus_sale/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_sigaus_sale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-02-15 10:00+0000\n"
"PO-Revision-Date: 2024-02-28 21:36+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: l10n_es_sigaus_sale
#: model_terms:ir.ui.view,arch_db:l10n_es_sigaus_sale.exception_sigaus_sales
msgid ""
".\n"
" The following products are subject to SIGAUS but have no weight."
msgstr ""
".\n"
" Los siguientes productos está sujetos a SIGAUS pero no tienen "
"peso."

#. module: l10n_es_sigaus_sale
#: model_terms:ir.ui.view,arch_db:l10n_es_sigaus_sale.report_saleorder_document
msgid "Aportación SIGAUS (RD 679/2006):"
msgstr "Aportación SIGAUS (RD 679/2006):"

#. module: l10n_es_sigaus_sale
#: model_terms:ir.ui.view,arch_db:l10n_es_sigaus_sale.exception_sigaus_sales
msgid "Exception(s) occurred on the sales order:"
msgstr "Excepción(es) en el pedido de venta:"

#. module: l10n_es_sigaus_sale
#: model:ir.model.fields,field_description:l10n_es_sigaus_sale.field_sale_order_line__is_sigaus
msgid "Is Sigaus"
msgstr "Es SIGAUS"

#. module: l10n_es_sigaus_sale
#: model:ir.model,name:l10n_es_sigaus_sale.model_account_move
msgid "Journal Entry"
msgstr "Asiento contable"

#. module: l10n_es_sigaus_sale
#: model_terms:ir.ui.view,arch_db:l10n_es_sigaus_sale.exception_sigaus_sales
msgid "Product(s):"
msgstr "Producto(s):"

#. module: l10n_es_sigaus_sale
#: model:ir.model,name:l10n_es_sigaus_sale.model_sale_order
msgid "Sales Order"
msgstr "Pedido de venta"

#. module: l10n_es_sigaus_sale
#: model:ir.model,name:l10n_es_sigaus_sale.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de pedido de venta"

#. module: l10n_es_sigaus_sale
#: model:ir.model.fields,field_description:l10n_es_sigaus_sale.field_sale_order_line__sigaus_amount
msgid "Sigaus Amount"
msgstr "Cantidad SIGAUS"

#. module: l10n_es_sigaus_sale
#: model:ir.model.fields,field_description:l10n_es_sigaus_sale.field_sale_order__sigaus_automated_exception_id
msgid "Sigaus Automated Exception"
msgstr "Excepción de automatización SIGAUS"

#. module: l10n_es_sigaus_sale
#: model:ir.model.fields,field_description:l10n_es_sigaus_sale.field_sale_order__sigaus_company
msgid "Sigaus Company"
msgstr "Compañía SIGAUS"

#. module: l10n_es_sigaus_sale
#: model:ir.model.fields,field_description:l10n_es_sigaus_sale.field_sale_order__sigaus_has_line
msgid "Sigaus Has Line"
msgstr "Línea SIGAUS"

#. module: l10n_es_sigaus_sale
#: model:ir.model.fields,field_description:l10n_es_sigaus_sale.field_sale_order__sigaus_is_date
msgid "Sigaus Is Date"
msgstr "Fecha SIGAUS"

#. module: l10n_es_sigaus_sale
#: model:ir.model.fields,field_description:l10n_es_sigaus_sale.field_sale_order__is_sigaus
msgid "Subject to SIGAUS"
msgstr "Es SIGAUS"

#. module: l10n_es_sigaus_sale
#: model:ir.model.fields,help:l10n_es_sigaus_sale.field_sale_order__sigaus_is_date
msgid ""
"Technical field to determine whether the date of a document subject to "
"SIGAUS is equal or after the date selected in the company from which SIGAUS "
"has to be applied."
msgstr ""
"Campo técnico para determinar si la fecha de un documento sujeto a SIGAUS es "
"igual o posterior a la fecha seleccionada en la compañía a partir de la que "
"el SIGAUS puede aplicarse."
Loading
Loading