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

[16.0][MIG] pos_deposit #4

Open
wants to merge 4 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
111 changes: 111 additions & 0 deletions pos_deposit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
=====================
POS Container Deposit
=====================

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

.. |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-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/16.0/pos_deposit
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_deposit
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows the use of deposit products for PoS products.

An example of such a deposit product would be a bottle of cola, where the bottle is
being sold for an extra 25 cents, which you get back when you bring the bottle back to
the store intact. Whenever the cola is added to a PoS order, the bottle is added too.
If the cola quantity changes, the bottle quantity will change as well.

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to go to *Point of Sale > Products*.

#. Select or add at least one 'deposit product', such as 'Bottle 1L',
with a non-zero price and with the checkbox 'Is Deposit' set to True.

#. Select or add at least one product of which 'Use Deposit' is checked,
such as '1 liter of cola'. In the accompanying product selection field,
select the bottle. The two products are now linked.

Usage
=====

To use this module, open a POS session and:

#. When a deposit product (eg. cola) is added, the bottle is added to the
order as well and the quantities are kept in sync.

#. When someone brings back bottles to the store, you can just add a bottle
and enter a negative sale quantity, thus refunding the bottle.

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

- If the screen refreshes or session is reopened, the link between product and container is lost, so the quantities can get out of sync. This is not something that happens often and can be 'repaired' by removing and re-adding a product to the order.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/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/OCA/pos/issues/new?body=module:%20pos_deposit%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
~~~~~~~

* Sunflower IT
* Open2bizz

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

Tom Blauwendraat <[email protected]>
Stefan Rijnhart <[email protected]>

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

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/16.0/pos_deposit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions pos_deposit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions pos_deposit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "POS Container Deposit",
"version": "16.0.1.0.0",
"category": "Point of Sale",
"summary": "This module is used to manage container deposits for products"
" in Point of Sale.",
"author": "Sunflower IT, Open2bizz, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos",
"license": "AGPL-3",
"depends": ["point_of_sale"],
"data": ["views/product_view.xml"],
"assets": {
"web.assets_backend": ["/pos_deposit/static/src/js/pos.js"],
"web.assets_qweb": ["/pos_deposit/static/src/xml/pos.xml"],
},
"installable": True,
}
40 changes: 40 additions & 0 deletions pos_deposit/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_deposit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-07 08:23+0000\n"
"PO-Revision-Date: 2015-12-07 14:46+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: pos_deposit
#: model:ir.model.fields,field_description:pos_deposit.field_product_product__is_deposit
#: model:ir.model.fields,field_description:pos_deposit.field_product_template__is_deposit
msgid "Is Deposit"
msgstr ""

#. module: pos_deposit
#: model:ir.model,name:pos_deposit.model_product_template
msgid "Product Template"
msgstr "Productsjabloon"

#. module: pos_deposit
#: model:ir.model.fields,field_description:pos_deposit.field_product_product__select_deposit
#: model:ir.model.fields,field_description:pos_deposit.field_product_template__select_deposit
msgid "Select Deposit"
msgstr "Statiegeldproduct"

#. module: pos_deposit
#: model:ir.model.fields,field_description:pos_deposit.field_product_product__use_deposit
#: model:ir.model.fields,field_description:pos_deposit.field_product_template__use_deposit
msgid "Use Deposit"
msgstr "Statiegeld"
1 change: 1 addition & 0 deletions pos_deposit/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import product_template
14 changes: 14 additions & 0 deletions pos_deposit/models/product_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2021 Sunflower IT
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class ProductTemplate(models.Model):
_inherit = "product.template"

use_deposit = fields.Boolean()
is_deposit = fields.Boolean()
select_deposit = fields.Many2one(
"product.product", domain=[("is_deposit", "!=", False)]
)
8 changes: 8 additions & 0 deletions pos_deposit/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
To configure this module, you need to go to *Point of Sale > Products*.

#. Select or add at least one 'deposit product', such as 'Bottle 1L',
with a non-zero price and with the checkbox 'Is Deposit' set to True.

#. Select or add at least one product of which 'Use Deposit' is checked,
such as '1 liter of cola'. In the accompanying product selection field,
select the bottle. The two products are now linked.
2 changes: 2 additions & 0 deletions pos_deposit/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Tom Blauwendraat <[email protected]>
Stefan Rijnhart <[email protected]>
6 changes: 6 additions & 0 deletions pos_deposit/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module allows the use of deposit products for PoS products.

An example of such a deposit product would be a bottle of cola, where the bottle is
being sold for an extra 25 cents, which you get back when you bring the bottle back to
the store intact. Whenever the cola is added to a PoS order, the bottle is added too.
If the cola quantity changes, the bottle quantity will change as well.
1 change: 1 addition & 0 deletions pos_deposit/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- If the screen refreshes or session is reopened, the link between product and container is lost, so the quantities can get out of sync. This is not something that happens often and can be 'repaired' by removing and re-adding a product to the order.
7 changes: 7 additions & 0 deletions pos_deposit/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To use this module, open a POS session and:

#. When a deposit product (eg. cola) is added, the bottle is added to the
order as well and the quantities are kept in sync.

#. When someone brings back bottles to the store, you can just add a bottle
and enter a negative sale quantity, thus refunding the bottle.
Loading
Loading