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

[IMP] fermente_mrp Polish BoM view and Menus #432

Open
wants to merge 6 commits into
base: 16.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
1 change: 1 addition & 0 deletions fermente_mrp/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "AGPL-3",
"depends": ["mrp"],
"data": [
"views/menu.xml",
"views/mrp_production_view.xml",
"security/ir.model.access.csv",
],
Expand Down
26 changes: 23 additions & 3 deletions fermente_mrp/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,41 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-10 12:56+0000\n"
"PO-Revision-Date: 2025-01-10 12:56+0000\n"
"POT-Creation-Date: 2025-02-21 10:52+0000\n"
"PO-Revision-Date: 2025-02-21 10:52+0000\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: fermente_mrp
#: model:ir.actions.act_window,name:fermente_mrp.action_fermente_mrp_bom_all
#: model:ir.ui.menu,name:fermente_mrp.menu_fermente_mrp_bom
#: model:ir.ui.menu,name:fermente_mrp.menu_fermente_mrp_bom_all
msgid "Bills of Materials"
msgstr "Fiches techniques"

#. module: fermente_mrp
#: model_terms:ir.ui.view,arch_db:fermente_mrp.view_fermente_mrp_production_form_base
msgid "BoM"
msgstr "Fiche technique"

#. module: fermente_mrp
#: model:ir.actions.act_window,name:fermente_mrp.action_fermente_mrp_bom_finished_products
#: model:ir.ui.menu,name:fermente_mrp.menu_fermente_mrp_bom_finished_products
msgid "BoM for finished products"
msgstr "FT pour produits finis"

#. module: fermente_mrp
#: model:ir.actions.act_window,name:fermente_mrp.action_fermente_mrp_bom_intermediate_products
#: model:ir.ui.menu,name:fermente_mrp.menu_fermente_mrp_bom_intermediate_products
msgid "BoM for intermediate products"
msgstr "FT pour produits intermédiaires"

#. module: fermente_mrp
#: model_terms:ir.ui.view,arch_db:fermente_mrp.view_fermente_mrp_production_form_base
msgid "Now, fill the quantity to indicate what you have produce."
msgstr "Maintenant, remplissez la quantité pour indiquer ce que vous avez produit."
msgstr ""
"Maintenant, remplissez la quantité pour indiquer ce que vous avez produit."
65 changes: 65 additions & 0 deletions fermente_mrp/views/menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2024 - Today: fermente (http://www.fermente.coop)
@author: Quentin DUPONT (quentin.dupont@fermente.coop)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>


<!-- ************************************************************ -->
<!-- Hide standard menu -->
<!-- ************************************************************ -->
<menuitem id="mrp.menu_mrp_bom"
parent="mrp.menu_mrp_root"
groups="base.group_no_one"/>

<!-- ************************************************************ -->
<!-- Bill of Materials - Menus for Generic fermente View -->
<!-- ************************************************************ -->
<menuitem id="menu_fermente_mrp_bom"
name="Bills of Materials"
parent="mrp.menu_mrp_root" sequence="1"/>

<record id="action_fermente_mrp_bom_all" model="ir.actions.act_window">
<field name="name">Bills of Materials</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.bom</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="mrp.mrp_bom_tree_view"/>
</record>

<menuitem id="menu_fermente_mrp_bom_all"
name="Bills of Materials"
parent="menu_fermente_mrp_bom" sequence="5"
action="action_fermente_mrp_bom_all"/>

<record id="action_fermente_mrp_bom_intermediate_products" model="ir.actions.act_window">
<field name="name">BoM for intermediate products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.bom</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="mrp.mrp_bom_tree_view"/>
<field name="context">{"search_default_filter_product_intermediate":1}</field>
</record>

<menuitem id="menu_fermente_mrp_bom_intermediate_products"
name="BoM for intermediate products"
parent="menu_fermente_mrp_bom" sequence="20"
action="action_fermente_mrp_bom_intermediate_products"/>

<record id="action_fermente_mrp_bom_finished_products" model="ir.actions.act_window">
<field name="name">BoM for finished products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.bom</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="mrp.mrp_bom_tree_view"/>
<field name="context">{"search_default_filter_product_finished":1}</field>
</record>

<menuitem id="menu_fermente_mrp_bom_finished_products"
name="BoM for finished products"
parent="menu_fermente_mrp_bom" sequence="30"
action="action_fermente_mrp_bom_finished_products"/>

</odoo>
2 changes: 2 additions & 0 deletions fermente_mrp_bom_form_view/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
# GRAP
"mrp_bom_tag",
"mrp_bom_line_net_qty",
"mrp_bom_product_allergen",
"mrp_bom_product_price_margin",
"product_label_mrp",
],
"data": [
"views/view_mrp_bom.xml",
Expand Down
40 changes: 30 additions & 10 deletions fermente_mrp_bom_form_view/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 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-26 13:14+0000\n"
"PO-Revision-Date: 2024-11-26 13:14+0000\n"
"POT-Creation-Date: 2025-02-20 14:22+0000\n"
"PO-Revision-Date: 2025-02-20 14:22+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand All @@ -16,37 +16,57 @@ msgstr ""
"Plural-Forms: \n"

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid "&gt;"
msgstr "&gt;"
msgstr ""

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid "Allergens"
msgstr "Allergènes"

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid "Components"
msgstr "Composants"
msgstr "Lignes de recette"

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid "Labels"
msgstr ""

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid "Net weight (kg)"
msgstr "Poids net (kg)"

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_produce_delay
msgid "Produce time"
msgstr "Temps de production"

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid "ST %"
msgstr ""

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid ""
"This will set product gross quantity with net quantity and loss percentage"
msgstr ""
"Cela définira la quantité brut de produits grâce à la quantité net et le "
"pourcentage de perte."

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid ""
"This will set product net quantity with gross quantity and loss percentage"
msgstr ""
"Cela définira la quantité net de produits grâce à la quantité brute et le "
"pourcentage de perte."

#. module: fermente_mrp_bom_form_view
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form
#: model_terms:ir.ui.view,arch_db:fermente_mrp_bom_form_view.view_fermente_mrp_bom_form_sections_and_notes
msgid "Total"
msgstr ""
29 changes: 23 additions & 6 deletions fermente_mrp_bom_form_view/views/view_mrp_bom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="arch" type="xml">

<!-- Hide fields -->

<xpath expr="//field[@name='bom_line_with_sectionnote_ids']/tree/button[@name='action_see_attachments']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
Expand All @@ -58,7 +57,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
expr="//field[@name='bom_line_with_sectionnote_ids']/tree/field[@name='product_uom_id']"
position="before"
>
<!-- mrp_bom_line_net_qty fields -->
<!-- mrp_bom_line_net_qty -->
<field name="diff_product_qty_gross_net" invisible="1" />
<button
name="set_product_qty_gross"
Expand All @@ -69,8 +68,8 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
/>
<field
name="loss_percentage"
widget="numeric_step"
options="{'step': 1}"
optional="show"
/>
<button
name="set_product_qty_net"
Expand All @@ -79,26 +78,44 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
attrs="{'invisible': [('diff_product_qty_gross_net', '=', 0)]}"
title="This will set product net quantity with gross quantity and loss percentage"
/>
<field name="product_qty_net" />
<field name="product_qty_net" optional="show"/>

</xpath>
<xpath
expr="//field[@name='bom_line_with_sectionnote_ids']/tree/field[@name='product_uom_id']"
position="after"
>
<!-- mrp_bom_weight -->
<field name="line_gross_weight" optional="hide "/>
<field name="line_net_weight" sum="Net weight (kg)" optional="show"/>
<field name="line_net_weight_percentage" optional="show"/>

<!-- mrp_bom_product_allergen -->
<field name="allergen_ids" string="Allergens" widget="many2many_tags" optional="show"/>

<!-- product_label_mrp -->
<field name="product_label_ids" string="Labels" widget="many2many_tags" optional="show"/>

<!-- mrp_bom_product_price_margin fields -->
<!-- mrp_bom_product_price_margin -->
<field name="currency_id" invisible="1" />
<field name="standard_price_unit" widget="monetary" />
<field
name="standard_price_subtotal"
readonly="1"
sum="Total"
widget="monetary"
optional="show"
/>
<field
name="standard_price_subtotal_percentage"
string="ST %"
widget="percentage"
optional="show"
/>
</xpath>

<!-- Add decoration -->
<xpath expr="//field[@name='bom_line_with_sectionnote_ids']/tree" position="attributes">>
<xpath expr="//field[@name='bom_line_with_sectionnote_ids']/tree" position="attributes">
<attribute
name="decoration-warning"
>diff_product_qty_gross_net != 0</attribute>
Expand Down
1 change: 0 additions & 1 deletion mrp_sale_grouped/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"report/report_sale_grouped.xml",
"report/ir_actions_report.xml",
"views/action.xml",
"views/menu.xml",
"views/view_mrp_sale_grouped.xml",
"views/view_sale_order.xml",
"wizard/view_sale_grouped_wizard.xml",
Expand Down
18 changes: 0 additions & 18 deletions mrp_sale_grouped/views/menu.xml

This file was deleted.

1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ git+https://github.com/OCA/manufacture@refs/pull/1430/head#subdirectory=setup/mr
git+https://github.com/OCA/product-attributes@refs/pull/1840/head#subdirectory=setup/product_compute_template_field_from_variant_helper

# Placeholder for future PRs 1
git+https://github.com/grap/grap-odoo-business@16.0#subdirectory=setup/product_label_mrp

# Placeholder for future PRs 2

Expand Down
Loading