Skip to content
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
103 changes: 103 additions & 0 deletions product_ingredient/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===================
Product Ingredients
===================

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

.. |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/license-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%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/16.0/product_ingredient
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_ingredient
: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/product-attribute&target_branch=16.0
:alt: Try me on Runboat

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

This module allows to set ingredients information for a given product.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module you have to:

- Create or edit a product variant or product template with just a
variant.
- Go to ingredients page
- Create some ingredients for the product.

Now you can print the "Ingredients Info" report label.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/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/product-attribute/issues/new?body=module:%20product_ingredient%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
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__

- Sergio Teruel
- Carlos Dauden

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.

.. |maintainer-sergio-teruel| image:: https://github.com/sergio-teruel.png?size=40px
:target: https://github.com/sergio-teruel
:alt: sergio-teruel

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sergio-teruel|

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/16.0/product_ingredient>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions product_ingredient/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import pre_init_hook
26 changes: 26 additions & 0 deletions product_ingredient/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2023 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Ingredients",
"summary": "Product ingredients",
"version": "16.0.1.0.1",
"development_status": "Beta",
"category": "Technical Settings",
"website": "https://github.com/OCA/product-attribute",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["sergio-teruel"],
"license": "AGPL-3",
"depends": ["product", "stock"],
"external_dependencies": {"python": ["openupgradelib"]},
"data": [
"security/ir.model.access.csv",
"data/product_allergen_data.xml",
"views/product_attribute_value_views.xml",
"views/product_ingredient_views.xml",
"views/product_views.xml",
"views/stock_lot_view.xml",
],
"pre_init_hook": "pre_init_hook",
"application": False,
"installable": True,
}
9 changes: 9 additions & 0 deletions product_ingredient/data/product_allergen_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- This file is preloaded with pre_init_hook. Use other file if is needed -->
<odoo noupdate="1">
<record id="product_allergen_attribute" model="product.attribute">
<field name="name">Allergens</field>
<field name="create_variant">no_variant</field>
<field name="display_type">select</field>
</record>
</odoo>
10 changes: 10 additions & 0 deletions product_ingredient/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2023 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


def pre_init_hook(cr):
"""
Create product_allergen_attribute used in compute methods with get_allergen_id()
"""
openupgrade.load_data(cr, "product_ingredient", "data/product_allergen_data.xml")
183 changes: 183 additions & 0 deletions product_ingredient/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_ingredient
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Carlos Roca Zaragoza <carlos.roca@tecnativa.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.15.2\n"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__allergen_id
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__allergen_id
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__allergen_id
msgid "Allergen"
msgstr "Alérgeno"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_product__ingredient_allergen_trace_ids
#: model:ir.model.fields,field_description:product_ingredient.field_product_template__ingredient_allergen_trace_ids
msgid "Allergen traces"
msgstr "Trazas alérgenas"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_product__allergen_ids
#: model:ir.model.fields,field_description:product_ingredient.field_product_template__allergen_ids
#: model:product.attribute,name:product_ingredient.product_allergen_attribute
msgid "Allergens"
msgstr "Alérgenos"

#. module: product_ingredient
#: model:ir.model,name:product_ingredient.model_product_attribute_value
msgid "Attribute Value"
msgstr "Valor del Atributo"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__create_uid
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__create_uid
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__create_uid
msgid "Created by"
msgstr "Creado por"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__create_date
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__create_date
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__create_date
msgid "Created on"
msgstr "Creado el"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__display_name
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__display_name
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__display_name
msgid "Display Name"
msgstr "Nombre mostrado"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__id
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__id
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__id
msgid "ID"
msgstr "ID"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__ingredient_id
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot__ingredient_ids
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__ingredient_id
msgid "Ingredient"
msgstr "Ingrediente"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_product__ingredient_additional_info
#: model:ir.model.fields,field_description:product_ingredient.field_product_template__ingredient_additional_info
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot__ingredient_additional_info
msgid "Ingredient Additional Info"
msgstr "Información adicional del ingrediente"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot__ingredient_allergen_trace_ids
msgid "Ingredient Allergen Trace"
msgstr "Traza alérgena del ingrediente"

#. module: product_ingredient
#: model:ir.model,name:product_ingredient.model_stock_lot_ingredient_value
msgid "Ingredient values for a product lots."
msgstr "Valores de los ingredientes de un lote de producto."

#. module: product_ingredient
#: model:ir.model,name:product_ingredient.model_product_ingredient_value
msgid "Ingredient values for a product."
msgstr "Valores de los ingredientes de un producto."

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_product__ingredient_ids
#: model:ir.model.fields,field_description:product_ingredient.field_product_template__ingredient_ids
#: model_terms:ir.ui.view,arch_db:product_ingredient.product_normal_form_view
#: model_terms:ir.ui.view,arch_db:product_ingredient.product_template_only_form_view
#: model_terms:ir.ui.view,arch_db:product_ingredient.view_production_lot_form
msgid "Ingredients"
msgstr "Ingredientes"

#. module: product_ingredient
#: model:ir.model,name:product_ingredient.model_product_ingredient
msgid "Ingredients of a product."
msgstr "Ingredientes para un producto."

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__is_allergen
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__is_allergen
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__is_allergen
msgid "Is Allergen"
msgstr "Es alérgeno"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__write_uid
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__write_uid
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__write_uid
msgid "Last Updated by"
msgstr "Última actualización por"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__write_date
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__write_date
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__write_date
msgid "Last Updated on"
msgstr "Última actualización el"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__lot_id
msgid "Lot"
msgstr "Lote"

#. module: product_ingredient
#: model:ir.model,name:product_ingredient.model_stock_lot
msgid "Lot/Serial"
msgstr "Lote/Número de serie"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__name
msgid "Name"
msgstr "Nombre"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__percentage
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__percentage
msgid "Percentage"
msgstr "Porcentaje"

#. module: product_ingredient
#: model:ir.model,name:product_ingredient.model_product_template
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__product_id
msgid "Product"
msgstr "Producto"

#. module: product_ingredient
#: model:ir.model,name:product_ingredient.model_product_attribute
msgid "Product Attribute"
msgstr "Atributo de producto"

#. module: product_ingredient
#: model:ir.model,name:product_ingredient.model_product_product
msgid "Product Variant"
msgstr "Variante de producto"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient__scientific_name
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__scientific_name
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__scientific_name
msgid "Scientific Name"
msgstr "Nombre científico"

#. module: product_ingredient
#: model:ir.model.fields,field_description:product_ingredient.field_product_ingredient_value__sequence
#: model:ir.model.fields,field_description:product_ingredient.field_stock_lot_ingredient_value__sequence
msgid "Sequence"
msgstr "Secuencia"
Loading
Loading