-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] mrp_food_menu documentation and tests
- Loading branch information
1 parent
74bdd10
commit c15bb47
Showing
16 changed files
with
108 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
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). | ||
--> | ||
<odoo noupdate="1"> | ||
|
||
<record model="mrp.food.menu" id="demo_menu_french_revolution"> | ||
<field name="name">Menu to celebrate French New Revolution</field> | ||
</record> | ||
|
||
<record model="mrp.food.menu.line" id="demo_menu_revolution_houmous"> | ||
<field name="menu_id" ref="demo_menu_french_revolution"/> | ||
<field name="product_id" ref="mrp_food_menu.demo_houmous"/> | ||
<field name="product_uom_qty">2</field> | ||
</record> | ||
|
||
<record model="mrp.food.menu.line" id="demo_menu_revolution_quiche"> | ||
<field name="menu_id" ref="demo_menu_french_revolution"/> | ||
<field name="product_id" ref="mrp_food_menu.demo_quiche"/> | ||
<field name="product_uom_qty">3</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
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). | ||
--> | ||
<odoo noupdate="1"> | ||
|
||
<record model="product.product" id="demo_houmous"> | ||
<field name="name">Houmous</field> | ||
<field name="uom_id" ref="uom.product_uom_gram" /> | ||
<field name="uom_po_id" ref="uom.product_uom_gram" /> | ||
<field name="weight">0.410</field> | ||
<field name="standard_price">1.97</field> | ||
<field name="list_price">2.70</field> | ||
</record> | ||
|
||
<record model="product.product" id="demo_quiche"> | ||
<field name="name">Quiche</field> | ||
<field name="uom_id" ref="uom.product_uom_unit" /> | ||
<field name="uom_po_id" ref="uom.product_uom_unit" /> | ||
<field name="weight">0.600</field> | ||
<field name="standard_price">5</field> | ||
<field name="list_price">12</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
Quickly manage sales and linked manufacturing orders. | ||
For example : a Week Production for a Bakery based on its Grocery sales. | ||
Base model to create Menu, its components, add section (like Main meal, Dessert etc.) | ||
You can choose BoM linked to products. | ||
|
||
.. figure:: ../static/description/mrp_sale_grouped.png | ||
.. figure:: ../static/description/mrp_food_menu.jpeg | ||
|
||
1 : Choose or create sales | ||
2 : Act on sales : adjust quantities with Matrix2D view, and confirme | ||
all at once | ||
3 : Quick buttons : Products without BoM, Sales, Manufacturing Orders | ||
4 : Print PDF that sum up sales by product and sale | ||
5 : Act on Manufacturing Orders | ||
6 : Handle your production with wizard assistant, you can handle what components | ||
you have to buy, intermediate and finished products you have to produce. | ||
See dedicated module mrp_wizard_production | ||
|
||
.. figure:: ../static/description/report_sales_sum_up.png | ||
.. figure:: ../static/description/mrp_sale_grouped_sales_matrix2d.png | ||
.. figure:: ../static/description/mrp_sale_grouped.jpeg | ||
|
||
Quickly see what's going on for your sales and production on tree view | ||
|
||
.. figure:: ../static/description/mrp_sale_grouped_tree_view.jpeg | ||
This module is a base for other module (handling sales, production, tags, allergens etc.) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed
BIN
-56.6 KB
mrp_food_menu/static/description/mrp_sale_grouped_sales_matrix2d.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from . import test_mrp_sale_grouped | ||
from . import test_food_menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop) | ||
# @author: Quentin DUPONT ([email protected]) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestFoodMenu(TransactionCase): | ||
def setUp(self): | ||
super().setUp() | ||
# Objects | ||
self.food_menu_obj = self.env["mrp.food.menu"] | ||
self.food_menu_line_obj = self.env["mrp.food.menu.line"] | ||
self.product_product_obj = self.env["product.product"] | ||
self.mrp_bom_obj = self.env["mrp.bom"] | ||
# Datas | ||
self.uom_kg = self.env.ref("uom.product_uom_kgm") | ||
self.uom_unit = self.env.ref("uom.product_uom_unit") | ||
# Demo datas | ||
self.menu_revolution = self.env.ref("mrp_food_menu.demo_menu_french_revolution") | ||
# Creating Products | ||
self.product_seitan_bourguignon = self.product_product_obj.create( | ||
{ | ||
"name": "Seitan bourguignon", | ||
"type": "product", | ||
"uom_id": self.uom_kg.id, | ||
"uom_po_id": self.uom_kg.id, | ||
} | ||
) | ||
|
||
def test_01_get_menu_info(self): | ||
self.assertEqual(self.menu_revolution.product_wo_bom_qty, 2) | ||
|
||
self.food_menu_line_obj.create( | ||
{ | ||
"menu_id": self.menu_revolution.id, | ||
"product_id": self.product_seitan_bourguignon.id, | ||
"product_uom_qty": 3, | ||
} | ||
) | ||
self.assertEqual(self.menu_revolution.product_wo_bom_qty, 3) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ 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). | ||
--> | ||
<odoo> | ||
<odoo noupdate="1"> | ||
|
||
<record model="mrp.food.menu.tag" id="demo_tag_ecological"> | ||
<field name="name">Ecological</field> | ||
|
@@ -17,7 +17,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | |
<field name="parent_id" ref="mrp_food_menu_tag.demo_tag_ecological" /> | ||
<field | ||
name="food_menu_ids" | ||
eval="[(4, ref('mrp_food_menu_tag.demo_menu_french_revolution')),]" | ||
eval="[(4, ref('mrp_food_menu.demo_menu_french_revolution')),]" | ||
/> | ||
</record> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters