Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 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
104 changes: 104 additions & 0 deletions pos_donation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
============
PoS Donation
============

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

.. |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_donation
: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_donation
: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|

When a donation product is sold in the PoS, this module creates a donation related to the PoS order and validates it.

**Table of contents**

.. contents::
:local:

Usage
=====

To create donations from the PoS, a donation product must be sold.
This product must have the "Donation in PoS" product type.
This is important: the normal "Donation" product type will not work, as this would generate accounting entries two times.

The price of the product on the PoS order line defines the price of the donation.

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

* If there is no partner set on the PoS order, a donation is not created.
There should be a user warning in the PoS to avoid this.
* If there are multiple donation products used in the same PoS order, a donation is not created.
This is because the ``default_tax_receipt_option`` is currently defined on the ``product.template``.
It would be better to define it on on a more global record, like the ``pos.config``.

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_donation%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>`_:

* Rémy Taymans

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.

.. |maintainer-remytms| image:: https://github.com/remytms.png?size=40px
:target: https://github.com/remytms
:alt: remytms

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-remytms|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions pos_donation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2025 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later
from . import models
25 changes: 25 additions & 0 deletions pos_donation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: 2025 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

{
"name": "PoS Donation",
"summary": "Generate donation for donation sold in PoS",
"version": "16.0.1.0.0",
"category": "Sales/Point of Sale",
"website": "https://github.com/OCA/pos",
"author": "Coop IT Easy SC, Odoo Community Association (OCA)",
"maintainers": ["remytms"],
"license": "AGPL-3",
"depends": [
"donation",
"point_of_sale",
],
"data": [
"views/donation_views.xml",
"views/product_template_views.xml",
],
"demo": [
"demo/donation.xml",
],
}
18 changes: 18 additions & 0 deletions pos_donation/demo/donation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="product_product_donation_pos" model="product.product">
<field name="name">PoS Donation</field>
<field name="default_code">POS-DON</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="sale_ok" eval="True" />
<field name="list_price">0</field>
<field name="taxes_id" eval="False" />
<field name="detailed_type">donation_in_pos</field>
<field name="tax_receipt_ok" eval="True" />
<field name="available_in_pos">True</field>
<field name="default_tax_receipt_option">none</field>
<field
name="description"
>Donation item that can be sold in PoS and that is eligible for a tax receipt</field>
</record>
</odoo>
121 changes: 121 additions & 0 deletions pos_donation/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_donation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-13 07:27+0000\n"
"PO-Revision-Date: 2025-07-13 07:27+0000\n"
"Last-Translator: Simon Hick\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: pos_donation
#: model:ir.model.fields,help:pos_donation.field_product_product__detailed_type
#: model:ir.model.fields,help:pos_donation.field_product_template__detailed_type
msgid ""
"A storable product is a product for which you manage stock. The Inventory "
"app has to be installed.\n"
"A consumable product is a product for which stock is not managed.\n"
"A service is a non-material product you provide."
msgstr ""

#. module: pos_donation
#: model:ir.model.fields.selection,name:pos_donation.selection__product_template__default_tax_receipt_option__annual
msgid "Annual Tax Receipt"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields,field_description:pos_donation.field_product_product__default_tax_receipt_option
#: model:ir.model.fields,field_description:pos_donation.field_product_template__default_tax_receipt_option
msgid "Default Tax Receipt Option"
msgstr ""

#. module: pos_donation
#: model:ir.model,name:pos_donation.model_donation_donation
msgid "Donation"
msgstr ""

#. module: pos_donation
#: model:ir.model,name:pos_donation.model_donation_line
msgid "Donation Lines"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields.selection,name:pos_donation.selection__product_template__detailed_type__donation_in_pos
msgid "Donation in PoS"
msgstr ""

#. module: pos_donation
#: model_terms:product.template,description:pos_donation.product_product_donation_pos_product_template
msgid ""
"Donation item that can be sold in PoS and that is eligible for a tax receipt"
msgstr ""
"Don qui peut être vendu en PdV et qui est éligible pour un reçu fiscal"

#. module: pos_donation
#: model:ir.model.fields.selection,name:pos_donation.selection__product_template__default_tax_receipt_option__each
msgid "For Each Donation"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields.selection,name:pos_donation.selection__product_template__default_tax_receipt_option__none
msgid "None"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields,field_description:pos_donation.field_donation_donation__displayed_payment_mode
msgid "Payment Mode"
msgstr ""

#. module: pos_donation
#: model:product.template,name:pos_donation.product_product_donation_pos_product_template
msgid "PoS Donation"
msgstr ""

#. module: pos_donation
#. odoo-python
#: code:addons/pos_donation/models/donation.py:0
#: model:ir.model.fields,field_description:pos_donation.field_donation_donation__pos_order_id
#: model_terms:ir.ui.view,arch_db:pos_donation.donation_form
#, python-format
msgid "PoS Order"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields,field_description:pos_donation.field_donation_donation__pos_payment_method_ids
msgid "PoS Payment Methods"
msgstr ""

#. module: pos_donation
#: model:ir.model,name:pos_donation.model_pos_order
msgid "Point of Sale Orders"
msgstr ""

#. module: pos_donation
#: model:ir.model,name:pos_donation.model_product_template
msgid "Product"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields,field_description:pos_donation.field_product_product__detailed_type
#: model:ir.model.fields,field_description:pos_donation.field_product_template__detailed_type
msgid "Product Type"
msgstr ""

#. module: pos_donation
#. odoo-python
#: code:addons/pos_donation/models/donation.py:0
#, python-format
msgid "Various"
msgstr "Divers"

#~ msgid "Product for donation in pos must belong to a company."
#~ msgstr ""
#~ "Un produit représentant une donation doit appartenir à une entreprise"
112 changes: 112 additions & 0 deletions pos_donation/i18n/pos_donation.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_donation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \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"

#. module: pos_donation
#: model:ir.model.fields,help:pos_donation.field_product_product__detailed_type
#: model:ir.model.fields,help:pos_donation.field_product_template__detailed_type
msgid ""
"A storable product is a product for which you manage stock. The Inventory app has to be installed.\n"
"A consumable product is a product for which stock is not managed.\n"
"A service is a non-material product you provide."
msgstr ""

#. module: pos_donation
#: model:ir.model.fields.selection,name:pos_donation.selection__product_template__default_tax_receipt_option__annual
msgid "Annual Tax Receipt"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields,field_description:pos_donation.field_product_product__default_tax_receipt_option
#: model:ir.model.fields,field_description:pos_donation.field_product_template__default_tax_receipt_option
msgid "Default Tax Receipt Option"
msgstr ""

#. module: pos_donation
#: model:ir.model,name:pos_donation.model_donation_donation
msgid "Donation"
msgstr ""

#. module: pos_donation
#: model:ir.model,name:pos_donation.model_donation_line
msgid "Donation Lines"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields.selection,name:pos_donation.selection__product_template__detailed_type__donation_in_pos
msgid "Donation in PoS"
msgstr ""

#. module: pos_donation
#: model_terms:product.template,description:pos_donation.product_product_donation_pos_product_template
msgid ""
"Donation item that can be sold in PoS and that is eligible for a tax receipt"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields.selection,name:pos_donation.selection__product_template__default_tax_receipt_option__each
msgid "For Each Donation"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields.selection,name:pos_donation.selection__product_template__default_tax_receipt_option__none
msgid "None"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields,field_description:pos_donation.field_donation_donation__displayed_payment_mode
msgid "Payment Mode"
msgstr ""

#. module: pos_donation
#: model:product.template,name:pos_donation.product_product_donation_pos_product_template
msgid "PoS Donation"
msgstr ""

#. module: pos_donation
#. odoo-python
#: code:addons/pos_donation/models/donation.py:0
#: model:ir.model.fields,field_description:pos_donation.field_donation_donation__pos_order_id
#: model_terms:ir.ui.view,arch_db:pos_donation.donation_form
#, python-format
msgid "PoS Order"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields,field_description:pos_donation.field_donation_donation__pos_payment_method_ids
msgid "PoS Payment Methods"
msgstr ""

#. module: pos_donation
#: model:ir.model,name:pos_donation.model_pos_order
msgid "Point of Sale Orders"
msgstr ""

#. module: pos_donation
#: model:ir.model,name:pos_donation.model_product_template
msgid "Product"
msgstr ""

#. module: pos_donation
#: model:ir.model.fields,field_description:pos_donation.field_product_product__detailed_type
#: model:ir.model.fields,field_description:pos_donation.field_product_template__detailed_type
msgid "Product Type"
msgstr ""

#. module: pos_donation
#. odoo-python
#: code:addons/pos_donation/models/donation.py:0
#, python-format
msgid "Various"
msgstr ""
7 changes: 7 additions & 0 deletions pos_donation/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SPDX-FileCopyrightText: 2025 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later
from . import donation
from . import donation_line
from . import product_template
from . import pos_order
Loading
Loading