diff --git a/pos_partner_vat_required/README.rst b/pos_partner_vat_required/README.rst new file mode 100644 index 0000000000..fa25458f4e --- /dev/null +++ b/pos_partner_vat_required/README.rst @@ -0,0 +1,87 @@ +======================== +Pos Partner Vat Required +======================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:124c3fe75b79ac57514b5d56f5dd845ac80ff6591f5089445005ec7646804f61 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/17.0/pos_partner_vat_required + :alt: OCA/pos +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_partner_vat_required + :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=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +The module put the vat field required on POS partner view. + +**Table of contents** + +.. contents:: + :local: + +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 +------- + +* Antoni Marroig +* APSL-Nagarro + +Contributors +------------ + +- [APSL-Nagarro](https://apsl.tech): + + - Antoni Marroig + +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-peluko00| image:: https://github.com/peluko00.png?size=40px + :target: https://github.com/peluko00 + :alt: peluko00 + +Current `maintainer `__: + +|maintainer-peluko00| + +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_partner_vat_required/__init__.py b/pos_partner_vat_required/__init__.py new file mode 100644 index 0000000000..ef5ae3587f --- /dev/null +++ b/pos_partner_vat_required/__init__.py @@ -0,0 +1 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). diff --git a/pos_partner_vat_required/__manifest__.py b/pos_partner_vat_required/__manifest__.py new file mode 100644 index 0000000000..a68737e56a --- /dev/null +++ b/pos_partner_vat_required/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Antoni Marroig(APSL-Nagarro) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Pos Partner Vat Required", + "summary": "Put partner vat required in pos", + "version": "17.0.1.0.0", + "category": "Point Of Sale", + "website": "https://github.com/OCA/pos", + "author": "Antoni Marroig, APSL-Nagarro, Odoo Community Association (OCA)", + "maintainers": ["peluko00"], + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "point_of_sale", + ], + "assets": { + "point_of_sale._assets_pos": [ + "pos_partner_vat/static/src/app/PartnerDetailsEdit.esm.js", + ], + }, +} diff --git a/pos_partner_vat_required/i18n/ca_ES.po b/pos_partner_vat_required/i18n/ca_ES.po new file mode 100644 index 0000000000..636137ed36 --- /dev/null +++ b/pos_partner_vat_required/i18n/ca_ES.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_partner_vat +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-09-24 14:08+0000\n" +"PO-Revision-Date: 2024-09-24 14:08+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_partner_vat +#. odoo-javascript +#: code:addons/pos_partner_vat/static/src/app/PartnerDetailsEdit.esm.js:0 +#, python-format +msgid "Missing information" +msgstr "InformaciĆ³ que falta" + +#. module: pos_partner_vat +#. odoo-javascript +#: code:addons/pos_partner_vat/static/src/app/PartnerDetailsEdit.esm.js:0 +#, python-format +msgid "Tax ID is required" +msgstr "Es requereix el NIF del client" diff --git a/pos_partner_vat_required/i18n/es.po b/pos_partner_vat_required/i18n/es.po new file mode 100644 index 0000000000..2dbca0c28b --- /dev/null +++ b/pos_partner_vat_required/i18n/es.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_partner_vat +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-09-24 14:08+0000\n" +"PO-Revision-Date: 2024-09-24 14:08+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_partner_vat +#. odoo-javascript +#: code:addons/pos_partner_vat/static/src/app/PartnerDetailsEdit.esm.js:0 +#, python-format +msgid "Missing information" +msgstr "InformaciĆ³n que falta" + +#. module: pos_partner_vat +#. odoo-javascript +#: code:addons/pos_partner_vat/static/src/app/PartnerDetailsEdit.esm.js:0 +#, python-format +msgid "Tax ID is required" +msgstr "Se requiere el NIF del cliente" diff --git a/pos_partner_vat_required/pyproject.toml b/pos_partner_vat_required/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/pos_partner_vat_required/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/pos_partner_vat_required/readme/CONTRIBUTORS.md b/pos_partner_vat_required/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..7b441966f5 --- /dev/null +++ b/pos_partner_vat_required/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- \[APSL-Nagarro\](): + - Antoni Marroig \<\> + \ No newline at end of file diff --git a/pos_partner_vat_required/readme/DESCRIPTION.md b/pos_partner_vat_required/readme/DESCRIPTION.md new file mode 100644 index 0000000000..3a491f725b --- /dev/null +++ b/pos_partner_vat_required/readme/DESCRIPTION.md @@ -0,0 +1 @@ +The module put the vat field required on POS partner view. \ No newline at end of file diff --git a/pos_partner_vat_required/static/description/icon.png b/pos_partner_vat_required/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/pos_partner_vat_required/static/description/icon.png differ diff --git a/pos_partner_vat_required/static/description/icon.svg b/pos_partner_vat_required/static/description/icon.svg new file mode 100644 index 0000000000..a7a26d0932 --- /dev/null +++ b/pos_partner_vat_required/static/description/icon.svg @@ -0,0 +1,79 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/pos_partner_vat_required/static/description/index.html b/pos_partner_vat_required/static/description/index.html new file mode 100644 index 0000000000..f92d18ab8d --- /dev/null +++ b/pos_partner_vat_required/static/description/index.html @@ -0,0 +1,124 @@ +
+
+
+

Module name

+

This module was written to extend the functionality of ... to support ... and allow you to ...

+
+
+
+ +
+
+
+

Installation

+
+
+

To install this module, you need to: +

    +
  • ...
  • +
+

+
+
+
+ + + +
+
+
+
+ +
+
+
+

Configuration

+
+
+

To configure this module, you need to: +

    +
  • ...
  • +
+

+
+
+
+ + + +
+
+
+
+ +
+
+
+

Usage

+
+
+

To use this module, you need to: +

    +
  • ...
  • +
+

+

For further information, please visit: +

+

+
+
+
+ + + +
+
+
+
+ +
+
+
+

Known issues / Roadmap

+
+
+

+

    +
  • ...
  • +
+

+
+
+
+ + + +
+
+
+
+ +
+
+
+

Credits

+
+
+

Contributors

+ +
+
+

Maintainer

+

+ This module is maintained by the OCA.
+ 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.
+ To contribute to this module, please visit http://odoo-community.org.
+ +

+
+
+
diff --git a/pos_partner_vat_required/static/src/app/PartnerDetailsEdit.esm.js b/pos_partner_vat_required/static/src/app/PartnerDetailsEdit.esm.js new file mode 100644 index 0000000000..8d524a566a --- /dev/null +++ b/pos_partner_vat_required/static/src/app/PartnerDetailsEdit.esm.js @@ -0,0 +1,23 @@ +/** @odoo-module **/ +import {ErrorPopup} from "@point_of_sale/app/errors/popups/error_popup"; +import {PartnerDetailsEdit} from "@point_of_sale/app/screens/partner_list/partner_editor/partner_editor"; +import {_t} from "@web/core/l10n/translation"; +import {patch} from "@web/core/utils/patch"; +import {useService} from "@web/core/utils/hooks"; + +patch(PartnerDetailsEdit.prototype, { + setup() { + super.setup(...arguments); + this.popup = useService("popup"); + this.changes.vat = this.props.partner.vat; + }, + saveChanges() { + if (!this.changes.vat) { + return this.popup.add(ErrorPopup, { + title: _t("Missing information"), + body: _t("Tax ID is required"), + }); + } + super.saveChanges(); + }, +});