/cook

A cooking recipe module for teaching odoo development

Primary LanguagePython

cookodoo

Cooking module for Odoo 15.0. First version (8th of February 2022)

drawing

How the module works

  • It has three classes:

    • A main recipe class whith One2Many relation with
    • instruction class
    • And Many2Many relations with ingredients class.
  • Form and list views are available for Recipes, Instructions and Ingredients

  • Kanban and calendar are available for Recipes

  • In config menu there's an access to ingredients and instructions lists

  • 8 allergen types: allegeren information decorates the recipe table when is true with danger decorator (red color). But requires change to @api.depends decorator after installation. Based on the main eight allergen types (https://www.fda.gov/food/food-labeling-nutrition/food-allergies)

  • Computation of calories based on protein/fat/carbohydrates and amount of food:

$$calories = (carbohydrates*4 + protein*4 + fat*9 ) * amount / 100$$
  • Demo example of four recipes with instructions and ingredients.
  • Translation languages available: Spanish and Catalan.

Derived ER diagram (from DBeaver access to postgres odoo DB after installing cook module)

drawing

To install this module

  1. Download the project:
  1. Unzip in your odoo/addons folder
  2. Launch odoo service using developer mode (./odoo-bin --dev=all -d=mydb -c odoo.conf)
  3. Entry on your local odoo using web browser (http://localhost:8069/web/login)
  4. If not set developer mode go to settings and at the bottom of the page activate it
  5. Go to Apps and Update packates
  6. Update list packages
  7. You must see the Cook module
  8. Install the cook module

After installing the module set security settings (if required)

If not seen automatically the module, you can login as superuser.

  1. Refresh your web browser
  2. Restart Odoo service
  3. Update apps
  4. You must see it in your list of Apps

drawing

For further details, you can check the full explanation (spanish)

Cook module video demonstration.