diff --git a/pos_journal_image/README.rst b/pos_journal_image/README.rst new file mode 100644 index 00000000..418ff6ce --- /dev/null +++ b/pos_journal_image/README.rst @@ -0,0 +1,93 @@ +============================= +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 new file mode 100644 index 00000000..042e239e --- /dev/null +++ b/pos_journal_image/__init__.py @@ -0,0 +1,2 @@ +# coding: utf-8 +from . import models diff --git a/pos_journal_image/__openerp__.py b/pos_journal_image/__openerp__.py new file mode 100644 index 00000000..ff329353 --- /dev/null +++ b/pos_journal_image/__openerp__.py @@ -0,0 +1,32 @@ +# 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', + 'category': 'Point of Sale', + 'author': 'GRAP', + 'website': 'http://www.grap.coop', + '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', + ], + 'installable': False, +} diff --git a/pos_journal_image/demo/account_journal.xml b/pos_journal_image/demo/account_journal.xml new file mode 100644 index 00000000..2cdb31f9 --- /dev/null +++ b/pos_journal_image/demo/account_journal.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/pos_journal_image/i18n/fr.po b/pos_journal_image/i18n/fr.po new file mode 100644 index 00000000..a8f1cdb2 --- /dev/null +++ b/pos_journal_image/i18n/fr.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_journal_image +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.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" +"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_journal_image +#: model:ir.model,name:pos_journal_image.model_account_journal +msgid "Journal" +msgstr "Journal" + +#. module: pos_journal_image +#: field:account.journal,pos_image:0 +msgid "PoS Image" +msgstr "Image PdV" + diff --git a/pos_journal_image/models/__init__.py b/pos_journal_image/models/__init__.py new file mode 100644 index 00000000..20e390ff --- /dev/null +++ b/pos_journal_image/models/__init__.py @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000..89e8407f --- /dev/null +++ b/pos_journal_image/models/account_journal.py @@ -0,0 +1,12 @@ +# 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 + + +class AccountJournal(models.Model): + _inherit = 'account.journal' + + # Columns section + pos_image = fields.Binary(string='PoS Image') diff --git a/pos_journal_image/readme/CONFIGURE.rst b/pos_journal_image/readme/CONFIGURE.rst new file mode 100644 index 00000000..f815e026 --- /dev/null +++ b/pos_journal_image/readme/CONFIGURE.rst @@ -0,0 +1,9 @@ +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:: ../static/description/account_journal_form.png diff --git a/pos_journal_image/readme/CONTRIBUTORS.rst b/pos_journal_image/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..9f76a75b --- /dev/null +++ b/pos_journal_image/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Sylvain LE GAL diff --git a/pos_journal_image/readme/CREDITS.rst b/pos_journal_image/readme/CREDITS.rst new file mode 100644 index 00000000..99bbd8ea --- /dev/null +++ b/pos_journal_image/readme/CREDITS.rst @@ -0,0 +1,7 @@ +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 new file mode 100644 index 00000000..f3d0177e --- /dev/null +++ b/pos_journal_image/readme/DESCRIPTION.rst @@ -0,0 +1,10 @@ +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:: ../static/description/pos_paypad_image.png + +* There are also available in the payment screen + +.. figure:: ../static/description/pos_payment_list_image.png diff --git a/pos_journal_image/static/description/account_journal_form.png b/pos_journal_image/static/description/account_journal_form.png new file mode 100644 index 00000000..4d1c0b57 Binary files /dev/null and b/pos_journal_image/static/description/account_journal_form.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 new file mode 100644 index 00000000..9ea8505c Binary files /dev/null and b/pos_journal_image/static/description/pos_payment_list_image.png differ diff --git a/pos_journal_image/static/description/pos_paypad_image.png b/pos_journal_image/static/description/pos_paypad_image.png new file mode 100644 index 00000000..a2e76851 Binary files /dev/null and b/pos_journal_image/static/description/pos_paypad_image.png 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 new file mode 100644 index 00000000..a9fd51f9 Binary files /dev/null and b/pos_journal_image/static/img/cash_journal-pos_image.png 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 new file mode 100644 index 00000000..38c7ec0d Binary files /dev/null and b/pos_journal_image/static/img/check_journal-pos_image.png 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 new file mode 100644 index 00000000..9981bf8d --- /dev/null +++ b/pos_journal_image/static/src/css/pos_journal_image.css @@ -0,0 +1,38 @@ + +/*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{ + max-width: 50px; + max-height: 50px; +} diff --git a/pos_journal_image/static/src/js/pos_journal_image.js b/pos_journal_image/static/src/js/pos_journal_image.js new file mode 100644 index 00000000..cb5344c3 --- /dev/null +++ b/pos_journal_image/static/src/js/pos_journal_image.js @@ -0,0 +1,18 @@ +/* +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). +*/ + +"use strict"; + +openerp.pos_journal_image = function(instance){ + var module = instance.point_of_sale; + + module.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 new file mode 100644 index 00000000..a06c3c20 --- /dev/null +++ b/pos_journal_image/static/src/xml/pos_journal_image.xml @@ -0,0 +1,30 @@ + + + + + + + +
+ +
+
+
+
+ + + +
+ + +
+
+
+ +
+ + diff --git a/pos_journal_image/views/templates.xml b/pos_journal_image/views/templates.xml new file mode 100644 index 00000000..668fba11 --- /dev/null +++ b/pos_journal_image/views/templates.xml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/pos_journal_image/views/view_account_journal.xml b/pos_journal_image/views/view_account_journal.xml new file mode 100644 index 00000000..ebeb478a --- /dev/null +++ b/pos_journal_image/views/view_account_journal.xml @@ -0,0 +1,19 @@ + + + + + + account.journal + + + + + + + + +