diff --git a/pos_customer_comment/README.rst b/pos_customer_comment/README.rst new file mode 100644 index 0000000000..d080e2ba5f --- /dev/null +++ b/pos_customer_comment/README.rst @@ -0,0 +1,118 @@ +=============================== +Point of Sale - Cashier Comment +=============================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:4fdce9773e5d7b56fcdad47f1d9d5e8beb3fd5dc302b49c4540dbc3292eba623 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-OCA%2Fpos-lightgray.png?logo=github + :target: https://github.com/OCA/pos/tree/16.0/pos_customer_comment + :alt: OCA/pos +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_customer_comment + :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/pos&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of point of sale module, to allow display and edit +customer note field in the point of sale UI for the cashier. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +* Go to your partner view and write or edit new PoS comments + +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_customer_comment/static/description/res_partner_form.png + +* Then Open your Point of sale + +in the customer tree view, a new icon is available to mention that the customer +has a PoS Comment to read: + +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_customer_comment/static/description/pos_customer_tree.png + +It is possible to see or edit the comment in the customer form view: + +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_customer_comment/static/description/pos_customer_form.png + +Known issues / Roadmap +====================== + +For the time being, there is no HTML widget available in the point of sale. +For that reason, the Cashier comment (``pos_comment``) is a simple Text field. +If a widget is available in odoo, it could be great to switch to a HTML field text. + +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 to smash 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 (https://twitter.com/legalsylvain) +* Juan Carlos Bonilla + +Other credits +~~~~~~~~~~~~~ + +The development of this module has been financially supported by: + +* UGESS, Union Nationale des Groupements des épiceries Sociales et Solidaires (https://ugess.org/) + +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-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px + :target: https://github.com/legalsylvain + :alt: legalsylvain + +Current `maintainer `__: + +|maintainer-legalsylvain| + +This module is part of the `OCA/pos `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/pos_customer_comment/__init__.py b/pos_customer_comment/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/pos_customer_comment/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/pos_customer_comment/__manifest__.py b/pos_customer_comment/__manifest__.py new file mode 100644 index 0000000000..9b440ce2ba --- /dev/null +++ b/pos_customer_comment/__manifest__.py @@ -0,0 +1,34 @@ +# Copyright (C) 2022-Today GRAP (http://www.grap.coop) +# @author Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + "name": "Point of Sale - Cashier Comment", + "summary": "Display Customer comment in the PoS front office and allow" + " to edit and save it by the cashier", + "version": "18.0.1.0.0", + "category": "Point of Sale", + "maintainers": ["legalsylvain"], + "author": "GRAP,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": ["point_of_sale"], + "data": [ + "views/view_res_partner.xml", + ], + "assets": { + "point_of_sale.assets": [ + "pos_customer_comment/static/src/css/pos_customer_comment.scss", + "pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml", + "pos_customer_comment/static/src/xml/PartnerLine.xml", + "pos_customer_comment/static/src/js/PartnerDetailsEdit.esm.js", + ], + "web.assets_tests": [ + "pos_customer_comment/static/tests/tours/PosCustomerComment.tour.esm.js", + ], + }, + "demo": [ + "demo/res_partner.xml", + ], + "installable": True, +} diff --git a/pos_customer_comment/demo/res_partner.xml b/pos_customer_comment/demo/res_partner.xml new file mode 100644 index 0000000000..889d589ccb --- /dev/null +++ b/pos_customer_comment/demo/res_partner.xml @@ -0,0 +1,13 @@ + + + + + Important information to display in Point of Sale + + diff --git a/pos_customer_comment/i18n/es.po b/pos_customer_comment/i18n/es.po new file mode 100644 index 0000000000..764f18bf46 --- /dev/null +++ b/pos_customer_comment/i18n/es.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_customer_comment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-03-02 16:30+0000\n" +"Last-Translator: Patricia Lorenzo Bartolomé \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: pos_customer_comment +#: model:ir.model.fields,field_description:pos_customer_comment.field_res_partner__pos_comment +#: model:ir.model.fields,field_description:pos_customer_comment.field_res_users__pos_comment +#: model_terms:ir.ui.view,arch_db:pos_customer_comment.view_res_partner_form +msgid "Cashier Comment" +msgstr "Comentario del cajero" + +#. module: pos_customer_comment +#. odoo-javascript +#: code:addons/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml:0 +#, python-format +msgid "Comment" +msgstr "Comentario" + +#. module: pos_customer_comment +#: model:ir.model.fields,help:pos_customer_comment.field_res_partner__pos_comment +#: model:ir.model.fields,help:pos_customer_comment.field_res_users__pos_comment +msgid "" +"Comment that will be visible and editable in the Point of Sale for the " +"cashiers" +msgstr "" +"Comentario que será visible y editable en el punto de venta para los cajeros" + +#. module: pos_customer_comment +#: model_terms:ir.ui.view,arch_db:pos_customer_comment.view_res_partner_form +msgid "" +"Comment that will be visible and editable in the Point of Sale for the " +"cashiers" +msgstr "" +"Comentario que será visible y editable en el punto de venta para los cajeros" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_res_partner +msgid "Contact" +msgstr "Contacto" + +#. module: pos_customer_comment +#. odoo-javascript +#: code:addons/pos_customer_comment/static/src/xml/PartnerLine.xml:0 +#, python-format +msgid "Has PoS Comment" +msgstr "Tiene comentarios en el punto de venta" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_pos_session +msgid "Point of Sale Session" +msgstr "Sesión TPV" diff --git a/pos_customer_comment/i18n/fr.po b/pos_customer_comment/i18n/fr.po new file mode 100644 index 0000000000..c9bc82727e --- /dev/null +++ b/pos_customer_comment/i18n/fr.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_customer_comment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-11-10 12:38+0000\n" +"Last-Translator: LESTRAT21 \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: pos_customer_comment +#: model:ir.model.fields,field_description:pos_customer_comment.field_res_partner__pos_comment +#: model:ir.model.fields,field_description:pos_customer_comment.field_res_users__pos_comment +#: model_terms:ir.ui.view,arch_db:pos_customer_comment.view_res_partner_form +msgid "Cashier Comment" +msgstr "Commentaire visible en caisse" + +#. module: pos_customer_comment +#. odoo-javascript +#: code:addons/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml:0 +#: code:addons/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml:0 +#, python-format +msgid "Comment" +msgstr "Commentaire" + +#. module: pos_customer_comment +#: model:ir.model.fields,help:pos_customer_comment.field_res_partner__pos_comment +#: model:ir.model.fields,help:pos_customer_comment.field_res_users__pos_comment +msgid "" +"Comment that will be visible and editable in the Point of Sale for the " +"cashiers" +msgstr "Commentaire visible et modifiable par la personne en caisse" + +#. module: pos_customer_comment +#: model_terms:ir.ui.view,arch_db:pos_customer_comment.view_res_partner_form +msgid "" +"Comment that will be visible and editable in the Point of Sale for the " +"cashiers" +msgstr "Commentaire visible et modifiable par la personne en caisse" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_res_partner +msgid "Contact" +msgstr "Contact" + +#. module: pos_customer_comment +#. odoo-javascript +#: code:addons/pos_customer_comment/static/src/xml/PartnerLine.xml:0 +#: code:addons/pos_customer_comment/static/src/xml/PartnerLine.xml:0 +#, python-format +msgid "Has PoS Comment" +msgstr "Il existe un commentaire pour ce client" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_pos_session +msgid "Point of Sale Session" +msgstr "Session de caisse" diff --git a/pos_customer_comment/i18n/it.po b/pos_customer_comment/i18n/it.po new file mode 100644 index 0000000000..13e7b91534 --- /dev/null +++ b/pos_customer_comment/i18n/it.po @@ -0,0 +1,67 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_customer_comment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-03-09 13:22+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: pos_customer_comment +#: model:ir.model.fields,field_description:pos_customer_comment.field_res_partner__pos_comment +#: model:ir.model.fields,field_description:pos_customer_comment.field_res_users__pos_comment +#: model_terms:ir.ui.view,arch_db:pos_customer_comment.view_res_partner_form +msgid "Cashier Comment" +msgstr "Commento cassiere" + +#. module: pos_customer_comment +#. odoo-javascript +#: code:addons/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml:0 +#, python-format +msgid "Comment" +msgstr "Commento" + +#. module: pos_customer_comment +#: model:ir.model.fields,help:pos_customer_comment.field_res_partner__pos_comment +#: model:ir.model.fields,help:pos_customer_comment.field_res_users__pos_comment +msgid "" +"Comment that will be visible and editable in the Point of Sale for the " +"cashiers" +msgstr "" +"Commento per il cassiere che può essere visibile e mdificabile nel punto " +"vendita" + +#. module: pos_customer_comment +#: model_terms:ir.ui.view,arch_db:pos_customer_comment.view_res_partner_form +msgid "" +"Comment that will be visible and editable in the Point of Sale for the " +"cashiers" +msgstr "" +"Commento per il cassiere che può essere visibile e mdificabile nel punto " +"vendita" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_res_partner +msgid "Contact" +msgstr "Contatto" + +#. module: pos_customer_comment +#. odoo-javascript +#: code:addons/pos_customer_comment/static/src/xml/PartnerLine.xml:0 +#, python-format +msgid "Has PoS Comment" +msgstr "Ha commento PoS" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_pos_session +msgid "Point of Sale Session" +msgstr "Sessione punto vendita" diff --git a/pos_customer_comment/i18n/pos_customer_comment.pot b/pos_customer_comment/i18n/pos_customer_comment.pot new file mode 100644 index 0000000000..2f9341ac88 --- /dev/null +++ b/pos_customer_comment/i18n/pos_customer_comment.pot @@ -0,0 +1,62 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_customer_comment +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \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_customer_comment +#: model:ir.model.fields,field_description:pos_customer_comment.field_res_partner__pos_comment +#: model:ir.model.fields,field_description:pos_customer_comment.field_res_users__pos_comment +#: model_terms:ir.ui.view,arch_db:pos_customer_comment.view_res_partner_form +msgid "Cashier Comment" +msgstr "" + +#. module: pos_customer_comment +#. odoo-javascript +#: code:addons/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml:0 +#: code:addons/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml:0 +#, python-format +msgid "Comment" +msgstr "" + +#. module: pos_customer_comment +#: model:ir.model.fields,help:pos_customer_comment.field_res_partner__pos_comment +#: model:ir.model.fields,help:pos_customer_comment.field_res_users__pos_comment +msgid "" +"Comment that will be visible and editable in the Point of Sale for the " +"cashiers" +msgstr "" + +#. module: pos_customer_comment +#: model_terms:ir.ui.view,arch_db:pos_customer_comment.view_res_partner_form +msgid "" +"Comment that will be visible and editable in the Point of Sale for the " +"cashiers" +msgstr "" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_res_partner +msgid "Contact" +msgstr "" + +#. module: pos_customer_comment +#. odoo-javascript +#: code:addons/pos_customer_comment/static/src/xml/PartnerLine.xml:0 +#: code:addons/pos_customer_comment/static/src/xml/PartnerLine.xml:0 +#, python-format +msgid "Has PoS Comment" +msgstr "" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_pos_session +msgid "Point of Sale Session" +msgstr "" diff --git a/pos_customer_comment/models/__init__.py b/pos_customer_comment/models/__init__.py new file mode 100644 index 0000000000..3d937eb7aa --- /dev/null +++ b/pos_customer_comment/models/__init__.py @@ -0,0 +1,2 @@ +from . import pos_session +from . import res_partner diff --git a/pos_customer_comment/models/pos_session.py b/pos_customer_comment/models/pos_session.py new file mode 100644 index 0000000000..c28bfc2677 --- /dev/null +++ b/pos_customer_comment/models/pos_session.py @@ -0,0 +1,14 @@ +# Copyright (C) 2022-Today GRAP (http://www.grap.coop) +# @author Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo import models + + +class PosSession(models.Model): + _inherit = "pos.session" + + def _loader_params_res_partner(self): + res = super()._loader_params_res_partner() + res["search_params"]["fields"].append("pos_comment") + return res diff --git a/pos_customer_comment/models/res_partner.py b/pos_customer_comment/models/res_partner.py new file mode 100644 index 0000000000..302488955a --- /dev/null +++ b/pos_customer_comment/models/res_partner.py @@ -0,0 +1,15 @@ +# Copyright (C) 2022-Today GRAP (http://www.grap.coop) +# @author Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + pos_comment = fields.Text( + string="Cashier Comment", + help="Comment that will be visible and editable in the" + " Point of Sale for the cashiers", + ) diff --git a/pos_customer_comment/pyproject.toml b/pos_customer_comment/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/pos_customer_comment/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/pos_customer_comment/readme/CONTRIBUTORS.rst b/pos_customer_comment/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..2618270913 --- /dev/null +++ b/pos_customer_comment/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Sylvain LE GAL (https://twitter.com/legalsylvain) +* Juan Carlos Bonilla diff --git a/pos_customer_comment/readme/CREDITS.rst b/pos_customer_comment/readme/CREDITS.rst new file mode 100644 index 0000000000..4c3758b92a --- /dev/null +++ b/pos_customer_comment/readme/CREDITS.rst @@ -0,0 +1,3 @@ +The development of this module has been financially supported by: + +* UGESS, Union Nationale des Groupements des épiceries Sociales et Solidaires (https://ugess.org/) diff --git a/pos_customer_comment/readme/DESCRIPTION.rst b/pos_customer_comment/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..dbc5391f3b --- /dev/null +++ b/pos_customer_comment/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the functionality of point of sale module, to allow display and edit +customer note field in the point of sale UI for the cashier. diff --git a/pos_customer_comment/readme/ROADMAP.rst b/pos_customer_comment/readme/ROADMAP.rst new file mode 100644 index 0000000000..6b490fda97 --- /dev/null +++ b/pos_customer_comment/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +For the time being, there is no HTML widget available in the point of sale. +For that reason, the Cashier comment (``pos_comment``) is a simple Text field. +If a widget is available in odoo, it could be great to switch to a HTML field text. diff --git a/pos_customer_comment/readme/USAGE.rst b/pos_customer_comment/readme/USAGE.rst new file mode 100644 index 0000000000..9c79997677 --- /dev/null +++ b/pos_customer_comment/readme/USAGE.rst @@ -0,0 +1,14 @@ +* Go to your partner view and write or edit new PoS comments + +.. figure:: ../static/description/res_partner_form.png + +* Then Open your Point of sale + +in the customer tree view, a new icon is available to mention that the customer +has a PoS Comment to read: + +.. figure:: ../static/description/pos_customer_tree.png + +It is possible to see or edit the comment in the customer form view: + +.. figure:: ../static/description/pos_customer_form.png diff --git a/pos_customer_comment/static/description/icon.png b/pos_customer_comment/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/pos_customer_comment/static/description/icon.png differ diff --git a/pos_customer_comment/static/description/index.html b/pos_customer_comment/static/description/index.html new file mode 100644 index 0000000000..57e7b7670d --- /dev/null +++ b/pos_customer_comment/static/description/index.html @@ -0,0 +1,464 @@ + + + + + +Point of Sale - Cashier Comment + + + +
+

Point of Sale - Cashier Comment

+ + +

Beta License: AGPL-3 OCA/pos Translate me on Weblate Try me on Runboat

+

This module extends the functionality of point of sale module, to allow display and edit +customer note field in the point of sale UI for the cashier.

+

Table of contents

+ +
+

Usage

+
    +
  • Go to your partner view and write or edit new PoS comments
  • +
+
+https://raw.githubusercontent.com/OCA/pos/16.0/pos_customer_comment/static/description/res_partner_form.png +
+
    +
  • Then Open your Point of sale
  • +
+

in the customer tree view, a new icon is available to mention that the customer +has a PoS Comment to read:

+
+https://raw.githubusercontent.com/OCA/pos/16.0/pos_customer_comment/static/description/pos_customer_tree.png +
+

It is possible to see or edit the comment in the customer form view:

+
+https://raw.githubusercontent.com/OCA/pos/16.0/pos_customer_comment/static/description/pos_customer_form.png +
+
+
+

Known issues / Roadmap

+

For the time being, there is no HTML widget available in the point of sale. +For that reason, the Cashier comment (pos_comment) is a simple Text field. +If a widget is available in odoo, it could be great to switch to a HTML field text.

+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • GRAP
  • +
+
+ +
+

Other credits

+

The development of this module has been financially supported by:

+
    +
  • UGESS, Union Nationale des Groupements des épiceries Sociales et Solidaires (https://ugess.org/)
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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.

+

Current maintainer:

+

legalsylvain

+

This module is part of the OCA/pos project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/pos_customer_comment/static/description/pos_customer_form.png b/pos_customer_comment/static/description/pos_customer_form.png new file mode 100644 index 0000000000..525d87e972 Binary files /dev/null and b/pos_customer_comment/static/description/pos_customer_form.png differ diff --git a/pos_customer_comment/static/description/pos_customer_tree.png b/pos_customer_comment/static/description/pos_customer_tree.png new file mode 100644 index 0000000000..758786546e Binary files /dev/null and b/pos_customer_comment/static/description/pos_customer_tree.png differ diff --git a/pos_customer_comment/static/description/res_partner_form.png b/pos_customer_comment/static/description/res_partner_form.png new file mode 100644 index 0000000000..435c08c0ac Binary files /dev/null and b/pos_customer_comment/static/description/res_partner_form.png differ diff --git a/pos_customer_comment/static/src/css/pos_customer_comment.scss b/pos_customer_comment/static/src/css/pos_customer_comment.scss new file mode 100644 index 0000000000..80be511e37 --- /dev/null +++ b/pos_customer_comment/static/src/css/pos_customer_comment.scss @@ -0,0 +1,22 @@ +/* + Copyright (C) 2022-Today GRAP (http://www.grap.coop) + @author Sylvain LE GAL (https://twitter.com/legalsylvain) + License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +*/ + +.pos .partnerlist-screen .partner-details textarea { + padding: 4px; + border-radius: 3px; + border: solid 1px #cecbcb; + margin-bottom: 4px; + background: white; + font-family: "Lato", "Lucida Grande", Helvetica, Verdana, Arial; + color: #555555; + width: 340px; + font-size: 14px; + box-sizing: border-box; +} + +.pos .partnerlist-screen .partner-details span.label { + vertical-align: top; +} diff --git a/pos_customer_comment/static/src/js/PartnerDetailsEdit.esm.js b/pos_customer_comment/static/src/js/PartnerDetailsEdit.esm.js new file mode 100644 index 0000000000..daaec00e10 --- /dev/null +++ b/pos_customer_comment/static/src/js/PartnerDetailsEdit.esm.js @@ -0,0 +1,16 @@ +/** @odoo-module **/ +import PartnerDetailsEdit from "point_of_sale.PartnerDetailsEdit"; +import Registries from "point_of_sale.Registries"; + +const PartnerDetailsEditComment = (OriginalPartnerDetailsEdit) => + class extends OriginalPartnerDetailsEdit { + setup() { + super.setup(); + this.changes = { + ...this.changes, + pos_comment: this.props.partner.pos_comment || "", + }; + } + }; + +Registries.Component.extend(PartnerDetailsEdit, PartnerDetailsEditComment); diff --git a/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml b/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml new file mode 100644 index 0000000000..9dbfd898eb --- /dev/null +++ b/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml @@ -0,0 +1,30 @@ + + + + + + +
+ Comment +