Skip to content

Commit

Permalink
Merge pull request #482 from legalsylvain/16.0-mig-pos_journal_image
Browse files Browse the repository at this point in the history
Integrate github.com/OCA/pull/1021 into the TEST project branch
  • Loading branch information
BT-cserra authored Dec 15, 2023
2 parents 2cdbda7 + ee431d0 commit 585b35a
Show file tree
Hide file tree
Showing 24 changed files with 642 additions and 0 deletions.
Empty file.
1 change: 1 addition & 0 deletions pos_payment_method_image/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions pos_payment_method_image/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Point of Sale - Payment Method Image",
"summary": "Add images on Payment Methods available in the PoS",
"version": "16.0.1.0.0",
"category": "Point of Sale",
"author": "Odoo SA, GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/pos",
"license": "LGPL-3",
"depends": ["point_of_sale"],
"data": ["views/view_pos_payment_method.xml"],
"assets": {
"point_of_sale.assets": [
"pos_payment_method_image/static/src/js/PaymentScreen.js",
"pos_payment_method_image/static/src/css/pos_payment_method_image.css",
"pos_payment_method_image/static/src/xml/pos_payment_method_image.xml",
],
},
"installable": True,
}
31 changes: 31 additions & 0 deletions pos_payment_method_image/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_method_image
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-30 22:34+0000\n"
"PO-Revision-Date: 2023-06-30 22:34+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: pos_payment_method_image
#: model:ir.model.fields,field_description:pos_payment_method_image.field_pos_payment_method__image
msgid "Image"
msgstr ""

#. module: pos_payment_method_image
#: model:ir.model,name:pos_payment_method_image.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr "Modes de paiement du point de vente"

#. module: pos_payment_method_image
#: model:ir.model,name:pos_payment_method_image.model_pos_session
msgid "Point of Sale Session"
msgstr "Session du point de vente"
2 changes: 2 additions & 0 deletions pos_payment_method_image/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import pos_payment_method
from . import pos_session
10 changes: 10 additions & 0 deletions pos_payment_method_image/models/pos_payment_method.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (C) 2019 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models


class PosPaymentMethod(models.Model):
_inherit = "pos.payment.method"

image = fields.Binary()
13 changes: 13 additions & 0 deletions pos_payment_method_image/models/pos_session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models


class PosSession(models.Model):
_inherit = "pos.session"

def _loader_params_pos_payment_method(self):
res = super()._loader_params_pos_payment_method()
res["search_params"]["fields"].append("image")
return res
13 changes: 13 additions & 0 deletions pos_payment_method_image/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
To configure this module, you need to:

* Go to 'Point Of Sale' / 'Configuration' / 'Payment Methods'

* Select a payment method

.. figure:: ../static/description/pos_payment_method_form.png


Note:

If there is no image defined, default image will be set, depending
on the configuration (cash, customer wallet, bank)
5 changes: 5 additions & 0 deletions pos_payment_method_image/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* Sylvain LE GAL <https://twitter.com/legalsylvain>

Most of the code comes from Odoo SA <http://www.odoo.com>.

(https://github.com/odoo/odoo/pull/109446)
6 changes: 6 additions & 0 deletions pos_payment_method_image/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module extends the functionality of point of sale to display images
for each journal available in the Point of Sale.

* The images are available in the payment screen

.. figure:: ../static/description/pos_payment.png
4 changes: 4 additions & 0 deletions pos_payment_method_image/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* Do not port this module in V17+, because the feature become native at this release.
See : https://github.com/odoo/odoo/pull/109446

* write migration scripts from ``pos_journal_image`` (V12) to ``pos_payment_method_image`` (V16).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 585b35a

Please sign in to comment.