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_purchase: Migration to 17.0 #3773

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
116 changes: 116 additions & 0 deletions l10n_es_sigaus_purchase/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
================
SIGAUS - Compras
================

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

.. |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_purchase
: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_purchase
: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
compra 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 compra 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 compras se transfiere a las
facturas.
- En caso de generar una factura parcial a partir de 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 compra,
se generará una línea de aportación SIGAUS por cada uno de los pedidos
que contengan dicha aportación.
- Para poder calcular el precio de la aportación SIGAUS, puesto que
depende de la fecha, es necesario que el campo "Fecha límite de
pedido" de los pedidos de compra esté establecido.

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_purchase%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 <manuel.regidor@sygel.es>
- Harald Panten <harald.panten@sygel.es>
- Valentín Vinagre <valentin.vinagre@sygel.es>

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_purchase>`_ 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_purchase/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
# 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_purchase/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "SIGAUS - Compras",
"summary": "Sistema de gestión de aceites industriales usados en España - Compras",
"version": "17.0.1.0.1",
"license": "AGPL-3",
"author": "Sygel, Odoo Community Association (OCA)",
"category": "Sales",
"website": "https://github.com/OCA/l10n-spain",
"depends": ["l10n_es_sigaus_account", "purchase"],
"data": [
"views/purchase_views.xml",
"report/purchase_order_templates.xml",
"report/purchase_quotation_templates.xml",
],
"pre_init_hook": "pre_init_hook",
"installable": True,
}
34 changes: 34 additions & 0 deletions l10n_es_sigaus_purchase/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
# 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, "purchase_order", "is_sigaus"):
_logger.info("Initializing column is_sigaus on table purchase_order")
tools.create_column(
cr=cr,
tablename="purchase_order",
columnname="is_sigaus",
columntype="boolean",
)

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


def pre_init_hook(env):
create_columns(env.cr)
85 changes: 85 additions & 0 deletions l10n_es_sigaus_purchase/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_sigaus_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-02-15 09:59+0000\n"
"PO-Revision-Date: 2024-02-28 21:36+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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_purchase
#: model_terms:ir.ui.view,arch_db:l10n_es_sigaus_purchase.report_purchaseorder_document
#: model_terms:ir.ui.view,arch_db:l10n_es_sigaus_purchase.report_purchasequotation_document
msgid "Aportación SIGAUS (RD 679/2006):"
msgstr "Aportación SIGAUS (RD 679/2006):"

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

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

#. module: l10n_es_sigaus_purchase
#: model:ir.model,name:l10n_es_sigaus_purchase.model_purchase_order
msgid "Purchase Order"
msgstr "Pedido de compra"

#. module: l10n_es_sigaus_purchase
#: model:ir.model,name:l10n_es_sigaus_purchase.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Línea de pedido de compra"

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

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

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,field_description:l10n_es_sigaus_purchase.field_purchase_order__sigaus_company
msgid "Sigaus Company"
msgstr "Comañía SIGAUS"

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

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

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

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,help:l10n_es_sigaus_purchase.field_purchase_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."
78 changes: 78 additions & 0 deletions l10n_es_sigaus_purchase/i18n/l10n_es_sigaus_purchase.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_es_sigaus_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

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

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,field_description:l10n_es_sigaus_purchase.field_purchase_order_line__is_sigaus
msgid "Is Sigaus"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model,name:l10n_es_sigaus_purchase.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model,name:l10n_es_sigaus_purchase.model_purchase_order
msgid "Purchase Order"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model,name:l10n_es_sigaus_purchase.model_purchase_order_line
msgid "Purchase Order Line"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,field_description:l10n_es_sigaus_purchase.field_purchase_order_line__sigaus_amount
msgid "Sigaus Amount"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,field_description:l10n_es_sigaus_purchase.field_purchase_order__sigaus_automated_exception_id
msgid "Sigaus Automated Exception"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,field_description:l10n_es_sigaus_purchase.field_purchase_order__sigaus_company
msgid "Sigaus Company"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,field_description:l10n_es_sigaus_purchase.field_purchase_order__sigaus_has_line
msgid "Sigaus Has Line"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,field_description:l10n_es_sigaus_purchase.field_purchase_order__sigaus_is_date
msgid "Sigaus Is Date"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,field_description:l10n_es_sigaus_purchase.field_purchase_order__is_sigaus
msgid "Subject to SIGAUS"
msgstr ""

#. module: l10n_es_sigaus_purchase
#: model:ir.model.fields,help:l10n_es_sigaus_purchase.field_purchase_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 ""
6 changes: 6 additions & 0 deletions l10n_es_sigaus_purchase/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2023 Manuel Regidor <manuel.regidor@sygel.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import purchase_order
from . import purchase_order_line
from . import account_move
Loading
Loading