Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
13cb362
[MOV] cookingo_custom → container_meals
carmenbianca Mar 7, 2022
2c84afb
[IMP] container_meals: Make settings view more conformant
carmenbianca Mar 8, 2022
1106792
[FIX] container_meals: Give the module a proper name
carmenbianca Mar 8, 2022
080bdb7
[FIX] container_meals: Remove done TODOs
carmenbianca Mar 8, 2022
f6f5882
[ADD] container_meals: Add ROADMAP.rst
carmenbianca Mar 8, 2022
de84f32
[ADD] container_meals: Generate readme
carmenbianca Mar 8, 2022
f0f23e9
[FIX] container_meals: Remove unnecessary dependency on sale
carmenbianca Mar 24, 2022
cd6826c
[IMP] container_meals: Make strings more consistent
carmenbianca Mar 24, 2022
0da6833
[REF] container_meals: calculate_volume_containers → calculate_contai…
carmenbianca Mar 24, 2022
865a82c
[IMP] container_meals: Explain algorithm in docstring
carmenbianca Mar 24, 2022
ed234c2
[IMP] container_meals: Add docstring to add_containers
carmenbianca Mar 24, 2022
dd79a6e
[IMP] container_meals: Add TODO to tests/common.py
carmenbianca Mar 24, 2022
78f7120
[FIX] container_meals: Make child portion ratio constant
carmenbianca Mar 24, 2022
187d835
[FIX] container_meals: Rename field in res.partner
carmenbianca Mar 24, 2022
a8eaf57
[FIX] container_meals: Fix a rounding error when meal volumes add up …
carmenbianca Mar 25, 2022
45cb904
[UPD] Update container_meals.pot
Mar 25, 2022
6c234e1
[FIX] container_meals: Give discount up to the total price of the order
carmenbianca Apr 13, 2022
4010eb4
[ADD] container_meals: Change log entry
carmenbianca Apr 14, 2022
bfc991f
[UPD] container_meals: Bump version
carmenbianca May 9, 2022
a1fb94c
[UPD] changelog
carmenbianca May 9, 2022
f80d06e
[UPD] README.rst
github-grap-bot Aug 3, 2022
9f7bed0
[REF] Coop IT Easy SCRL fs -> SC
robinkeunen Nov 3, 2022
6bb7a2f
[UPD] README.rst
github-grap-bot Nov 9, 2022
3634475
container_meals 14.0.1.1.1
github-grap-bot Nov 9, 2022
92cc748
[BOT] post-merge updates
github-grap-bot Mar 22, 2024
011f75e
[MIG] container_meals: Migration to 16.0
mihien Nov 18, 2025
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
118 changes: 118 additions & 0 deletions container_meals/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
===============
Container Meals
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:186b3af0c6e89a73fbf172e88f7b0811eff840dc945f0b8976b19e990379fdba
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-coopiteasy%2Faddons-lightgray.png?logo=github
:target: https://github.com/coopiteasy/addons/tree/16.0/container_meals
:alt: coopiteasy/addons

|badge1| |badge2| |badge3|

This module supports a very specific business model, where customers get meals
delivered to them in glass containers. The containers are lent out and must be
returned. The customers pay a deposit on the glass containers, which they can
have refunded, or which gives them an effective perpetual discount on subsequent
purchases, where they don't have to pay the deposit on the glass containers
again.

Each meal comes in two glass containers. When two of the same meal are ordered,
those two meals also come in two glass containers total, but the glass
containers may be bigger to account for the increased volume.

This module:

- Creates an "Is Meal?" button for meal products, which enables the user to set
the volumes of a single portion for containers 1 and 2.
- Adds a portion size product category. Child portions have 2/3 the volume of
adult portions. This module does not adjust the price of child portions.
- Adds an "Is Container?" button for container products, which enables the user
to set the volume of the container.
- Keeps track of the built up deposit by customers across sales.
- Allows the user to set unreturned containers on sale orders. All containers
are assumed to be returned, and must be manually flagged as unreturned.
Unreturned containers can be found on a customer's contact view and in a
special "Unreturned Containers" menu under Sales.
- Calculates and automatically adds the containers needed to hold the
to-purchase meals on the purchase page, and applies a discount depending on
the customer's current stored deposit.

**Table of contents**

.. contents::
:local:

Usage
=====

For proper function of this module, you need to at least:

- Create one or more container product templates by enabling "Is Container?" on
a product.
- Set a deposit product in the Sale settings.
- And create meal products, of course.

Known issues / Roadmap
======================

- Support differing units of measurement.
- Better support for changing the deposit product.
- Fix the fact that invoices might use the same deposit multiple times if
created in series before all being payed

Changelog
=========

14.0.1.1.0 (2022-05-09)
~~~~~~~~~~~~~~~~~~~~~~~

**Bugfixes**

- The deposit discount can now be greater than the price total of the containers
in an order, but never greater than the total of the order itself. Previously,
only the price total of the containers was given as a discount. (`#224 <https://github.com/coopiteasy/addons/issues/224>`_)

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/addons/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/coopiteasy/addons/issues/new?body=module:%20container_meals%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Coop IT Easy SC

Contributors
~~~~~~~~~~~~

* `Coop IT Easy SC <https://coopiteasy.be>`_:

* Carmen Bianca Bakker

Maintainers
~~~~~~~~~~~

This module is part of the `coopiteasy/addons <https://github.com/coopiteasy/addons/tree/16.0/container_meals>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions container_meals/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
29 changes: 29 additions & 0 deletions container_meals/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2022 Coop IT Easy SC
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Container Meals",
"summary": """Deliver meals in containers.""",
"version": "16.0.1.0.0",
"category": "Uncategorized",
"website": "https://github.com/coopiteasy/addons",
"author": "Coop IT Easy SC",
"license": "AGPL-3",
"application": False,
"depends": [
"partner_manual_rank", # is_customer
"product",
"sale_management", # deposit management
"uom_extra_data", # mL
"website_sale",
],
"data": [
"data/portion_attributes.xml",
"views/product_views.xml",
"views/res_config_settings_views.xml",
"views/res_partner_views.xml",
"views/sale_order_line_views.xml",
"views/sale_order_views.xml",
"views/sale_menu.xml",
],
}
24 changes: 24 additions & 0 deletions container_meals/data/portion_attributes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<odoo noupdate="1">
<record id="product_attribute_portion_size" model="product.attribute">
<field name="name">Portion Size</field>
<field name="create_variant">always</field>
<field name="display_type">radio</field>
</record>

<record
id="product_attribute_portion_size_value_adult"
model="product.attribute.value"
>
<field name="name">Adult</field>
<field name="attribute_id" eval="ref('product_attribute_portion_size')" />
<field name="sequence">1</field>
</record>
<record
id="product_attribute_portion_size_value_child"
model="product.attribute.value"
>
<field name="name">Child</field>
<field name="attribute_id" eval="ref('product_attribute_portion_size')" />
<field name="sequence">2</field>
</record>
</odoo>
Loading
Loading