Skip to content

Commit

Permalink
[IMP] Components → Ingredient [ADD] helper
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinDupont committed Nov 21, 2023
1 parent d27c4d2 commit 5a2563d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 46 deletions.
70 changes: 31 additions & 39 deletions grap_change_views_product/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-21 08:16+0000\n"
"PO-Revision-Date: 2023-11-21 08:16+0000\n"
"POT-Creation-Date: 2023-11-21 11:20+0000\n"
"PO-Revision-Date: 2023-11-21 11:20+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -109,23 +109,13 @@ msgstr "Également utilisé comme prix de base pour les listes. Exprimé dans l'

#. module: grap_change_views_product
#: model:ir.model.fields,field_description:grap_change_views_product.field_product_product__country_id
msgid "Country (Components)"
msgstr "Pays (MP)"
msgid "Country (Ingredients)"
msgstr "Pays (ingrédients)"

#. module: grap_change_views_product
#: model:ir.model.fields,field_description:grap_change_views_product.field_product_product__country_group_id
msgid "Country Group (Components)"
msgstr "Groupe de pays (MP)"

#. module: grap_change_views_product
#: model:ir.model.fields,help:grap_change_views_product.field_product_product__country_group_id
msgid "Country group of production of the product"
msgstr "Groupe de pays de production du produit"

#. module: grap_change_views_product
#: model:ir.model.fields,help:grap_change_views_product.field_product_product__country_id
msgid "Country of production of the product"
msgstr "Pays de production du pays"
msgid "Country Group (Ingredients)"
msgstr "Groupe de pays (ingrédients)"

#. module: grap_change_views_product
#: model_terms:ir.ui.view,arch_db:grap_change_views_product.view_product_product_form
Expand All @@ -147,13 +137,8 @@ msgstr "Définissez les listes de prix des fournisseurs."

#. module: grap_change_views_product
#: model:ir.model.fields,field_description:grap_change_views_product.field_product_product__department_id
msgid "Department (Components)"
msgstr "Département (MP)"

#. module: grap_change_views_product
#: model:ir.model.fields,help:grap_change_views_product.field_product_product__department_id
msgid "Department of production of the product"
msgstr "Département de production de l'article"
msgid "Department (Ingredients)"
msgstr "Département (ingrédients)"

#. module: grap_change_views_product
#: model_terms:ir.ui.view,arch_db:grap_change_views_product.view_product_product_form
Expand Down Expand Up @@ -201,6 +186,18 @@ msgstr "Informations complémentaires"
msgid "Fields only configurable for raw materials."
msgstr "Champs modifiables seulement pour les articles de matières premières"

#. module: grap_change_views_product
#: model:ir.model.fields,help:grap_change_views_product.field_product_product__country_group_id
#: model:ir.model.fields,help:grap_change_views_product.field_product_product__country_id
#: model:ir.model.fields,help:grap_change_views_product.field_product_product__department_id
#: model:ir.model.fields,help:grap_change_views_product.field_product_product__state_id
msgid "Fill in the origin of the ingredients. \n"
" If it has several ingredients, take the widest denominator of origin. Example 1 for crunchy: EU / non-EU because the chocolate comes from South America. Example 2 coelslaw with local products: choose the Puy-de-dôme department. \n"
" Mandatory for Fruits & Vegetables, and meat."
msgstr "Remplir l'origine des ingrédients. \n"
" S'il a plusieurs ingrédients, prendre le dénominateur d'origine le plus large. Exemple 1 pour du crunchy : UE / non UE car le chocolat vient d'Amérique du sud. Exemple 2 coelslaw avec des produits locaux : choisir le département du Puy-de-dôme. \n"
" Obligatoire pour les Fruits & Légumes et la viande."

#. module: grap_change_views_product
#: model:ir.ui.menu,name:grap_change_views_product.menu_product_product_mrp_handle_prices_standard_prices_3a_finished
msgid "Finished Products"
Expand Down Expand Up @@ -470,18 +467,18 @@ msgstr "Articles (Alcool)"
msgid "Products (Categories)"
msgstr "Articles (Catégories)"

#. module: grap_change_views_product
#: model:ir.actions.act_window,name:grap_change_views_product.action_product_product_origin
#: model:ir.ui.menu,name:grap_change_views_product.menu_product_product_origin
msgid "Products (Components origin)"
msgstr "Articles (Origine Matières Premières)"

#. module: grap_change_views_product
#: model:ir.actions.act_window,name:grap_change_views_product.action_product_product_food
#: model:ir.ui.menu,name:grap_change_views_product.menu_product_product_food
msgid "Products (Food)"
msgstr "Articles (Alimentaire)"

#. module: grap_change_views_product
#: model:ir.actions.act_window,name:grap_change_views_product.action_product_product_origin
#: model:ir.ui.menu,name:grap_change_views_product.menu_product_product_origin
msgid "Products (Ingredients origin)"
msgstr "Articles (origine ingrédients)"

#. module: grap_change_views_product
#: model:ir.actions.act_window,name:grap_change_views_product.action_product_product_joint_buying
#: model:ir.ui.menu,name:grap_change_views_product.menu_product_product_joint_buying
Expand Down Expand Up @@ -613,13 +610,8 @@ msgstr "Coût"

#. module: grap_change_views_product
#: model:ir.model.fields,field_description:grap_change_views_product.field_product_product__state_id
msgid "State (Components)"
msgstr "Région (MP)"

#. module: grap_change_views_product
#: model:ir.model.fields,help:grap_change_views_product.field_product_product__state_id
msgid "State of production of the product"
msgstr "Région de production de l'article"
msgid "State (Ingredients)"
msgstr "Région (Ingrédients)"

#. module: grap_change_views_product
#: model:ir.ui.menu,name:grap_change_views_product.menu_product_product_stock
Expand Down Expand Up @@ -743,7 +735,7 @@ msgstr "Mettre à jour le stock disponible"
#: model_terms:ir.ui.view,arch_db:grap_change_views_product.view_product_product_form
#: model_terms:ir.ui.view,arch_db:grap_change_views_product.view_product_supplierinfo_tree
msgid "Use this price for product standard price"
msgstr "Utiliser ce prix pour le coût de l'article"
msgstr "Utiliser ce montant pour le coût de l'article"

#. module: grap_change_views_product
#: model_terms:ir.ui.view,arch_db:grap_change_views_product.view_product_product_form
Expand Down Expand Up @@ -805,8 +797,8 @@ msgstr "🌱 Infos réglementaires bio - labels"

#. module: grap_change_views_product
#: model_terms:ir.ui.view,arch_db:grap_change_views_product.view_product_product_form
msgid "🌱 Organic informations - Raw materials origin 🥕"
msgstr "🌱 Infos réglementaires bio - origine matières premières 🥕"
msgid "🌱 Organic informations - Ingredients origin"
msgstr "🌱 Infos réglementaires bio - origine des ingrédients"

#. module: grap_change_views_product
#: model_terms:ir.ui.view,arch_db:grap_change_views_product.view_product_product_form
Expand Down
28 changes: 24 additions & 4 deletions grap_change_views_product/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,36 @@ class ProductProduct(models.Model):
# Overload Column Section
standard_price = fields.Float(copy=True)
country_group_id = fields.Many2one(
string="Country Group (Components)",
string="Country Group (Ingredients)",
help="Fill in the origin of the ingredients. \n If it has several ingredients, "
"take the widest denominator of origin. Example 1 for crunchy: EU / non-EU because"
" the chocolate comes from South America. Example 2 coelslaw"
" with local products: choose the Puy-de-dôme department. \n"
" Mandatory for Fruits & Vegetables, and meat.",
)
country_id = fields.Many2one(
string="Country (Components)",
string="Country (Ingredients)",
help="Fill in the origin of the ingredients. \n If it has several ingredients, "
"take the widest denominator of origin. Example 1 for crunchy: EU / non-EU because"
" the chocolate comes from South America. Example 2 coelslaw"
" with local products: choose the Puy-de-dôme department. \n"
" Mandatory for Fruits & Vegetables, and meat.",
)
state_id = fields.Many2one(
string="State (Components)",
string="State (Ingredients)",
help="Fill in the origin of the ingredients. \n If it has several ingredients, "
"take the widest denominator of origin. Example 1 for crunchy: EU / non-EU because"
" the chocolate comes from South America. Example 2 coelslaw"
" with local products: choose the Puy-de-dôme department. \n"
" Mandatory for Fruits & Vegetables, and meat.",
)
department_id = fields.Many2one(
string="Department (Components)",
string="Department (Ingredients)",
help="Fill in the origin of the ingredients. \n If it has several ingredients, "
"take the widest denominator of origin. Example 1 for crunchy: EU / non-EU because"
" the chocolate comes from South America. Example 2 coelslaw"
" with local products: choose the Puy-de-dôme department. \n"
" Mandatory for Fruits & Vegetables, and meat.",
)

# Compute Section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="label_ids" widget="many2many_tags"/>
<field name="organic_type"/>
</group>
<group string="🌱 Organic informations - Raw materials origin 🥕">
<group string="🌱 Organic informations - Ingredients origin">
<field name="country_group_id"/>
<field name="country_id"/>
<field name="state_id"/>
Expand Down
4 changes: 2 additions & 2 deletions grap_change_views_product/views/view_product_product_tree.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</record>

<record id="action_product_product_origin" model="ir.actions.act_window">
<field name="name">Products (Components origin)</field>
<field name="name">Products (Ingredients origin)</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_type">form</field>
Expand All @@ -165,7 +165,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
</record>

<menuitem id="menu_product_product_origin"
name="Products (Components origin)"
name="Products (Ingredients origin)"
action="action_product_product_origin"
parent="menu_product_product_editable_view" sequence="3"/>

Expand Down

0 comments on commit 5a2563d

Please sign in to comment.