Skip to content

Commit

Permalink
[16.0][ADD] fermente_product_food_form_view
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinDupont committed Feb 14, 2025
1 parent 531d3bb commit 5139e73
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 0 deletions.
Empty file.
Empty file.
16 changes: 16 additions & 0 deletions fermente_product_food_form_view/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (C) 2025 - Today: GRAP (http://www.grap.coop)
# @author: Quentin DUPONT ([email protected])
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Fermente - Product Food Form View",
"version": "16.0.1.0.0",
"category": "Custom",
"author": "GRAP",
"website": "https://github.com/grap/grap-odoo-custom",
"license": "AGPL-3",
"depends": ["product", "mrp_bom_report_allergen"],
"data": [
"views/view_product_template.xml",
],
}
15 changes: 15 additions & 0 deletions fermente_product_food_form_view/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-14 14:04+0000\n"
"PO-Revision-Date: 2025-02-14 14:04+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"
1 change: 1 addition & 0 deletions fermente_product_food_form_view/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Quentin DUPONT
3 changes: 3 additions & 0 deletions fermente_product_food_form_view/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Customize Odoo / odoo / ``product`` form view in Food notebook.

* Move meal_category_id (mrp_bom_report_allergen) here
37 changes: 37 additions & 0 deletions fermente_product_food_form_view/views/view_product_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2024 - Today: GRAP (http://www.grap.coop)
@author: Quentin DUPONT
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="view_product_food_template_form_1" model="ir.ui.view">
<field name="model">product.template</field>
<field name="priority" eval="100" />
<field name="inherit_id" ref="mrp_bom_report_allergen.view_mrp_bom_report_allergen_product_template_form"/>
<field name="arch" type="xml">

<!-- HIDE fields by default -->
<field name="meal_category_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>

</field>
</record>

<record id="view_product_food_template_form_2" model="ir.ui.view">
<field name="model">product.template</field>
<field name="priority" eval="100" />
<field name="inherit_id" ref="product_food.view_product_template_form"/>
<field name="arch" type="xml">

<!-- MOVE fields -->
<field name="allergen_ids" position="before">
<field name="meal_category_id"/>
</field>

</field>
</record>

</odoo>
6 changes: 6 additions & 0 deletions setup/fermente_product_food_form_view/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 5139e73

Please sign in to comment.