Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f1c2213
ADD website_sale_charge_payment_fee
eLBati Jun 4, 2018
1d618f7
[UPD] Update website_sale_charge_payment_fee.pot
oca-travis Oct 2, 2018
6e32f59
[UPD] README.rst
OCA-git-bot Oct 3, 2018
3c1d09c
[FIX] website_sale_charge_payment_fee: Do not blow up when there is n…
SimoRubi Nov 19, 2018
5ce8b14
fixup! [FIX] website_sale_charge_payment_fee: Do not blow up when the…
SimoRubi Nov 19, 2018
123da3d
[ADD] icon.png
OCA-git-bot Apr 3, 2019
a927677
[UPD] README.rst
OCA-git-bot Jul 29, 2019
b871a10
[FIX] website_sale_charge_payment_fee: Use a browse record if there a…
SimoRubi Jan 17, 2019
478a9ab
[12.0][MIG] website_sale_charge_payment_fee: Migration to 12.0
Oct 20, 2020
230b59a
[IMP] Adjust coding style
Oct 20, 2020
d8ff9a7
[IMP] Imrpove javascript
Nov 6, 2020
9126788
[IMP] Adjust Pay Now button javascript, remove tax
Nov 11, 2020
88e8a2d
[IMP] Fix save_token pattern, adjust fee display
Nov 27, 2020
e8702bb
[IMP] Adjust update_fee_line, add comment
Nov 30, 2020
1237836
[IMP] Add currency to fix price field, update pot
Dec 3, 2020
988751f
[IMP] Fix required error on charge_fee_currency_id
Dec 22, 2020
49053ff
[FIX] website_sale_charge_payment_fee: Use hasclass in xpath expression
pedrobaeza Jul 3, 2021
5e9faa8
[IMP] website_sale_charge_payment_fee: black, isort, prettier
miguel-S73 May 27, 2022
cfb7254
[MIG] website_sale_charge_payment_fee: Migration to 14.0
miguel-S73 Feb 12, 2024
81ca69b
[UPD] Update website_sale_charge_payment_fee.pot
Feb 13, 2024
05b5e1f
[BOT] post-merge updates
OCA-git-bot Feb 13, 2024
3a9d9b3
Translated using Weblate (Spanish)
Ivorra78 Feb 18, 2024
cb14556
[IMP] website_sale_charge_payment_fee: pre-commit auto fixes
miguel-S73 Apr 16, 2025
bec6b60
[MIG] website_sale_charge_payment_fee: Migration to 18.0
miguel-S73 Apr 17, 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
107 changes: 107 additions & 0 deletions website_sale_charge_payment_fee/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
=============================
eCommerce: charge payment fee
=============================

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

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/18.0/website_sale_charge_payment_fee
:alt: OCA/e-commerce
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_charge_payment_fee
: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/e-commerce&target_branch=18.0
:alt: Try me on Runboat

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

This module allows to associate generic payment fee to online payment
methods. Thus, when website user select a payment method with additional
fee, an additional sale order line will be added to online order

**Table of contents**

.. contents::
:local:

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

Click

Accounting -> Configuration -> Payments -> Payment Acquirers

open an acquirer and in CHARGE PAYMENT FEE tab, you can set the fee to
be charged to customer.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/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/e-commerce/issues/new?body=module:%20website_sale_charge_payment_fee%0Aversion:%2018.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
-------

* Agile Business Group
* AITIC S.A.S
* Quartile Limited
* Studio73

Contributors
------------

- Lorenzo Battistini <lorenzo.battistini@agilebg.com>

- AITIC S.A. <info@aitic.com.ar>

- Quartile Limited <info@quartile.co>

- `Studio73 <https://www.studio73.es>`__:

- Miguel Gandia

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-miguel-S73| image:: https://github.com/miguel-S73.png?size=40px
:target: https://github.com/miguel-S73
:alt: miguel-S73

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

|maintainer-miguel-S73|

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/18.0/website_sale_charge_payment_fee>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions website_sale_charge_payment_fee/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import controllers
31 changes: 31 additions & 0 deletions website_sale_charge_payment_fee/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2018 Lorenzo Battistini - Agile Business Group
# Copyright 2020 AITIC S.A.S
# Copyright 2020 Quartile Limited
# Copyright 2024 Miguel Gandia - Studio73
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "eCommerce: charge payment fee",
"summary": "Payment fee charged to customer",
"version": "18.0.1.0.0",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
"maintainers": ["miguel-S73"],
"author": "Agile Business Group, "
"AITIC S.A.S, "
"Quartile Limited, "
"Studio73, "
"Odoo Community Association (OCA)",
"license": "LGPL-3",
"application": False,
"installable": True,
"depends": ["payment", "website_sale"],
"data": ["views/payment_provider_views.xml", "views/website_sale_templates.xml"],
"assets": {
"web.assets_frontend": [
"website_sale_charge_payment_fee/static/src/js/website_sale_fee.esm.js",
],
"web.assets_tests": [
"website_sale_charge_payment_fee/static/tests/tours/website_sale_fee_tour.esm.js",
],
},
}
1 change: 1 addition & 0 deletions website_sale_charge_payment_fee/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
38 changes: 38 additions & 0 deletions website_sale_charge_payment_fee/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2018 Lorenzo Battistini - Agile Business Group
# Copyright 2020 AITIC S.A.S
# Copyright 2020 Quartile Limited
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).

from odoo import http
from odoo.http import request

from odoo.addons.website_sale.controllers.main import WebsiteSale


class WebsiteSaleFee(WebsiteSale):
@http.route()
def shop_payment(self, **post):
res = super().shop_payment(**post)
order = request.website.sale_get_order()
provider_id = post.get("provider_id")
payment_option_id = post.get("payment_option_id")
payment_methods_sudo = res.qcontext.get("payment_methods_sudo")
providers_sudo = res.qcontext.get("providers_sudo")
if payment_option_id:
res.qcontext["selected_payment_method"] = int(payment_option_id)
if provider_id or providers_sudo:
if provider_id:
selected_provider = request.env["payment.provider"].browse(
int(provider_id)
)
else:
_selected_provider = [
provider_sudo
for provider_sudo in payment_methods_sudo.provider_ids
if provider_sudo in providers_sudo
][:1]
if len(_selected_provider) > 0:
selected_provider = _selected_provider[0]
res.qcontext["selected_provider"] = selected_provider
order.sudo().update_fee_line(selected_provider.sudo())
return res
111 changes: 111 additions & 0 deletions website_sale_charge_payment_fee/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_charge_payment_fee
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-17 16:07+0000\n"
"PO-Revision-Date: 2025-04-17 16:07+0000\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: website_sale_charge_payment_fee
#: model_terms:ir.ui.view,arch_db:website_sale_charge_payment_fee.method_form_fee
msgid "(Fee:"
msgstr "(Tasa:"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,help:website_sale_charge_payment_fee.field_payment_provider__charge_fee
msgid ""
"An extra fee line will be added to online order when using this payment "
"method"
msgstr ""
"Se añadirá una línea de tarifa adicional al pedido en línea cuando se "
"utilice este método de pago"

#. module: website_sale_charge_payment_fee
#: model_terms:ir.ui.view,arch_db:website_sale_charge_payment_fee.provider_form_fee_inherit
msgid "Charge payment fee"
msgstr "Cargo por pago"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_payment_provider__charge_fee_type
msgid "Computation type"
msgstr "Tipo de computación"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_payment_provider__charge_fee_currency_id
msgid "Fee Currency"
msgstr "Divisa de la Tasa"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_payment_provider__charge_fee_description
msgid "Fee Description"
msgstr "Descripción de Tasa"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_payment_provider__charge_fee_product_id
msgid "Fee Product"
msgstr "Producto de tarifa"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_payment_provider__charge_fee
msgid "Fee charged to customer"
msgstr "Tarifa cobrada al cliente"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields.selection,name:website_sale_charge_payment_fee.selection__payment_provider__charge_fee_type__fixed
msgid "Fixed"
msgstr "Fijo"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_payment_provider__charge_fee_fixed_price
msgid "Fixed Price"
msgstr "Precio Fijo"

#. module: website_sale_charge_payment_fee
#: model_terms:ir.ui.view,arch_db:website_sale_charge_payment_fee.payment_fee
msgid "Payment Fee"
msgstr "Cuota de pago:"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_sale_order__amount_payment_fee
msgid "Payment Fee Amount"
msgstr "Importe de la tarifa de pago"

#. module: website_sale_charge_payment_fee
#: model:ir.model,name:website_sale_charge_payment_fee.model_payment_provider
msgid "Payment Provider"
msgstr "Proveedor de pago"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_sale_order_line__payment_fee_line
msgid "Payment fee line"
msgstr "Línea de cuota pago"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,field_description:website_sale_charge_payment_fee.field_payment_provider__charge_fee_percentage
#: model:ir.model.fields.selection,name:website_sale_charge_payment_fee.selection__payment_provider__charge_fee_type__percentage
msgid "Percentage"
msgstr "Porcentaje"

#. module: website_sale_charge_payment_fee
#: model:ir.model.fields,help:website_sale_charge_payment_fee.field_payment_provider__charge_fee_percentage
msgid "Percentage applied to order total"
msgstr "Porcentaje aplicado al total del pedido"

#. module: website_sale_charge_payment_fee
#: model:ir.model,name:website_sale_charge_payment_fee.model_sale_order
msgid "Sales Order"
msgstr "Pedido de venta"

#. module: website_sale_charge_payment_fee
#: model:ir.model,name:website_sale_charge_payment_fee.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de pedido de venta"
Loading
Loading