diff --git a/pos_journal_image/README.rst b/pos_journal_image/README.rst index 418ff6ce..e69de29b 100644 --- a/pos_journal_image/README.rst +++ b/pos_journal_image/README.rst @@ -1,93 +0,0 @@ -============================= -Point of Sale - Journal Image -============================= - -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! This file is generated by oca-gen-addon-readme !! - !! changes will be overwritten. !! - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -.. |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-grap%2Fgrap--odoo--incubator-lightgray.png?logo=github - :target: https://github.com/grap/grap-odoo-incubator/tree/8.0_ADD_pos_image_journal/pos_journal_image - :alt: grap/grap-odoo-incubator - -|badge1| |badge2| |badge3| - -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 Paypad part - -.. figure:: https://raw.githubusercontent.com/grap/grap-odoo-incubator/8.0_ADD_pos_image_journal/pos_journal_image/static/description/pos_paypad_image.png - -* There are also available in the payment screen - -.. figure:: https://raw.githubusercontent.com/grap/grap-odoo-incubator/8.0_ADD_pos_image_journal/pos_journal_image/static/description/pos_payment_list_image.png - -**Table of contents** - -.. contents:: - :local: - -Configuration -============= - -To configure this module, you need to: - -* Go to 'Invoicing' / 'Configuration' / 'Journals' / 'Journals' - -* Select journals available in the PoS - -* In the 'Point of Sale' tab, set an image - -.. figure:: https://raw.githubusercontent.com/grap/grap-odoo-incubator/8.0_ADD_pos_image_journal/pos_journal_image/static/description/account_journal_form.png - -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 smashing it by providing a detailed and welcomed -`feedback `_. - -Do not contact contributors directly about support or help with technical issues. - -Credits -======= - -Authors -~~~~~~~ - -* GRAP - -Contributors -~~~~~~~~~~~~ - -* Sylvain LE GAL - -Other credits -~~~~~~~~~~~~~ - -Images for demo data come from flaticon.com - -* Check Image, https://www.flaticon.com/free-icon/checked_259499, by - https://www.flaticon.com/authors/freepik - -* Cash Image, https://www.flaticon.com/free-icon/hand_1235446, by - https://www.flaticon.com/authors/freepik - -Maintainers -~~~~~~~~~~~ - - - -This module is part of the `grap/grap-odoo-incubator `_ project on GitHub. - - -You are welcome to contribute. diff --git a/pos_journal_image/__init__.py b/pos_journal_image/__init__.py index 042e239e..0650744f 100644 --- a/pos_journal_image/__init__.py +++ b/pos_journal_image/__init__.py @@ -1,2 +1 @@ -# coding: utf-8 from . import models diff --git a/pos_journal_image/__openerp__.py b/pos_journal_image/__manifest__.py similarity index 68% rename from pos_journal_image/__openerp__.py rename to pos_journal_image/__manifest__.py index d9949d67..c68b6020 100644 --- a/pos_journal_image/__openerp__.py +++ b/pos_journal_image/__manifest__.py @@ -1,23 +1,20 @@ -# coding: utf-8 # 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). { "name": "Point of Sale - Journal Image", "summary": "Add images on Account Journals available in the PoS", - "version": "8.0.1.0.0", + "version": "12.0.1.0.0", "category": "Point of Sale", - "author": "GRAP", - "website": "http://www.grap.coop", + "author": "GRAP, Odoo Community Association (OCA)", + "website": "https://www.github.com/OCA/pos", "license": "AGPL-3", "depends": ["point_of_sale"], "data": ["views/templates.xml", "views/view_account_journal.xml"], "qweb": ["static/src/xml/pos_journal_image.xml"], - "demo": ["demo/account_journal.xml"], "images": [ "static/description/account_journal_form.png", - "static/description/pos_payment_list_image.png", - "static/description/pos_paypad_image.png", + "static/description/pos_payment.png", ], - "installable": False, + "installable": True, } diff --git a/pos_journal_image/demo/account_journal.xml b/pos_journal_image/demo/account_journal.xml deleted file mode 100644 index 2cdb31f9..00000000 --- a/pos_journal_image/demo/account_journal.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/pos_journal_image/i18n/fr.po b/pos_journal_image/i18n/fr.po index a8f1cdb2..9be0a5f9 100644 --- a/pos_journal_image/i18n/fr.po +++ b/pos_journal_image/i18n/fr.po @@ -1,13 +1,13 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * pos_journal_image +# * pos_journal_image # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-27 11:43+0000\n" -"PO-Revision-Date: 2019-03-27 11:43+0000\n" +"POT-Creation-Date: 2019-11-15 09:52+0000\n" +"PO-Revision-Date: 2019-11-15 09:52+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -21,7 +21,7 @@ msgid "Journal" msgstr "Journal" #. module: pos_journal_image -#: field:account.journal,pos_image:0 +#: model:ir.model.fields,field_description:pos_journal_image.field_account_journal__pos_image msgid "PoS Image" msgstr "Image PdV" diff --git a/pos_journal_image/models/__init__.py b/pos_journal_image/models/__init__.py index 20e390ff..2388e119 100644 --- a/pos_journal_image/models/__init__.py +++ b/pos_journal_image/models/__init__.py @@ -1,2 +1 @@ -# coding: utf-8 from . import account_journal diff --git a/pos_journal_image/models/account_journal.py b/pos_journal_image/models/account_journal.py index 13df7042..b4c0b105 100644 --- a/pos_journal_image/models/account_journal.py +++ b/pos_journal_image/models/account_journal.py @@ -1,12 +1,10 @@ -# coding: utf-8 # 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 openerp import fields, models +from odoo import fields, models class AccountJournal(models.Model): _inherit = "account.journal" - # Columns section - pos_image = fields.Binary(string="PoS Image") + pos_image = fields.Binary(string="PoS Image", attachment=True) diff --git a/pos_journal_image/readme/CONFIGURE.rst b/pos_journal_image/readme/CONFIGURE.rst index f815e026..60158886 100644 --- a/pos_journal_image/readme/CONFIGURE.rst +++ b/pos_journal_image/readme/CONFIGURE.rst @@ -1,6 +1,6 @@ To configure this module, you need to: -* Go to 'Invoicing' / 'Configuration' / 'Journals' / 'Journals' +* Go to 'Point Of Sale' / 'Configuration' / 'Payment Methods' * Select journals available in the PoS diff --git a/pos_journal_image/readme/CREDITS.rst b/pos_journal_image/readme/CREDITS.rst deleted file mode 100644 index 99bbd8ea..00000000 --- a/pos_journal_image/readme/CREDITS.rst +++ /dev/null @@ -1,7 +0,0 @@ -Images for demo data come from flaticon.com - -* Check Image, https://www.flaticon.com/free-icon/checked_259499, by - https://www.flaticon.com/authors/freepik - -* Cash Image, https://www.flaticon.com/free-icon/hand_1235446, by - https://www.flaticon.com/authors/freepik diff --git a/pos_journal_image/readme/DESCRIPTION.rst b/pos_journal_image/readme/DESCRIPTION.rst index f3d0177e..ddabe041 100644 --- a/pos_journal_image/readme/DESCRIPTION.rst +++ b/pos_journal_image/readme/DESCRIPTION.rst @@ -1,10 +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 Paypad part +* The images are available in the payment screen -.. figure:: ../static/description/pos_paypad_image.png - -* There are also available in the payment screen - -.. figure:: ../static/description/pos_payment_list_image.png +.. figure:: ../static/description/pos_payment.png diff --git a/pos_journal_image/static/description/account_journal_form.png b/pos_journal_image/static/description/account_journal_form.png index 4d1c0b57..60d848a1 100644 Binary files a/pos_journal_image/static/description/account_journal_form.png and b/pos_journal_image/static/description/account_journal_form.png differ diff --git a/pos_journal_image/static/description/pos_payment.png b/pos_journal_image/static/description/pos_payment.png new file mode 100644 index 00000000..679cab8f Binary files /dev/null and b/pos_journal_image/static/description/pos_payment.png differ diff --git a/pos_journal_image/static/description/pos_payment_list_image.png b/pos_journal_image/static/description/pos_payment_list_image.png deleted file mode 100644 index 9ea8505c..00000000 Binary files a/pos_journal_image/static/description/pos_payment_list_image.png and /dev/null differ diff --git a/pos_journal_image/static/description/pos_paypad_image.png b/pos_journal_image/static/description/pos_paypad_image.png deleted file mode 100644 index a2e76851..00000000 Binary files a/pos_journal_image/static/description/pos_paypad_image.png and /dev/null differ diff --git a/pos_journal_image/static/img/cash_journal-pos_image.png b/pos_journal_image/static/img/cash_journal-pos_image.png deleted file mode 100644 index a9fd51f9..00000000 Binary files a/pos_journal_image/static/img/cash_journal-pos_image.png and /dev/null differ diff --git a/pos_journal_image/static/img/check_journal-pos_image.png b/pos_journal_image/static/img/check_journal-pos_image.png deleted file mode 100644 index 38c7ec0d..00000000 Binary files a/pos_journal_image/static/img/check_journal-pos_image.png and /dev/null differ diff --git a/pos_journal_image/static/src/css/pos_journal_image.css b/pos_journal_image/static/src/css/pos_journal_image.css index 9981bf8d..4295f4c4 100644 --- a/pos_journal_image/static/src/css/pos_journal_image.css +++ b/pos_journal_image/static/src/css/pos_journal_image.css @@ -1,38 +1,6 @@ - -/*Paypad CSS*/ -.paypad-button { - text-align: left; - font-size: 16px; - line-height: 30px; -} - -.paypad-button .cashregister-img{ - padding-right: 5px; - float: left; -} - -.paypad-button .cashregister-img img{ - max-width: 25px; - max-height: 25px; -} - -/*Payment Screen CSS*/ - -.pos .pos-payment-container{ - width: 500px; -} - -.paymentline .paymentline-name{ - font-size: 25px; - line-height: 40px; -} - -.paymentline .paymentline-img{ - float: left; - padding-right: 10px; -} - -.paymentline .paymentline-img img{ +.paymentmethods img.journal-image{ max-width: 50px; max-height: 50px; + margin-right: 20px; + vertical-align: middle; } diff --git a/pos_journal_image/static/src/js/pos_journal_image.js b/pos_journal_image/static/src/js/pos_journal_image.js index cb5344c3..2e9245f7 100644 --- a/pos_journal_image/static/src/js/pos_journal_image.js +++ b/pos_journal_image/static/src/js/pos_journal_image.js @@ -4,15 +4,15 @@ Copyright (C) 2019-Today GRAP (http://www.grap.coop) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */ -"use strict"; +odoo.define('pos_journal_image.pos_journal_image', function (require) { + "use strict"; -openerp.pos_journal_image = function(instance){ - var module = instance.point_of_sale; + var PosBaseWidget = require('point_of_sale.BaseWidget'); - module.PosBaseWidget.include({ + PosBaseWidget.include({ journal_icon_url: function(id){ return '/web/binary/image?model=account.journal&id=' + id + '&field=pos_image'; }, }); -}; +}); diff --git a/pos_journal_image/static/src/xml/pos_journal_image.xml b/pos_journal_image/static/src/xml/pos_journal_image.xml index a06c3c20..67cb3e95 100644 --- a/pos_journal_image/static/src/xml/pos_journal_image.xml +++ b/pos_journal_image/static/src/xml/pos_journal_image.xml @@ -6,25 +6,12 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> - - - -
- -
-
+ + + - - - - -
- -
-
- - diff --git a/pos_journal_image/views/templates.xml b/pos_journal_image/views/templates.xml index 668fba11..e7daaa51 100644 --- a/pos_journal_image/views/templates.xml +++ b/pos_journal_image/views/templates.xml @@ -4,18 +4,13 @@ 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). --> - + -