diff --git a/multi_currency_payment_in_pos/README.rst b/multi_currency_payment_in_pos/README.rst new file mode 100644 index 000000000..86ece0bd2 --- /dev/null +++ b/multi_currency_payment_in_pos/README.rst @@ -0,0 +1,41 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +POS Multi Currency Payment +========================== +This module allows to use multiple currency in Point of Sale module. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: (V17) Shikhil Raj , Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/multi_currency_payment_in_pos/__init__.py b/multi_currency_payment_in_pos/__init__.py new file mode 100644 index 000000000..f6bb9fadd --- /dev/null +++ b/multi_currency_payment_in_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import models diff --git a/multi_currency_payment_in_pos/__manifest__.py b/multi_currency_payment_in_pos/__manifest__.py new file mode 100644 index 000000000..2fe1526ff --- /dev/null +++ b/multi_currency_payment_in_pos/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +{ + 'name': "POS Multi Currency Payment", + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': "This module allows us to make payment in multiple " + "currencies in Odoo 17 POS module.", + 'description': "This module in Odoo 17 offers the " + "option to expand its capabilities, enabling companies " + "to take payments in different currencies. A variety of " + "adjustments and setups are required for the POS module " + "to be extended to support several currencies, enabling " + "businesses to perform transactions in various monetary " + "units without any issues.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['point_of_sale', 'account'], + 'data': [ + 'views/res_config_settings_views.xml' + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'multi_currency_payment_in_pos/static/src/xml/multicurrency_templates.xml', + 'multi_currency_payment_in_pos/static/src/js/pos_models.js', + 'multi_currency_payment_in_pos/static/src/js/backend_order.js', + 'multi_currency_payment_in_pos/static/src/js/paymentscreen.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/multi_currency_payment_in_pos/doc/RELEASE_NOTES.md b/multi_currency_payment_in_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..25e240971 --- /dev/null +++ b/multi_currency_payment_in_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 14.08.2025 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for POS Multi Currency Payment diff --git a/multi_currency_payment_in_pos/models/__init__.py b/multi_currency_payment_in_pos/models/__init__.py new file mode 100644 index 000000000..8977602e8 --- /dev/null +++ b/multi_currency_payment_in_pos/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from . import pos_config +from . import pos_order +from . import pos_payment +from . import pos_session +from . import res_config_settings \ No newline at end of file diff --git a/multi_currency_payment_in_pos/models/pos_config.py b/multi_currency_payment_in_pos/models/pos_config.py new file mode 100644 index 000000000..66be632ac --- /dev/null +++ b/multi_currency_payment_in_pos/models/pos_config.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import api, fields, models + + +class PosConfig(models.Model): + """Adding boolean field and many2many currency field.""" + _inherit = 'pos.config' + + currency_ids = fields.Many2many('res.currency', + string='Currency', help='Currency') + enable_multicurrency = fields.Boolean(string='Enable multi currency', + help='Enable the multi currency') + + @api.model + def get_config_settings(self, config_id): + """Updating all the currencies with id, name, symbol, rate""" + config = self.env['pos.config'].browse(int(config_id)) + result = [] + for currency in config.currency_ids: + result.append({ + 'id': currency.id, + 'name': currency.name, + 'symbol': currency.symbol, + 'rate': currency.rate, + }) + + return result + + @api.model + def get_selected_currency(self, selected_id): + """Return the """ + currency = self.env['res.currency'].browse(int(selected_id)) + usd_val = round(1 / currency.rate, 2) + return [{ + 'id': currency.id, + 'name': currency.name, + 'symbol': currency.symbol, + 'rate': currency.rate, + 'usd_val': usd_val + }] diff --git a/multi_currency_payment_in_pos/models/pos_order.py b/multi_currency_payment_in_pos/models/pos_order.py new file mode 100644 index 000000000..064ab3cf6 --- /dev/null +++ b/multi_currency_payment_in_pos/models/pos_order.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import api, models + + +class PosOrder(models.Model): + """This class extends the 'pos.order' model and adds custom functionality + related to payment processing.""" + _inherit = 'pos.order' + + @api.model + def _payment_fields(self, order, ui_paymentline): + """Prepare and return a dictionary containing payment fields from the + user interface payment line. + params: + order (pos.order): The POS order to which the payment belongs. + ui_paymentline (dict): Payment information from the user interface.""" + return { + 'amount': ui_paymentline['amount'] or 0.0, + 'payment_date': ui_paymentline['name'], + 'payment_method_id': ui_paymentline['payment_method_id'], + 'card_type': ui_paymentline.get('card_type'), + 'cardholder_name': ui_paymentline.get('cardholder_name'), + 'transaction_id': ui_paymentline.get('transaction_id'), + 'payment_status': ui_paymentline.get('payment_status'), + 'ticket': ui_paymentline.get('ticket'), + 'pos_order_id': order.id, + 'payment_currency': ui_paymentline.get('payment_currency'), + 'currency_amount': ui_paymentline.get('currency_amount') + } diff --git a/multi_currency_payment_in_pos/models/pos_payment.py b/multi_currency_payment_in_pos/models/pos_payment.py new file mode 100644 index 000000000..7c20d70a1 --- /dev/null +++ b/multi_currency_payment_in_pos/models/pos_payment.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import fields, models + + +class PosPayment(models.Model): + """Adding currency symbol and amount.""" + _inherit = 'pos.payment' + + payment_currency = fields.Char(string='Payment Currency', + help='Currency in POS settings.') + currency_amount = fields.Float(string='Currency Amount', + help='Currency amount settings.') diff --git a/multi_currency_payment_in_pos/models/pos_session.py b/multi_currency_payment_in_pos/models/pos_session.py new file mode 100644 index 000000000..833e3e48a --- /dev/null +++ b/multi_currency_payment_in_pos/models/pos_session.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import models + + +class PosSession(models.Model): + """Inherited this model and added customize loader parameters for + retrieving currency-related data,Retrieve currency information for + the POS session's user interface.""" + _inherit = 'pos.session' + + def _loader_params_res_currency(self): + """Customize loader parameters for retrieving currency-related data.""" + result = super()._loader_params_res_currency() + result['params'] = { + 'search_params': { + 'domain': [], + 'fields': [], + }, + } + return result + + def _get_pos_ui_res_currency(self, params): + """Retrieve currency information for the POS session's user interface. + """ + result = super()._get_pos_ui_res_currency(params) + currencies = self.config_id.currency_ids + currency_params = self.env['res.currency'].search_read([('id', 'in', currencies.ids)]) + result['currency_params'] = currency_params + return result diff --git a/multi_currency_payment_in_pos/models/res_config_settings.py b/multi_currency_payment_in_pos/models/res_config_settings.py new file mode 100644 index 000000000..b5239974e --- /dev/null +++ b/multi_currency_payment_in_pos/models/res_config_settings.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + """Added boolean field and currency.""" + _inherit = 'res.config.settings' + + currency_ids = fields.Many2many('res.currency', + string="Currencies", + related="pos_config_id.currency_ids", + readonly=False, + help="The list of currencies supported by " + "this Point of Sale configuration.") + + enable_currency = fields.Boolean(string="Enable Currency", + config_parameter="multi_currency_payment_in_pos.enable_currency", + help="Enable or disable currency for " + "this POS configuration.") + + @api.onchange('enable_currency') + def _onchange_value(self): + """When enable the boolean field many2many currency field will + display.""" + for rec in self: + rec.pos_config_id.enable_multicurrency = rec.enable_currency + print("onchange : ", rec.pos_config_id.enable_multicurrency) + diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/capture (1).png b/multi_currency_payment_in_pos/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/capture (1).png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/check.png b/multi_currency_payment_in_pos/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/check.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/chevron.png b/multi_currency_payment_in_pos/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/chevron.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/cogs.png b/multi_currency_payment_in_pos/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/cogs.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/consultation.png b/multi_currency_payment_in_pos/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/consultation.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/ecom-black.png b/multi_currency_payment_in_pos/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/ecom-black.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/education-black.png b/multi_currency_payment_in_pos/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/education-black.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/hotel-black.png b/multi_currency_payment_in_pos/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/hotel-black.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/img.png b/multi_currency_payment_in_pos/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/img.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/license.png b/multi_currency_payment_in_pos/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/license.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/lifebuoy.png b/multi_currency_payment_in_pos/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/manufacturing-black.png b/multi_currency_payment_in_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/photo-capture.png b/multi_currency_payment_in_pos/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/photo-capture.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/pos-black.png b/multi_currency_payment_in_pos/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/pos-black.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/puzzle.png b/multi_currency_payment_in_pos/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/puzzle.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/restaurant-black.png b/multi_currency_payment_in_pos/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/service-black.png b/multi_currency_payment_in_pos/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/service-black.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/trading-black.png b/multi_currency_payment_in_pos/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/trading-black.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/training.png b/multi_currency_payment_in_pos/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/training.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/update.png b/multi_currency_payment_in_pos/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/update.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/user.png b/multi_currency_payment_in_pos/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/user.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/icons/wrench.png b/multi_currency_payment_in_pos/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/icons/wrench.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/Cybrosys R.png b/multi_currency_payment_in_pos/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/misc/Cybrosys R.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/email.svg b/multi_currency_payment_in_pos/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/phone.svg b/multi_currency_payment_in_pos/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/star (1) 2.svg b/multi_currency_payment_in_pos/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/support (1) 1.svg b/multi_currency_payment_in_pos/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/support-email.svg b/multi_currency_payment_in_pos/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/tick-mark.svg b/multi_currency_payment_in_pos/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/whatsapp 1.svg b/multi_currency_payment_in_pos/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/multi_currency_payment_in_pos/static/description/assets/misc/whatsapp.svg b/multi_currency_payment_in_pos/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/multi_currency_payment_in_pos/static/description/assets/modules/1.png b/multi_currency_payment_in_pos/static/description/assets/modules/1.png new file mode 100644 index 000000000..5be12e731 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/modules/1.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/modules/2.png b/multi_currency_payment_in_pos/static/description/assets/modules/2.png new file mode 100644 index 000000000..d445c1ce0 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/modules/2.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/modules/3.png b/multi_currency_payment_in_pos/static/description/assets/modules/3.png new file mode 100644 index 000000000..382a381b5 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/modules/3.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/modules/4.png b/multi_currency_payment_in_pos/static/description/assets/modules/4.png new file mode 100644 index 000000000..6ac3c0623 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/modules/4.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/modules/5.png b/multi_currency_payment_in_pos/static/description/assets/modules/5.png new file mode 100644 index 000000000..58c25d09f Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/modules/5.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/modules/6.png b/multi_currency_payment_in_pos/static/description/assets/modules/6.png new file mode 100644 index 000000000..f52018e60 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/modules/6.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/screenshots/1.png b/multi_currency_payment_in_pos/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..11d040c3f Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/screenshots/1.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/screenshots/2.png b/multi_currency_payment_in_pos/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..008122ec0 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/screenshots/2.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/screenshots/3.png b/multi_currency_payment_in_pos/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..6eeb7263b Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/screenshots/3.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/screenshots/4.png b/multi_currency_payment_in_pos/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..bd977a178 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/screenshots/4.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/screenshots/5.png b/multi_currency_payment_in_pos/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..8318fbb28 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/screenshots/5.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/screenshots/6.png b/multi_currency_payment_in_pos/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..d79ac306e Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/screenshots/6.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/screenshots/7.png b/multi_currency_payment_in_pos/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..f06379cd1 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/screenshots/7.png differ diff --git a/multi_currency_payment_in_pos/static/description/assets/screenshots/hero.gif b/multi_currency_payment_in_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6da20d0b3 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/assets/screenshots/hero.gif differ diff --git a/multi_currency_payment_in_pos/static/description/banner.jpg b/multi_currency_payment_in_pos/static/description/banner.jpg new file mode 100644 index 000000000..b82592e0c Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/banner.jpg differ diff --git a/multi_currency_payment_in_pos/static/description/icon.png b/multi_currency_payment_in_pos/static/description/icon.png new file mode 100644 index 000000000..768887433 Binary files /dev/null and b/multi_currency_payment_in_pos/static/description/icon.png differ diff --git a/multi_currency_payment_in_pos/static/description/index.html b/multi_currency_payment_in_pos/static/description/index.html new file mode 100644 index 000000000..8b6ba56d8 --- /dev/null +++ b/multi_currency_payment_in_pos/static/description/index.html @@ -0,0 +1,659 @@ + + + + + + + POS Multi Currency Payment + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ POS Multi Currency Payment +

+

+ This Module Allows To Use Multiple Currency In Point of Sale Module. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Community & Enterprise Support . +

+
+
+
+
+
+
+ +
+
+

User can enable multiple currency payment feature in the settings and choose multiple currencies. + . +

+
+
+
+
+
+
+ +
+
+

Convert the remaining payment currency amount based on + the selected currency from POS payment screen. +

+
+
+
+
+
+
+ +
+
+

+ Shows the amount of payment it's currency on the payment lines and inside the reciept. +

+
+
+
+
+
+
+ +
+
+

+ Showcases the payment currency and converted currency + amount in the backend POS order. +

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ Enable option of Multi Currency per Session from POS settings and choose the currencies. + +

+
+
+
+
+
+
+ +
+
+

+ Toggle Multicurrency in payment screen to choose the enabled currencies. +

+
+
+
+
+
+
+ +
+
+

+ Enter the Payment Amount and click the button to Add Cash Payment. +

+
+
+
+
+
+
+ +
+
+

+ Payment lines added via multi currency option shows corresponding currency and it's amount. +

+
+
+
+
+
+
+ +
+
+

+

+
+
+
+
+
+
+ +
+
+

+ Payment Currency Symbol and amount is added to the receipt. +

+
+
+
+
+
+
+ +
+
+

+ Payment Currency symbol and amount is also added to the corresponding POS order created in the backend. +

+
+
+
+
+
+
+
    +
  • + + User can enable multiple currency payment feature in the settings and choose multiple currencies. +
  • +
  • + + Shows the amount of payment it's currency on the payment lines and inside the reciept. +
  • +
  • + + Convert the remaining payment currency amount based on the selected currency from POS payment screen. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:08 August 2025 +
+

+ Initial Commit for Profit And Loss PDF Report

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Licensing Consultancy

+
+
+
+
+
+
+

Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

Education

+

A platform for educational management

+
+
+
+
+ +

Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service Management

+

Keep track of services and invoice

+
+
+
+
+ +

Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to us on WhatsApp!

+
+91 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/multi_currency_payment_in_pos/static/src/js/backend_order.js b/multi_currency_payment_in_pos/static/src/js/backend_order.js new file mode 100644 index 000000000..3fb36e73b --- /dev/null +++ b/multi_currency_payment_in_pos/static/src/js/backend_order.js @@ -0,0 +1,112 @@ +///** @odoo-module **/ +///**This module extends the functionality of Odoo's backend order handling in the context +// * of multi-currency transactions. It overrides the standard `_save_to_server` method +// * to accommodate multi-currency data and ensure that the converted currency values are +// * correctly saved to the server. */ +import { patch } from "@web/core/utils/patch"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; +import { Payment } from "@point_of_sale/app/store/models"; +patch(PosStore.prototype, { +async _save_to_server(orders, options) { + if(orders.length > 0){ + for (let i = 0, len = orders[0].data.statement_ids.length; i < len; i++){ + if (this.orders[0].paymentlines[i]){ + if(this.orders[0].paymentlines[i].converted_currency){ + orders[0].data.statement_ids[i][2].currency_amount = this.orders[0].paymentlines[i].converted_currency.amount + orders[0].data.statement_ids[i][2].payment_currency = this.orders[0].paymentlines[i].converted_currency.name + }else{ + orders[0].data.statement_ids[i][2].currency_amount = "" + orders[0].data.statement_ids[i][2].payment_currency = "" + } + } + } + } + if (!orders || !orders.length) { + return Promise.resolve([]); + } + + // Filter out orders that are already being synced + const ordersToSync = orders.filter(order => !this.syncingOrders.has(order.id)); + + if (!ordersToSync.length) { + return Promise.resolve([]); + } + + // Add these order IDs to the syncing set + ordersToSync.forEach(order => this.syncingOrders.add(order.id)); + + this.set_synch("connecting", ordersToSync.length); + options = options || {}; + + // Keep the order ids that are about to be sent to the + // backend. In between create_from_ui and the success callback + // new orders may have been added to it. + const order_ids_to_sync = ordersToSync.map((o) => o.id); + + for (const order of ordersToSync) { + order.to_invoice = options.to_invoice || false; + } + // we try to send the order. silent prevents a spinner if it takes too long. (unless we are sending an invoice, + // then we want to notify the user that we are waiting on something ) + const orm = options.to_invoice ? this.orm : this.orm.silent; + + try { + // FIXME POSREF timeout + // const timeout = typeof options.timeout === "number" ? options.timeout : 30000 * orders.length; + const serverIds = await orm.call( + "pos.order", + "create_from_ui", + [ordersToSync, options.draft || false], + { + context: this._getCreateOrderContext(ordersToSync, options), + } + ); + + for (const serverId of serverIds) { + const order = this.env.services.pos.orders.find( + (order) => order.name === serverId.pos_reference + ); + + if (order) { + order.server_id = serverId.id; + } + } + + for (const order_id of order_ids_to_sync) { + this.db.remove_order(order_id); + } + + this.failed = false; + this.set_synch("connected"); + return serverIds; + } catch (error) { + console.warn("Failed to send orders:", ordersToSync); + if (error.code === 200) { + // Business Logic Error, not a connection problem + // Hide error if already shown before ... + if ((!this.failed || options.show_error) && !options.to_invoice) { + this.failed = error; + this.set_synch("error"); + throw error; + } + } + this.set_synch("disconnected"); + throw error; + } finally { + order_ids_to_sync.forEach(order_id => this.syncingOrders.delete(order_id)); + } + } +}) +patch(Payment.prototype, { + export_for_printing() { + const result = super.export_for_printing(...arguments); + if(this.converted_currency){ + result.converted_currency_amount = this.converted_currency.amount + result.converted_currency_name = this.converted_currency.name + result.converted_currency_symbol = this.converted_currency.symbol + this.currency_amount = this.converted_currency.amount + } + return result; + }, + +}); diff --git a/multi_currency_payment_in_pos/static/src/js/paymentscreen.js b/multi_currency_payment_in_pos/static/src/js/paymentscreen.js new file mode 100644 index 000000000..414599d23 --- /dev/null +++ b/multi_currency_payment_in_pos/static/src/js/paymentscreen.js @@ -0,0 +1,163 @@ +/** @odoo-module **/ +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import { registry } from "@web/core/registry"; +import { onMounted, useState, mount } from "@odoo/owl"; +import { patch } from "@web/core/utils/patch"; +import { useService } from "@web/core/utils/hooks"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +var current_currency,currency_id +patch(PaymentScreen.prototype, { + setup(){ + super.setup(); + this.current_currency = useState({ + rate: 1, + display_name: '', + symbol: '', + }); + this.multi_currency = useState({ + currencies: [], + usd_val: '', + name: '', + total: '', + symbol: '', + rate: '' + }); + + // useListener('multi-payment-line', this.multi_currency_payment_line); + this.env.bus.addEventListener('multi-payment-line', this.multi_currency_payment_line.bind(this)); + var currency=[] + onMounted(() => { + this.multi_currency.currencies = currency; + this.enable_multi_currency(); + }); +currency.push(this.pos.currency.currency_params) + + }, + + enable_multi_currency(){ + if(this.pos.config.enable_multicurrency == false){ + $('.pos_multicurrency').css('display','none') + } + }, + + show_options(){ + if($('.multicurrency_container')[0].style.display == 'none'){ + $('.multicurrency_container').css({'display':'flex','flex-direction':'column','align-items': 'center'}) + for (let i = 0, len = this.multi_currency.currencies[0].length; i < len; i++){ + $('.currecy_list').append("