diff --git a/pos_donation/README.rst b/pos_donation/README.rst new file mode 100644 index 0000000000..20598d3754 --- /dev/null +++ b/pos_donation/README.rst @@ -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 `_. +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Coop IT Easy SC + +Contributors +~~~~~~~~~~~~ + +* `Coop IT Easy SC `_: + + * 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 `__: + +|maintainer-remytms| + +This module is part of the `OCA/pos `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/pos_donation/__init__.py b/pos_donation/__init__.py new file mode 100644 index 0000000000..d053ed4fe3 --- /dev/null +++ b/pos_donation/__init__.py @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: 2025 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later +from . import models diff --git a/pos_donation/__manifest__.py b/pos_donation/__manifest__.py new file mode 100644 index 0000000000..cb690752fc --- /dev/null +++ b/pos_donation/__manifest__.py @@ -0,0 +1,26 @@ +# 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": [ + "security/ir.model.access.csv", + "views/donation_views.xml", + "views/product_template_views.xml", + ], + "demo": [ + "demo/donation.xml", + ], +} diff --git a/pos_donation/demo/donation.xml b/pos_donation/demo/donation.xml new file mode 100644 index 0000000000..26fa0ff303 --- /dev/null +++ b/pos_donation/demo/donation.xml @@ -0,0 +1,18 @@ + + + + PoS Donation + POS-DON + + + 0 + + donation_in_pos + + True + none + Donation item that can be sold in PoS and that is eligible for a tax receipt + + diff --git a/pos_donation/i18n/fr.po b/pos_donation/i18n/fr.po new file mode 100644 index 0000000000..1f427f6f60 --- /dev/null +++ b/pos_donation/i18n/fr.po @@ -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" diff --git a/pos_donation/i18n/pos_donation.pot b/pos_donation/i18n/pos_donation.pot new file mode 100644 index 0000000000..2a8a2c4a47 --- /dev/null +++ b/pos_donation/i18n/pos_donation.pot @@ -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 "" diff --git a/pos_donation/models/__init__.py b/pos_donation/models/__init__.py new file mode 100644 index 0000000000..f7b8ffcf35 --- /dev/null +++ b/pos_donation/models/__init__.py @@ -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 diff --git a/pos_donation/models/donation.py b/pos_donation/models/donation.py new file mode 100644 index 0000000000..fdc3e4b63c --- /dev/null +++ b/pos_donation/models/donation.py @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: 2025 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import _, api, fields, models + + +class DonationDonation(models.Model): + _inherit = "donation.donation" + + pos_order_id = fields.Many2one( + string="PoS Order", + comodel_name="pos.order", + ) + pos_payment_method_ids = fields.Many2many( + "pos.payment.method", + string="PoS Payment Methods", + compute="_compute_pos_payment_method_ids", + ) + displayed_payment_mode = fields.Char( + # non-breaking space here to avoid warning (because this is done on + # purpose): Two fields (displayed_payment_mode, payment_mode_id) of + # donation.donation() have the same label: Payment Mode. [Modules: + # pos_donation and donation] + string="Payment Mode", + compute="_compute_displayed_payment_mode", + ) + + @api.depends("pos_order_id.payment_ids.payment_method_id") + def _compute_pos_payment_method_ids(self): + for rec in self: + rec.pos_payment_method_ids = rec.pos_order_id.payment_ids.payment_method_id + + @api.depends("pos_order_id.payment_ids.payment_method_id", "payment_mode_id") + def _compute_displayed_payment_mode(self): + for donation in self: + if donation.pos_payment_method_ids: + if len(donation.pos_payment_method_ids) > 1: + donation.displayed_payment_mode = _("Various") + else: + donation.displayed_payment_mode = ( + donation.pos_payment_method_ids.name + ) + else: + donation.displayed_payment_mode = donation.payment_mode_id.name + + def action_view_pos_order_id(self): + return { + "type": "ir.actions.act_window", + "name": _("PoS Order"), + "res_model": "pos.order", + "view_mode": "tree,form", + "domain": [("id", "=", self.pos_order_id.id)], + } diff --git a/pos_donation/models/donation_line.py b/pos_donation/models/donation_line.py new file mode 100644 index 0000000000..2f9c62f232 --- /dev/null +++ b/pos_donation/models/donation_line.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2025 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import models + + +class DonationLine(models.Model): + _inherit = "donation.line" + + def _compute_in_kind(self): + """Donation in PoS should be considered as donation in-kind. + These donation should not generate account move, + because account move has already been generated by the PoS. + """ + res = super()._compute_in_kind() + for line in self: + # If line is not already considered a an in-kind donation, + # then we must check if it’s a pos_donation + if not line.in_kind: + line.in_kind = line.product_id.detailed_type == "donation_in_pos" + return res diff --git a/pos_donation/models/pos_order.py b/pos_donation/models/pos_order.py new file mode 100644 index 0000000000..0d28258dde --- /dev/null +++ b/pos_donation/models/pos_order.py @@ -0,0 +1,85 @@ +# SPDX-FileCopyrightText: 2025 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +import logging + +from odoo import Command, models +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class PosOrder(models.Model): + _inherit = "pos.order" + + def _get_donation_vals(self): + """Return value to create a donation if there is donation + product in the pos.order. It return None if there is no + donation product in the pos.order. + """ + # ensure_one because used in an ensure_one method + self.ensure_one() + donations = self.lines.filtered(lambda rec: rec.product_id.is_donation) + vals = None + if donations: + # FIXME: this should be checked in pos + if not self.partner_id: + _logger.warning( + ( + "Cannot create donation for pos.order {pos_order} " + "because there is no partner linked to the order." + ).format(pos_order=self) + ) + return None + # FIXME: having multiple products is currently not supported. the + # default_tax_receipt_option should not be defined on the + # product.template but on a more global record, like the + # pos.config. + if len(donations.product_id) > 1: + _logger.warning( + ( + "Cannot create donation for pos.order {pos_order} " + "because there are multiple donation products in the " + "order." + ).format(pos_order=self) + ) + return None + tax_receipt_option = donations.product_id.default_tax_receipt_option + vals = { + "pos_order_id": self.id, + "partner_id": self.partner_id.id, + "donation_date": self.date_order, + "payment_mode_id": False, + "company_id": self.company_id.id, + "payment_ref": self.pos_reference, + "tax_receipt_option": tax_receipt_option, + "line_ids": [ + Command.create( + { + "product_id": line.product_id.id, + "quantity": line.qty, + "unit_price": line.price_unit, + } + ) + for line in donations + ], + } + return vals + + def action_pos_order_paid(self): + # ensure_one ! + res = super().action_pos_order_paid() + donation_vals = self._get_donation_vals() + if donation_vals: + donation = self.env["donation.donation"].create(donation_vals) + try: + donation.validate() + except UserError: + _logger.warning( + ( + "Cannot validate donation {donation} based on " + "pos.order {pos_order}." + ).format(donation=donation, pos_order=self) + ) + return res diff --git a/pos_donation/models/product_template.py b/pos_donation/models/product_template.py new file mode 100644 index 0000000000..dc122698a3 --- /dev/null +++ b/pos_donation/models/product_template.py @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: 2025 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + detailed_type = fields.Selection( + selection_add=[ + ("donation_in_pos", "Donation in PoS"), + ], + ondelete={ + "donation_in_pos": "set consu", + }, + ) + default_tax_receipt_option = fields.Selection( + [ + ("none", "None"), + ("each", "For Each Donation"), + ("annual", "Annual Tax Receipt"), + ], + tracking=True, + ) + + def _detailed_type_mapping(self): + res = super()._detailed_type_mapping() + res.update( + { + "donation_in_pos": "consu", + } + ) + return res diff --git a/pos_donation/readme/CONTRIBUTORS.rst b/pos_donation/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..31498d2661 --- /dev/null +++ b/pos_donation/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `Coop IT Easy SC `_: + + * Rémy Taymans diff --git a/pos_donation/readme/DESCRIPTION.rst b/pos_donation/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..13d3a8c744 --- /dev/null +++ b/pos_donation/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +When a donation product is sold in the PoS, this module creates a donation related to the PoS order and validates it. diff --git a/pos_donation/readme/ROADMAP.rst b/pos_donation/readme/ROADMAP.rst new file mode 100644 index 0000000000..c0c35d9702 --- /dev/null +++ b/pos_donation/readme/ROADMAP.rst @@ -0,0 +1,5 @@ +* 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``. diff --git a/pos_donation/readme/USAGE.rst b/pos_donation/readme/USAGE.rst new file mode 100644 index 0000000000..cd386b4d90 --- /dev/null +++ b/pos_donation/readme/USAGE.rst @@ -0,0 +1,5 @@ +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. diff --git a/pos_donation/security/ir.model.access.csv b/pos_donation/security/ir.model.access.csv new file mode 100644 index 0000000000..1575c7a3f1 --- /dev/null +++ b/pos_donation/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_donation_donation_pos_user,donation.donation pos_user,donation.model_donation_donation,point_of_sale.group_pos_user,0,1,1,0 +access_donation_line_pos_user,donation.line pos_user,donation.model_donation_line,point_of_sale.group_pos_user,0,0,1,0 diff --git a/pos_donation/static/description/index.html b/pos_donation/static/description/index.html new file mode 100644 index 0000000000..5c3f87e425 --- /dev/null +++ b/pos_donation/static/description/index.html @@ -0,0 +1,447 @@ + + + + + +PoS Donation + + + +
+

PoS Donation

+ + +

Beta License: AGPL-3 OCA/pos Translate me on Weblate Try me on Runboat

+

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

+ +
+

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. +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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Coop IT Easy SC
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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.

+

Current maintainer:

+

remytms

+

This module is part of the OCA/pos project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/pos_donation/views/donation_views.xml b/pos_donation/views/donation_views.xml new file mode 100644 index 0000000000..2fc1a099fa --- /dev/null +++ b/pos_donation/views/donation_views.xml @@ -0,0 +1,57 @@ + + + + + donation.form.pos.order + donation.donation + + +
+ +
+ + + {'invisible': ['|', ('pos_payment_method_ids', '=', True), ('state', '=', 'done')]} + + + + + + + +
+ + + donation.tree.pos.order + donation.donation + + + + show + + + True + + + + + + + +
diff --git a/pos_donation/views/product_template_views.xml b/pos_donation/views/product_template_views.xml new file mode 100644 index 0000000000..7fa5b11487 --- /dev/null +++ b/pos_donation/views/product_template_views.xml @@ -0,0 +1,19 @@ + + + + + donation.pos.product.template.form + product.template + + + + + + + + + + diff --git a/setup/pos_donation/odoo/addons/pos_donation b/setup/pos_donation/odoo/addons/pos_donation new file mode 120000 index 0000000000..ddc271953e --- /dev/null +++ b/setup/pos_donation/odoo/addons/pos_donation @@ -0,0 +1 @@ +../../../../pos_donation \ No newline at end of file diff --git a/setup/pos_donation/setup.py b/setup/pos_donation/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/pos_donation/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)