diff --git a/odoo-bringout-oca-pos-pos_access_right/README.md b/odoo-bringout-oca-pos-pos_access_right/README.md new file mode 100644 index 0000000..8f78b36 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/README.md @@ -0,0 +1,46 @@ +# Point of Sale - Extra Access Right + +Odoo addon: pos_access_right + +## Installation + +```bash +pip install odoo-bringout-oca-pos-pos_access_right +``` + +## Dependencies + +This addon depends on: +- point_of_sale + +## Manifest Information + +- **Name**: Point of Sale - Extra Access Right +- **Version**: 16.0.1.0.2 +- **Category**: Point Of Sale +- **License**: AGPL-3 +- **Installable**: True + +## Source + +Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_access_right`. + +## License + +This package maintains the original AGPL-3 license from the upstream Odoo project. + +## Documentation + +- Overview: doc/OVERVIEW.md +- Architecture: doc/ARCHITECTURE.md +- Models: doc/MODELS.md +- Controllers: doc/CONTROLLERS.md +- Wizards: doc/WIZARDS.md +- Reports: doc/REPORTS.md +- Security: doc/SECURITY.md +- Install: doc/INSTALL.md +- Usage: doc/USAGE.md +- Configuration: doc/CONFIGURATION.md +- Dependencies: doc/DEPENDENCIES.md +- Troubleshooting: doc/TROUBLESHOOTING.md +- FAQ: doc/FAQ.md diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/ARCHITECTURE.md b/odoo-bringout-oca-pos-pos_access_right/doc/ARCHITECTURE.md new file mode 100644 index 0000000..ede8d5a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/ARCHITECTURE.md @@ -0,0 +1,32 @@ +# Architecture + +```mermaid +flowchart TD + U[Users] -->|HTTP| V[Views and QWeb Templates] + V --> C[Controllers] + V --> W[Wizards – Transient Models] + C --> M[Models and ORM] + W --> M + M --> R[Reports] + DX[Data XML] --> M + S[Security – ACLs and Groups] -. enforces .-> M + + subgraph Pos_access_right Module - pos_access_right + direction LR + M:::layer + W:::layer + C:::layer + V:::layer + R:::layer + S:::layer + DX:::layer + end + + classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px +``` + +Notes +- Views include tree/form/kanban templates and report templates. +- Controllers provide website/portal routes when present. +- Wizards are UI flows implemented with `models.TransientModel`. +- Data XML loads data/demo records; Security defines groups and access. diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/CONFIGURATION.md b/odoo-bringout-oca-pos-pos_access_right/doc/CONFIGURATION.md new file mode 100644 index 0000000..f00c8df --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/CONFIGURATION.md @@ -0,0 +1,3 @@ +# Configuration + +Refer to Odoo settings for pos_access_right. Configure related models, access rights, and options as needed. diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/CONTROLLERS.md b/odoo-bringout-oca-pos-pos_access_right/doc/CONTROLLERS.md new file mode 100644 index 0000000..f628e77 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/CONTROLLERS.md @@ -0,0 +1,3 @@ +# Controllers + +This module does not define custom HTTP controllers. diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/DEPENDENCIES.md b/odoo-bringout-oca-pos-pos_access_right/doc/DEPENDENCIES.md new file mode 100644 index 0000000..9dfe640 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/DEPENDENCIES.md @@ -0,0 +1,5 @@ +# Dependencies + +This addon depends on: + +- [point_of_sale](https://github.com/bringout/oca-ocb-sale/tree/681dc8d5fff638cb0862a34e48091a2098d091f8/odoo-bringout-oca-ocb-point_of_sale) diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/FAQ.md b/odoo-bringout-oca-pos-pos_access_right/doc/FAQ.md new file mode 100644 index 0000000..f63fb26 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/FAQ.md @@ -0,0 +1,4 @@ +# FAQ + +- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged). +- Q: How to enable? A: Start server with --addon pos_access_right or install in UI. diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/INSTALL.md b/odoo-bringout-oca-pos-pos_access_right/doc/INSTALL.md new file mode 100644 index 0000000..315b0c2 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/INSTALL.md @@ -0,0 +1,7 @@ +# Install + +```bash +pip install odoo-bringout-oca-pos-pos_access_right" +# or +uv pip install odoo-bringout-oca-pos-pos_access_right" +``` diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/MODELS.md b/odoo-bringout-oca-pos-pos_access_right/doc/MODELS.md new file mode 100644 index 0000000..3faa0fd --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/MODELS.md @@ -0,0 +1,13 @@ +# Models + +Detected core models and extensions in pos_access_right. + +```mermaid +classDiagram + class pos_config + class pos_session +``` + +Notes +- Classes show model technical names; fields omitted for brevity. +- Items listed under _inherit are extensions of existing models. diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/OVERVIEW.md b/odoo-bringout-oca-pos-pos_access_right/doc/OVERVIEW.md new file mode 100644 index 0000000..7d7a8c4 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/OVERVIEW.md @@ -0,0 +1,6 @@ +# Overview + +Packaged Odoo addon: pos_access_right. Provides features documented in upstream Odoo 16 under this addon. + +- Source: OCA/OCB 16.0, addon pos_access_right +- License: LGPL-3 diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/REPORTS.md b/odoo-bringout-oca-pos-pos_access_right/doc/REPORTS.md new file mode 100644 index 0000000..e0ea35f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/REPORTS.md @@ -0,0 +1,3 @@ +# Reports + +This module does not define custom reports. diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/SECURITY.md b/odoo-bringout-oca-pos-pos_access_right/doc/SECURITY.md new file mode 100644 index 0000000..67ec73f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/SECURITY.md @@ -0,0 +1,64 @@ +# Security + +Access control and security definitions in pos_access_right. + +## Access Control Lists (ACLs) + +Model access permissions defined in: +- **[bosnian_translations.json](../bosnian_translations.json)** + - 50 model access rules +- **[bosnian_translations_output.json](../bosnian_translations_output.json)** + - 444 model access rules +- **[CHANGELOG.md](../CHANGELOG.md)** + - 132 model access rules +- **[doc](../doc)** +- **[docker](../docker)** +- **[input](../input)** +- **[nix](../nix)** +- **[odoo.conf](../odoo.conf)** + - 58 model access rules +- **[odoo_packages_bez_l10n.txt](../odoo_packages_bez_l10n.txt)** + - 1947 model access rules +- **[odoo_packages_bringout.txt](../odoo_packages_bringout.txt)** + - 1947 model access rules +- **[odoo_packages.txt](../odoo_packages.txt)** + - 2085 model access rules +- **[output](../output)** +- **[packages](../packages)** +- **[README.md](../README.md)** + - 338 model access rules +- **[scripts](../scripts)** +- **[temp](../temp)** +- **[TRANSLATION_BS_SUMMARY.md](../TRANSLATION_BS_SUMMARY.md)** + - 146 model access rules + +## Record Rules + +Row-level security rules defined in: + +## Security Groups & Configuration + +Security groups and permissions defined in: +- **[res_groups.xml](../pos_access_right/security/res_groups.xml)** + - 6 security groups defined + +```mermaid +graph TB + subgraph "Security Layers" + A[Users] --> B[Groups] + B --> C[Access Control Lists] + C --> D[Models] + B --> E[Record Rules] + E --> F[Individual Records] + end +``` + +Security files overview: +- **[res_groups.xml](../pos_access_right/security/res_groups.xml)** + - Security groups, categories, and XML-based rules + +Notes +- Access Control Lists define which groups can access which models +- Record Rules provide row-level security (filter records by user/group) +- Security groups organize users and define permission sets +- All security is enforced at the ORM level by Odoo diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/TROUBLESHOOTING.md b/odoo-bringout-oca-pos-pos_access_right/doc/TROUBLESHOOTING.md new file mode 100644 index 0000000..56853cb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/TROUBLESHOOTING.md @@ -0,0 +1,5 @@ +# Troubleshooting + +- Ensure Python and Odoo environment matches repo guidance. +- Check database connectivity and logs if startup fails. +- Validate that dependent addons listed in DEPENDENCIES.md are installed. diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/USAGE.md b/odoo-bringout-oca-pos-pos_access_right/doc/USAGE.md new file mode 100644 index 0000000..bf0277d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/USAGE.md @@ -0,0 +1,7 @@ +# Usage + +Start Odoo including this addon (from repo root): + +```bash +python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_access_right +``` diff --git a/odoo-bringout-oca-pos-pos_access_right/doc/WIZARDS.md b/odoo-bringout-oca-pos-pos_access_right/doc/WIZARDS.md new file mode 100644 index 0000000..48e790d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/doc/WIZARDS.md @@ -0,0 +1,3 @@ +# Wizards + +This module does not include UI wizards. diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/README.rst b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/README.rst new file mode 100644 index 0000000..208a7d3 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/README.rst @@ -0,0 +1,97 @@ +================================== +Point of Sale - Extra Access Right +================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f9d72317bd441d8202db6646343a16fb9a7ee345631646475870fcbddc492e4a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_access_right + :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_access_right + :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 Odoo Point Of Sale features, restricting possibility to cashier to make some actions in the Point of Sale. This module will add the following groups to Odoo: + +* **PoS - Negative Quantity**: The cashier can sell negative quantity in Point Of Sale (ie, can return products); +* **PoS - Discount**: The cashier can set Discount in Point Of Sale; +* **PoS - Change Unit Price**: The cashier can change the unit price of a product in Point Of Sale; +* **PoS - Many Orders**: The cashier can many orders at the same time; +* **PoS - Delete Order**: The cashier can not delete a full order; + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Once installed, you have to give correct access right to your cashiers. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/184/9.0 + +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 +~~~~~~~ + +* La Louve +* GRAP + +Contributors +~~~~~~~~~~~~ + +* Sylvain LE GAL +* Ammmar Officewala +* Helly kapatel + +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. + +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/odoo-bringout-oca-pos-pos_access_right/pos_access_right/__init__.py b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/__manifest__.py b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/__manifest__.py new file mode 100644 index 0000000..217974c --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/__manifest__.py @@ -0,0 +1,29 @@ +# Copyright (C) 2016-Today: La Louve () +# @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 - Extra Access Right", + "version": "16.0.1.0.2", + "category": "Point Of Sale", + "summary": "Point of Sale - Extra Access Right for certain actions", + "author": "La Louve, GRAP, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": ["point_of_sale"], + "demo": ["demo/res_groups.xml"], + "data": [ + "security/res_groups.xml", + ], + "assets": { + "point_of_sale.assets": [ + "pos_access_right/static/src/css/*", + "pos_access_right/static/src/js/*.js", + "pos_access_right/static/src/xml/*.xml", + ] + }, + "qweb": [ + "static/src/xml/*.xml", + ], + "installable": True, +} diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/demo/res_groups.xml b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/demo/res_groups.xml new file mode 100644 index 0000000..54adf5d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/demo/res_groups.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ar.po b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ar.po new file mode 100644 index 0000000..d4aba87 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ar.po @@ -0,0 +1,146 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-10-21 18:32+0000\n" +"Last-Translator: Osoul \n" +"Language-Team: none\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" +"X-Generator: Weblate 3.8\n" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "نقاط البيع - السماح بالتخفيض" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "نقاط البيع - السماح بالكمية بالسالب" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "نقاط البيع - السماح بتغير سعر البيع" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "نقاط البيع - السماح بحذف أمر مبيعات" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "نقاط البيع - التخفيض" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "نقاط البيع - تعدد أوامر المبيعات" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "نقاط البيع - الكمية بالسالب" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "نقاط البيع - الدفع" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "نقاط البيع - تغيير سعر البيع" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "إعدادات نقاط البيع" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_session +msgid "Point of Sale Session" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" + +#, python-format +#~ msgid "Change Unit Price - Unauthorized function" +#~ msgstr "تغيير سعر البيع - ليس لديك صلاحية" + +#, python-format +#~ msgid "Delete Order - Unauthorized function" +#~ msgstr "حذف أمر مبيعات - ليس لديك صلاحية" + +#, python-format +#~ msgid "Discount - Unauthorized function" +#~ msgstr "تخفيض - ليس لديك صلاحية" + +#, python-format +#~ msgid "Many Orders - Unauthorized function" +#~ msgstr "تعدد أوامر مبيعات - ليس لديك صلاحية" + +#, python-format +#~ msgid "Negative Quantity - Unauthorized function" +#~ msgstr "كمية بالسالب - ليس لديك صلاحية" + +#, python-format +#~ msgid "Payment - Unauthorized function" +#~ msgstr "الدفع - ليس لديك صلاحية" + +#, python-format +#~ msgid "Please ask your manager to do it." +#~ msgstr "قم بطلب مساعدة من المشرف." diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/bs.po b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/bs.po new file mode 100644 index 0000000..b0c8f0a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/bs.po @@ -0,0 +1,114 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +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_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Prodajno mjesto - Dozvoli popust" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Prodajno mjesto - Dozvoli negativnu količinu" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Prodajno mjesto - Dozvoli promjenu jedinične cijene" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Prodajno mjesto - Obriši narudžbu" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Prodajno mjesto - Popust" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Prodajno mjesto - Više narudžbi" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Prodajno mjesto - Negativna količina" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Prodajno mjesto - Plaćanje" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Prodajno mjesto - Promjena jedinične cijene" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Postavke prodajnog mjesta" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_session +msgid "Point of Sale Session" +msgstr "Sesija POS-a" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point" +" of Sale Frontend." +msgstr "" diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ca.po b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ca.po new file mode 100644 index 0000000..95756a5 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ca.po @@ -0,0 +1,163 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +# Translators: +# Marc Tormo i Bochaca , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-28 05:50+0000\n" +"PO-Revision-Date: 2022-03-23 12:17+0000\n" +"Last-Translator: Noel estudillo \n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\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.3.2\n" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Punt de Venda - Permetre Descomptes" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Punt de Venda - Permetre quantitats negatives" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Punt de Venda - Permetre canviar el preu de venda" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Punt de Venda - Esborrar comandes" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Punt de Venda - Descomptes" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Punt de Venda - Múltiples Comandes" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Punt de Venda - Quantitats negatives" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Punt de Venda - Descomptes" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Punt de Venda - Canviar preu unitari" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Punt de Venda - Descomptes" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_session +msgid "Point of Sale Session" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Permetre Descomptes' " +"cap a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Permetre Quantitats " +"Negatives' cap a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Canviar Preu Unitari' " +"cap a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Esborrar Comanda' cap " +"a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Múltiples Comandes' " +"cap a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" +"Aquest camp està allà per passar l'identificador del grup \"PoS - Pagament\" " +"al Frontend del punt de venda." + +#, python-format +#~ msgid "Change Unit Price - Unauthorized function" +#~ msgstr "Canviar preu unitari - Funció no autoritzada" + +#, python-format +#~ msgid "Delete Order - Unauthorized function" +#~ msgstr "Esborrar comanda - Funció no autoritzada" + +#, python-format +#~ msgid "Discount - Unauthorized function" +#~ msgstr "Descomptes - Funció no autoritzada" + +#, python-format +#~ msgid "Many Orders - Unauthorized function" +#~ msgstr "Múltiples Comandes - Funció no autoritzada" + +#, python-format +#~ msgid "Negative Quantity - Unauthorized function" +#~ msgstr "Quantitat Negativa - Funció no autoritzada" + +#, python-format +#~ msgid "Payment - Unauthorized function" +#~ msgstr "Descomptes - Funció no autoritzada" + +#, python-format +#~ msgid "Please ask your manager to do it." +#~ msgstr "Si us plau, pregunti al seu administrador per fer-ho." + +#~ msgid "pos.config" +#~ msgstr "pos.config" diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/es.po b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/es.po new file mode 100644 index 0000000..41d4811 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/es.po @@ -0,0 +1,157 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-12 13:36+0000\n" +"Last-Translator: Ivorra78 \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.17\n" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Punto de venta - Permitir descuento" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Punto de venta - Permitir cantidad negativa" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Punto de venta - Permitir cambio de precio unitario" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Punto de venta - Eliminar pedido" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Punto de Venta - Descuento" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Punto de venta - Muchos pedidos" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Punto de venta - Cantidad negativa" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Punto de Venta - Pago" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Punto de venta - Cambio de precio unitario" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configuración del punto de venta" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_session +msgid "Point of Sale Session" +msgstr "Sesión del Punto de Venta" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Permitir " +"descuento' al Frontend del punto de venta." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Permitir " +"cantidad negativa' al Frontend del punto de venta." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Permitir " +"cambio de precio unitario' al Frontend del punto de venta." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Eliminar " +"pedido' al Frontend del punto de venta." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Muchos " +"pedidos' al punto de venta frontend." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Pago' al " +"Frontend del punto de venta." + +#, python-format +#~ msgid "Change Unit Price - Unauthorized function" +#~ msgstr "Cambiar precio unitario - Función no autorizada" + +#, python-format +#~ msgid "Delete Order - Unauthorized function" +#~ msgstr "Eliminar orden - Función no autorizada" + +#, python-format +#~ msgid "Discount - Unauthorized function" +#~ msgstr "Descuento - Función no autorizada" + +#, python-format +#~ msgid "Many Orders - Unauthorized function" +#~ msgstr "Muchas órdenes - Función no autorizada" + +#, python-format +#~ msgid "Negative Quantity - Unauthorized function" +#~ msgstr "Cantidad negativa- Función no autorizada" + +#, python-format +#~ msgid "Payment - Unauthorized function" +#~ msgstr "Pago - Función no autorizada" + +#, python-format +#~ msgid "Please ask your manager to do it." +#~ msgstr "Pídale a su gerente que lo haga." diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/fr.po b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/fr.po new file mode 100644 index 0000000..399c807 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/fr.po @@ -0,0 +1,161 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-02 11:49+0000\n" +"PO-Revision-Date: 2022-02-16 18:32+0000\n" +"Last-Translator: Khalid Hazam \n" +"Language-Team: \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.3.2\n" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Point de vente - Autoriser les remises" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Point de vente - Autoriser les quantités négatives" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Point de vente - Autoriser le changement de prix unitaire" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Point de Vente - Supprimer une commande" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Point de Vente - Remise" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Point de Vente - Plusieurs commandes simultanées" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Point de Vente - Quantité négative" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Point de Vente - Paiement" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Point de Vente - Changer de prix" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Point de Vente - Configuration" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_session +msgid "Point of Sale Session" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Autoriser les remises' au " +"sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Autoriser les quantités " +"négatives' au sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Autoriser les changements " +"de prix unitaires' au sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Supprimer une commande' " +"au sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Plusieurs commandes' au " +"sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Paiement' au sein du " +"point de vente tactile." + +#, python-format +#~ msgid "Change Unit Price - Unauthorized function" +#~ msgstr "Changer le prix unitaire - Fonctionnalité non autorisée" + +#, python-format +#~ msgid "Delete Order - Unauthorized function" +#~ msgstr "Supprimer une commande de vente - Fonctionnalité non autorisée" + +#, python-format +#~ msgid "Discount - Unauthorized function" +#~ msgstr "Remise - Fonctionnalité non autorisée" + +#, python-format +#~ msgid "Many Orders - Unauthorized function" +#~ msgstr "Plusieurs Commandes simultanées - Fonctionnalité non autorisée" + +#, python-format +#~ msgid "Negative Quantity - Unauthorized function" +#~ msgstr "Quantité négative - Fonctionnalité non autorisée" + +#, python-format +#~ msgid "Payment - Unauthorized function" +#~ msgstr "Paiement - Fonctionnalité non autorisée" + +#, python-format +#~ msgid "Please ask your manager to do it." +#~ msgstr "Veuillez vous rapprocher d'un responsable" + +#~ msgid "pos.config" +#~ msgstr "pos.config" diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/it.po b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/it.po new file mode 100644 index 0000000..6d3407a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/it.po @@ -0,0 +1,162 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-13 14:40+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.17\n" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Punto vendita - Consenti sconto" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Punto vendita - Consenti quantità negativa" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Punto vendita - Consenti modifica prezzo unitario" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Punto vendita - Cancella ordine" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Punto vendita - Sconto" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Punto vendita - Molti ordini" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Punto vendita - Quantità negativa" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Punto vendita - Pagamento" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Punto vendita - Modifica prezzo unitario" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configurazione punto vendita" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_session +msgid "Point of Sale Session" +msgstr "Sessione punto vendita" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Consenti sconto' " +"al frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Consenti quantità " +"negativa' al frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Consenti modifica " +"prezzo unitario' al frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Cancella ordine' " +"al frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Molti ordini' al " +"frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Pagamento' al " +"frontend punto vendita." + +#, python-format +#~ msgid "!hasMinusControlRights" +#~ msgstr "!hasMinusControlRights" + +#, python-format +#~ msgid "!hasNewOrdersControlRights" +#~ msgstr "!hasNewOrdersControlRights" + +#, python-format +#~ msgid "!hasPaymentControlRights" +#~ msgstr "!hasPaymentControlRights" + +#~ msgid "Display Name" +#~ msgstr "Nome visualizzato" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" + +#, python-format +#~ msgid "{'disabled-mode': !hasMinusControlRights}" +#~ msgstr "{'disabled-mode': !hasMinusControlRights}" + +#, python-format +#~ msgid "{'disabled-mode': !hasNewOrdersControlRights}" +#~ msgstr "{'disabled-mode': !hasNewOrdersControlRights}" + +#, python-format +#~ msgid "{'disabled-mode': !hasPaymentControlRights}" +#~ msgstr "{'disabled-mode': !hasPaymentControlRights}" diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ru.po b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ru.po new file mode 100644 index 0000000..d76ac8d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/i18n/ru.po @@ -0,0 +1,123 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-05-30 11:19+0000\n" +"Last-Translator: Ivan Yelizariev \n" +"Language-Team: none\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 3.6.1\n" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Точка продаж - Разрешить Скидки" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Точка продаж - Разрешить отрицательное количество" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Точка продаж - Разрешить изменение цены за штуку" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Точка продаж - Удаление заказа" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Точка продаж - Скидки" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Точка продаж - Более одного заказа" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Точка продаж - Отрицательное количество" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +#, fuzzy +msgid "Point of Sale - Payment" +msgstr "Точка продаж - Скидки" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Точка продаж - Изменение цены за штуку" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Настройки Точки продаж" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_session +msgid "Point of Sale Session" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" + +#, python-format +#~ msgid "Please ask your manager to do it." +#~ msgstr "Попросите менеджера выполнить это действие." diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/__init__.py b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/__init__.py new file mode 100644 index 0000000..20c4774 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/__init__.py @@ -0,0 +1,2 @@ +from . import pos_config +from . import pos_session diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/pos_config.py b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/pos_config.py new file mode 100644 index 0000000..5333591 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/pos_config.py @@ -0,0 +1,73 @@ +from odoo import fields, models + + +class PosConfig(models.Model): + _inherit = "pos.config" + + group_negative_qty_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Allow Negative Quantity", + help="This field is there to pass the id of the 'PoS - Allow Negative" + " Quantity' Group to the Point of Sale Frontend.", + ) + + group_discount_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Allow Discount", + help="This field is there to pass the id of the 'PoS - Allow Discount'" + " Group to the Point of Sale Frontend.", + ) + + group_change_unit_price_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Allow Unit Price Change", + help="This field is there to pass the id of the 'PoS - Allow Unit" + " Price Change' Group to the Point of Sale Frontend.", + ) + + group_multi_order_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Many Orders", + help="This field is there to pass the id of the 'PoS - Many Orders" + " Group to the Point of Sale Frontend.", + ) + + group_delete_order_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Delete Order", + help="This field is there to pass the id of the 'PoS - Delete Order'" + " Group to the Point of Sale Frontend.", + ) + + group_payment_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Payment", + help="This field is there to pass the id of the 'PoS - Payment'" + " Group to the Point of Sale Frontend.", + ) + + def _compute_groups(self): + self.update( + { + "group_negative_qty_id": self.env.ref( + "pos_access_right.group_negative_qty" + ).id, + "group_discount_id": self.env.ref("pos_access_right.group_discount").id, + "group_change_unit_price_id": self.env.ref( + "pos_access_right.group_change_unit_price" + ).id, + "group_multi_order_id": self.env.ref( + "pos_access_right.group_multi_order" + ).id, + "group_delete_order_id": self.env.ref( + "pos_access_right.group_delete_order" + ).id, + "group_payment_id": self.env.ref("pos_access_right.group_payment").id, + } + ) diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/pos_session.py b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/pos_session.py new file mode 100644 index 0000000..fb06eb6 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/models/pos_session.py @@ -0,0 +1,22 @@ +from odoo import models + + +class PosSession(models.Model): + _inherit = "pos.session" + + def _get_pos_ui_res_users(self, params): + user_vals = super()._get_pos_ui_res_users(params) + user_id = user_vals.get("id") + if user_id: + user = self.env["res.users"].browse(user_id) + groups = user.groups_id + config = self.config_id + user_vals.update( + hasGroupPayment=config.group_payment_id in groups, + hasGroupDiscount=config.group_discount_id in groups, + hasGroupNegativeQty=config.group_negative_qty_id in groups, + hasGroupPriceControl=config.group_change_unit_price_id in groups, + hasGroupMultiOrder=config.group_multi_order_id in groups, + hasGroupDeleteOrder=config.group_delete_order_id in groups, + ) + return user_vals diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/CONFIGURE.rst b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/CONFIGURE.rst new file mode 100644 index 0000000..ee6194f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/CONFIGURE.rst @@ -0,0 +1 @@ +Once installed, you have to give correct access right to your cashiers. diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/CONTRIBUTORS.rst b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..66987d8 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Sylvain LE GAL +* Ammmar Officewala +* Helly kapatel diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/DESCRIPTION.rst b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/DESCRIPTION.rst new file mode 100644 index 0000000..f475ace --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/DESCRIPTION.rst @@ -0,0 +1,7 @@ +This module extends Odoo Point Of Sale features, restricting possibility to cashier to make some actions in the Point of Sale. This module will add the following groups to Odoo: + +* **PoS - Negative Quantity**: The cashier can sell negative quantity in Point Of Sale (ie, can return products); +* **PoS - Discount**: The cashier can set Discount in Point Of Sale; +* **PoS - Change Unit Price**: The cashier can change the unit price of a product in Point Of Sale; +* **PoS - Many Orders**: The cashier can many orders at the same time; +* **PoS - Delete Order**: The cashier can not delete a full order; diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/USAGE.rst b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/USAGE.rst new file mode 100644 index 0000000..8471f7f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/readme/USAGE.rst @@ -0,0 +1,3 @@ +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/184/9.0 diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/security/res_groups.xml b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/security/res_groups.xml new file mode 100644 index 0000000..9fc2cc4 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/security/res_groups.xml @@ -0,0 +1,39 @@ + + + + + + Point of Sale - Negative Quantity + + + + + Point of Sale - Discount + + + + + Point of Sale - Unit Price Change + + + + + Point of Sale - Many Orders + + + + + Point of Sale - Delete Order + + + + + Point of Sale - Payment + + + + diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/admin_numpad.png b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/admin_numpad.png new file mode 100644 index 0000000..08c889c Binary files /dev/null and b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/admin_numpad.png differ diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/demo_error.png b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/demo_error.png new file mode 100644 index 0000000..7c86cea Binary files /dev/null and b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/demo_error.png differ diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/demo_numpad.png b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/demo_numpad.png new file mode 100644 index 0000000..448dc2f Binary files /dev/null and b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/demo_numpad.png differ diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/icon.png b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/icon.png new file mode 100644 index 0000000..2c83d71 Binary files /dev/null and b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/icon.png differ diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/index.html b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/index.html new file mode 100644 index 0000000..66df36c --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/index.html @@ -0,0 +1,445 @@ + + + + + +Point of Sale - Extra Access Right + + + +
+

Point of Sale - Extra Access Right

+ + +

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

+

This module extends Odoo Point Of Sale features, restricting possibility to cashier to make some actions in the Point of Sale. This module will add the following groups to Odoo:

+
    +
  • PoS - Negative Quantity: The cashier can sell negative quantity in Point Of Sale (ie, can return products);
  • +
  • PoS - Discount: The cashier can set Discount in Point Of Sale;
  • +
  • PoS - Change Unit Price: The cashier can change the unit price of a product in Point Of Sale;
  • +
  • PoS - Many Orders: The cashier can many orders at the same time;
  • +
  • PoS - Delete Order: The cashier can not delete a full order;
  • +
+

Table of contents

+ +
+

Configuration

+

Once installed, you have to give correct access right to your cashiers.

+
+
+

Usage

+ +Try me on Runbot + +
+
+

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

+
    +
  • La Louve
  • +
  • GRAP
  • +
+
+ +
+

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.

+

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/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/new_groups.png b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/new_groups.png new file mode 100644 index 0000000..0d610e2 Binary files /dev/null and b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/description/new_groups.png differ diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/css/pos.css b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/css/pos.css new file mode 100644 index 0000000..414ece6 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/css/pos.css @@ -0,0 +1,17 @@ +.pos .actionpad .button.pay.disabled-mode, +.pos .actionpad .button.pay.disabled-mode:hover { + background: #c7c7c7; + color: #a5a1a1; + cursor: not-allowed; +} + +.pos .ticket-screen .controls button.highlight.disabled-mode:hover { + background: #c7c7c7; + border: solid 1px rgb(220, 220, 220); + color: #a5a1a1; + cursor: not-allowed; +} + +.pos .ticket-screen .pointer.disabled-mode:hover { + cursor: not-allowed; +} diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/ActionpadWidget.js b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/ActionpadWidget.js new file mode 100644 index 0000000..2d41b6d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/ActionpadWidget.js @@ -0,0 +1,17 @@ +odoo.define("pos_access_right.ActionpadWidget", function (require) { + "use strict"; + + const Registries = require("point_of_sale.Registries"); + const ActionpadWidget = require("point_of_sale.ActionpadWidget"); + + const PosActionpadWidget = (OriginalActionpadWidget) => + class extends OriginalActionpadWidget { + get hasPaymentControlRights() { + return this.env.pos.user.hasGroupPayment; + } + }; + + Registries.Component.extend(ActionpadWidget, PosActionpadWidget); + + return ActionpadWidget; +}); diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/NumpadWidget.js b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/NumpadWidget.js new file mode 100644 index 0000000..b5078df --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/NumpadWidget.js @@ -0,0 +1,31 @@ +odoo.define("pos_access_right.NumpadWidget", function (require) { + "use strict"; + + const Registries = require("point_of_sale.Registries"); + const NumpadWidget = require("point_of_sale.NumpadWidget"); + + const PosNumpadWidget = (OriginalNumpadWidget) => + class extends OriginalNumpadWidget { + get hasManualDiscount() { + const res = super.hasManualDiscount; + if (res) { + return this.env.pos.user.hasGroupDiscount; + } + return res; + } + get hasMinusControlRights() { + return this.env.pos.user.hasGroupNegativeQty; + } + get hasPriceControlRights() { + const res = super.hasPriceControlRights; + if (res) { + return this.env.pos.user.hasGroupPriceControl; + } + return res; + } + }; + + Registries.Component.extend(NumpadWidget, PosNumpadWidget); + + return NumpadWidget; +}); diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/TicketScreen.js b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/TicketScreen.js new file mode 100644 index 0000000..3ff8450 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/js/TicketScreen.js @@ -0,0 +1,24 @@ +odoo.define("pos_access_right.TicketScreen", function (require) { + "use strict"; + + const Registries = require("point_of_sale.Registries"); + const TicketScreen = require("point_of_sale.TicketScreen"); + + const PosTicketScreen = (OriginalTicketScreen) => + class extends OriginalTicketScreen { + get hasNewOrdersControlRights() { + return this.env.pos.user.hasGroupMultiOrder; + } + + async _onDeleteOrder({detail: order}) { + if (!this.env.pos.user.hasGroupDeleteOrder) { + return; + } + return super._onDeleteOrder({detail: order}); + } + }; + + Registries.Component.extend(TicketScreen, PosTicketScreen); + + return TicketScreen; +}); diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/ActionpadWidget.xml b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/ActionpadWidget.xml new file mode 100644 index 0000000..57534d3 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/ActionpadWidget.xml @@ -0,0 +1,21 @@ + + + + + + {'disabled-mode': !hasPaymentControlRights} + !hasPaymentControlRights + + + + diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/NumpadWidget.xml b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/NumpadWidget.xml new file mode 100644 index 0000000..faf5411 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/NumpadWidget.xml @@ -0,0 +1,21 @@ + + + + + + {'disabled-mode': !hasMinusControlRights} + !hasMinusControlRights + + + + diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/TicketScreen.xml b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/TicketScreen.xml new file mode 100644 index 0000000..8695159 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/static/src/xml/TicketScreen.xml @@ -0,0 +1,21 @@ + + + + + + {'disabled-mode': !hasNewOrdersControlRights} + !hasNewOrdersControlRights + + + + diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/tests/__init__.py b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/tests/__init__.py new file mode 100644 index 0000000..174b27f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/tests/__init__.py @@ -0,0 +1 @@ +from . import test_pos_access_right diff --git a/odoo-bringout-oca-pos-pos_access_right/pos_access_right/tests/test_pos_access_right.py b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/tests/test_pos_access_right.py new file mode 100644 index 0000000..21450a6 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pos_access_right/tests/test_pos_access_right.py @@ -0,0 +1,54 @@ +from odoo.tests import TransactionCase + + +class TestUserRestriction(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env( + context=dict( + cls.env.context, + tracking_disable=True, + no_reset_password=True, + ) + ) + cls.pos_user = cls.env["res.users"].create( + { + "login": "pos_user", + "name": "pos_user", + "groups_id": [(6, 0, [cls.env.ref("point_of_sale.group_pos_user").id])], + } + ) + cls.pos_config_main = cls.env.ref("point_of_sale.pos_config_main") + cls.pos_config_model = cls.env["pos.config"] + + def test_access_pos(self): + self.pos_config_main._compute_groups() + self.group_negative_qty = self.env.ref("pos_access_right.group_negative_qty") + self.assertEqual( + self.group_negative_qty, self.pos_config_main.group_negative_qty_id + ) + + self.group_discount = self.env.ref("pos_access_right.group_discount") + self.assertEqual(self.group_discount, self.pos_config_main.group_discount_id) + + self.group_change_unit_price = self.env.ref( + "pos_access_right.group_change_unit_price" + ) + self.assertEqual( + self.group_change_unit_price, + self.pos_config_main.group_change_unit_price_id, + ) + + self.group_multi_order = self.env.ref("pos_access_right.group_multi_order") + self.assertEqual( + self.group_multi_order, self.pos_config_main.group_multi_order_id + ) + + self.group_delete_order = self.env.ref("pos_access_right.group_delete_order") + self.assertEqual( + self.group_delete_order, self.pos_config_main.group_delete_order_id + ) + + self.group_payment = self.env.ref("pos_access_right.group_payment") + self.assertEqual(self.group_payment, self.pos_config_main.group_payment_id) diff --git a/odoo-bringout-oca-pos-pos_access_right/pyproject.toml b/odoo-bringout-oca-pos-pos_access_right/pyproject.toml new file mode 100644 index 0000000..126fbcb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_access_right/pyproject.toml @@ -0,0 +1,42 @@ +[project] +name = "odoo-bringout-oca-pos-pos_access_right" +version = "16.0.0" +description = "Point of Sale - Extra Access Right - Point of Sale - Extra Access Right for certain actions" +authors = [ + { name = "Ernad Husremovic", email = "hernad@bring.out.ba" } +] +dependencies = [ + "odoo-bringout-oca-ocb-point_of_sale>=16.0.0", + "requests>=2.25.1" +] +readme = "README.md" +requires-python = ">= 3.11" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Office/Business", +] + +[project.urls] +homepage = "https://github.com/bringout/0" +repository = "https://github.com/bringout/0" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["pos_access_right"] + +[tool.rye] +managed = true +dev-dependencies = [ + "pytest>=8.4.1", +] diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/README.md b/odoo-bringout-oca-pos-pos_auto_invoice/README.md new file mode 100644 index 0000000..24771a8 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/README.md @@ -0,0 +1,46 @@ +# Point of Sale Automatically Invoice + +Odoo addon: pos_auto_invoice + +## Installation + +```bash +pip install odoo-bringout-oca-pos-pos_auto_invoice +``` + +## Dependencies + +This addon depends on: +- point_of_sale + +## Manifest Information + +- **Name**: Point of Sale Automatically Invoice +- **Version**: 16.0.1.0.0 +- **Category**: Point of Sale +- **License**: AGPL-3 +- **Installable**: False + +## Source + +Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_auto_invoice`. + +## License + +This package maintains the original AGPL-3 license from the upstream Odoo project. + +## Documentation + +- Overview: doc/OVERVIEW.md +- Architecture: doc/ARCHITECTURE.md +- Models: doc/MODELS.md +- Controllers: doc/CONTROLLERS.md +- Wizards: doc/WIZARDS.md +- Reports: doc/REPORTS.md +- Security: doc/SECURITY.md +- Install: doc/INSTALL.md +- Usage: doc/USAGE.md +- Configuration: doc/CONFIGURATION.md +- Dependencies: doc/DEPENDENCIES.md +- Troubleshooting: doc/TROUBLESHOOTING.md +- FAQ: doc/FAQ.md diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/ARCHITECTURE.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/ARCHITECTURE.md new file mode 100644 index 0000000..9e5a769 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/ARCHITECTURE.md @@ -0,0 +1,32 @@ +# Architecture + +```mermaid +flowchart TD + U[Users] -->|HTTP| V[Views and QWeb Templates] + V --> C[Controllers] + V --> W[Wizards – Transient Models] + C --> M[Models and ORM] + W --> M + M --> R[Reports] + DX[Data XML] --> M + S[Security – ACLs and Groups] -. enforces .-> M + + subgraph Pos_auto_invoice Module - pos_auto_invoice + direction LR + M:::layer + W:::layer + C:::layer + V:::layer + R:::layer + S:::layer + DX:::layer + end + + classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px +``` + +Notes +- Views include tree/form/kanban templates and report templates. +- Controllers provide website/portal routes when present. +- Wizards are UI flows implemented with `models.TransientModel`. +- Data XML loads data/demo records; Security defines groups and access. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/CONFIGURATION.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/CONFIGURATION.md new file mode 100644 index 0000000..d670e9a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/CONFIGURATION.md @@ -0,0 +1,3 @@ +# Configuration + +Refer to Odoo settings for pos_auto_invoice. Configure related models, access rights, and options as needed. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/CONTROLLERS.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/CONTROLLERS.md new file mode 100644 index 0000000..f628e77 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/CONTROLLERS.md @@ -0,0 +1,3 @@ +# Controllers + +This module does not define custom HTTP controllers. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/DEPENDENCIES.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/DEPENDENCIES.md new file mode 100644 index 0000000..9dfe640 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/DEPENDENCIES.md @@ -0,0 +1,5 @@ +# Dependencies + +This addon depends on: + +- [point_of_sale](https://github.com/bringout/oca-ocb-sale/tree/681dc8d5fff638cb0862a34e48091a2098d091f8/odoo-bringout-oca-ocb-point_of_sale) diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/FAQ.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/FAQ.md new file mode 100644 index 0000000..b8421be --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/FAQ.md @@ -0,0 +1,4 @@ +# FAQ + +- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged). +- Q: How to enable? A: Start server with --addon pos_auto_invoice or install in UI. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/INSTALL.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/INSTALL.md new file mode 100644 index 0000000..9b7606d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/INSTALL.md @@ -0,0 +1,7 @@ +# Install + +```bash +pip install odoo-bringout-oca-pos-pos_auto_invoice" +# or +uv pip install odoo-bringout-oca-pos-pos_auto_invoice" +``` diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/MODELS.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/MODELS.md new file mode 100644 index 0000000..e9dd727 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/MODELS.md @@ -0,0 +1,13 @@ +# Models + +Detected core models and extensions in pos_auto_invoice. + +```mermaid +classDiagram + class pos_config + class res_config_settings +``` + +Notes +- Classes show model technical names; fields omitted for brevity. +- Items listed under _inherit are extensions of existing models. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/OVERVIEW.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/OVERVIEW.md new file mode 100644 index 0000000..d910cb7 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/OVERVIEW.md @@ -0,0 +1,6 @@ +# Overview + +Packaged Odoo addon: pos_auto_invoice. Provides features documented in upstream Odoo 16 under this addon. + +- Source: OCA/OCB 16.0, addon pos_auto_invoice +- License: LGPL-3 diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/REPORTS.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/REPORTS.md new file mode 100644 index 0000000..e0ea35f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/REPORTS.md @@ -0,0 +1,3 @@ +# Reports + +This module does not define custom reports. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/SECURITY.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/SECURITY.md new file mode 100644 index 0000000..e07da9d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/SECURITY.md @@ -0,0 +1,8 @@ +# Security + +This module does not define custom security rules or access controls beyond Odoo defaults. + +Default Odoo security applies: +- Base user access through standard groups +- Model access inherited from dependencies +- No custom row-level security rules diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/TROUBLESHOOTING.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/TROUBLESHOOTING.md new file mode 100644 index 0000000..56853cb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/TROUBLESHOOTING.md @@ -0,0 +1,5 @@ +# Troubleshooting + +- Ensure Python and Odoo environment matches repo guidance. +- Check database connectivity and logs if startup fails. +- Validate that dependent addons listed in DEPENDENCIES.md are installed. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/USAGE.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/USAGE.md new file mode 100644 index 0000000..0d4fe28 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/USAGE.md @@ -0,0 +1,7 @@ +# Usage + +Start Odoo including this addon (from repo root): + +```bash +python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_auto_invoice +``` diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/doc/WIZARDS.md b/odoo-bringout-oca-pos-pos_auto_invoice/doc/WIZARDS.md new file mode 100644 index 0000000..48e790d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/doc/WIZARDS.md @@ -0,0 +1,3 @@ +# Wizards + +This module does not include UI wizards. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/README.rst b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/README.rst new file mode 100644 index 0000000..3be7938 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/README.rst @@ -0,0 +1,88 @@ +=================================== +Point of Sale Automatically Invoice +=================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:2b6908cde80186b7b4159c0a6080960f88db5f379a2d78b9748fcb03dff8fdd6 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_auto_invoice + :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_auto_invoice + :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| + +Allow to set point-of-sale orders as to-invoice by default. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +This module adds an “Invoice By Default” option to the Accounting section of +the Point of Sale settings. + +To set orders as to-invoice by default, check the “Invoice By Default” +checkbox. + +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 +~~~~~~~ + +* Coop IT Easy SC + +Contributors +~~~~~~~~~~~~ + +* `Coop IT Easy SC `_: + + * Carmen Bianca Bakker + * hugues de keyzer + +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. + +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/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/__init__.py b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/__init__.py new file mode 100644 index 0000000..3eb7887 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import models diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/__manifest__.py b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/__manifest__.py new file mode 100644 index 0000000..be570e1 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2022 Coop IT Easy SC +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Point of Sale Automatically Invoice", + "summary": "Allow to set POS orders as to-invoice by default", + "version": "16.0.1.0.0", + "category": "Point of Sale", + "website": "https://github.com/OCA/pos", + "author": "Coop IT Easy SC, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": [ + "point_of_sale", + ], + "data": [ + "views/res_config_settings_view.xml", + ], + "assets": { + "point_of_sale.assets": [ + "pos_auto_invoice/static/src/js/*.js", + ] + }, +} diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/i18n/bs.po b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/i18n/bs.po new file mode 100644 index 0000000..187016e --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/i18n/bs.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_auto_invoice +# +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_auto_invoice +#: model:ir.model,name:pos_auto_invoice.model_res_config_settings +msgid "Config Settings" +msgstr "Postavke" + +#. module: pos_auto_invoice +#: model:ir.model.fields,field_description:pos_auto_invoice.field_pos_config__invoice_by_default +#: model:ir.model.fields,field_description:pos_auto_invoice.field_res_config_settings__pos_invoice_by_default +msgid "Invoice By Default" +msgstr "Invoice By Default" + +#. module: pos_auto_invoice +#: model:ir.model,name:pos_auto_invoice.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Postavke prodajnog mjesta" + +#. module: pos_auto_invoice +#: model_terms:ir.ui.view,arch_db:pos_auto_invoice.res_config_settings_view_form +msgid "Set orders as to-invoice by default" +msgstr "Set orders as to-invoice by default" diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/i18n/it.po b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/i18n/it.po new file mode 100644 index 0000000..c0ddfcf --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/i18n/it.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_auto_invoice +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-04-10 13:24+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 5.10.4\n" + +#. module: pos_auto_invoice +#: model:ir.model,name:pos_auto_invoice.model_res_config_settings +msgid "Config Settings" +msgstr "Impostazioni configurazione" + +#. module: pos_auto_invoice +#: model:ir.model.fields,field_description:pos_auto_invoice.field_pos_config__invoice_by_default +#: model:ir.model.fields,field_description:pos_auto_invoice.field_res_config_settings__pos_invoice_by_default +msgid "Invoice By Default" +msgstr "Fattura predefinita" + +#. module: pos_auto_invoice +#: model:ir.model,name:pos_auto_invoice.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configurazione punto vendita" + +#. module: pos_auto_invoice +#: model_terms:ir.ui.view,arch_db:pos_auto_invoice.res_config_settings_view_form +msgid "Set orders as to-invoice by default" +msgstr "Imposta ordini come da fatturare in modo predefinito" diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/__init__.py b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/__init__.py new file mode 100644 index 0000000..7133ebc --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/__init__.py @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import pos_config +from . import res_config_settings diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/pos_config.py b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/pos_config.py new file mode 100644 index 0000000..b69db85 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/pos_config.py @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import fields, models + + +class PosConfig(models.Model): + _inherit = "pos.config" + + invoice_by_default = fields.Boolean() diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/res_config_settings.py b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/res_config_settings.py new file mode 100644 index 0000000..f0f8e61 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/models/res_config_settings.py @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2024 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + pos_invoice_by_default = fields.Boolean( + related="pos_config_id.invoice_by_default", + readonly=False, + ) diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/CONFIGURE.rst b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/CONFIGURE.rst new file mode 100644 index 0000000..03cf526 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/CONFIGURE.rst @@ -0,0 +1,5 @@ +This module adds an “Invoice By Default” option to the Accounting section of +the Point of Sale settings. + +To set orders as to-invoice by default, check the “Invoice By Default” +checkbox. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/CONTRIBUTORS.rst b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..26771b9 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Coop IT Easy SC `_: + + * Carmen Bianca Bakker + * hugues de keyzer diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/DESCRIPTION.rst b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/DESCRIPTION.rst new file mode 100644 index 0000000..448aad1 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Allow to set point-of-sale orders as to-invoice by default. diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/description/icon.png b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/description/icon.png new file mode 100644 index 0000000..1dcc49c Binary files /dev/null and b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/description/icon.png differ diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/description/index.html b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/description/index.html new file mode 100644 index 0000000..e77f77c --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/description/index.html @@ -0,0 +1,435 @@ + + + + + +Point of Sale Automatically Invoice + + + +
+

Point of Sale Automatically Invoice

+ + +

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

+

Allow to set point-of-sale orders as to-invoice by default.

+

Table of contents

+ +
+

Configuration

+

This module adds an “Invoice By Default” option to the Accounting section of +the Point of Sale settings.

+

To set orders as to-invoice by default, check the “Invoice By Default” +checkbox.

+
+
+

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

+
    +
  • Coop IT Easy SC
  • +
+
+
+

Contributors

+ +
+
+

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.

+

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/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/src/js/models.esm.js b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/src/js/models.esm.js new file mode 100644 index 0000000..c2d3a8e --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/static/src/js/models.esm.js @@ -0,0 +1,23 @@ +/** @odoo-module **/ + +import {Order} from "point_of_sale.models"; +import Registries from "point_of_sale.Registries"; + +const AutoInvoiceOrder = (OriginalOrder) => + class extends OriginalOrder { + constructor(obj, options) { + super(...arguments); + if (!options.json && this.pos.config.invoice_by_default) { + this.to_invoice = true; + } + } + + init_from_JSON(json) { + super.init_from_JSON(...arguments); + // This should be done in the original method, but curiously + // it is not (to_invoice is always set to false). + this.to_invoice = json.to_invoice; + } + }; + +Registries.Model.extend(Order, AutoInvoiceOrder); diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/views/res_config_settings_view.xml b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/views/res_config_settings_view.xml new file mode 100644 index 0000000..7b26e0b --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pos_auto_invoice/views/res_config_settings_view.xml @@ -0,0 +1,30 @@ + + + + + + res.config.settings.view.form + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+ +
diff --git a/odoo-bringout-oca-pos-pos_auto_invoice/pyproject.toml b/odoo-bringout-oca-pos-pos_auto_invoice/pyproject.toml new file mode 100644 index 0000000..437f118 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_auto_invoice/pyproject.toml @@ -0,0 +1,42 @@ +[project] +name = "odoo-bringout-oca-pos-pos_auto_invoice" +version = "16.0.0" +description = "Point of Sale Automatically Invoice - Allow to set POS orders as to-invoice by default" +authors = [ + { name = "Ernad Husremovic", email = "hernad@bring.out.ba" } +] +dependencies = [ + "odoo-bringout-oca-ocb-point_of_sale>=16.0.0", + "requests>=2.25.1" +] +readme = "README.md" +requires-python = ">= 3.11" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Office/Business", +] + +[project.urls] +homepage = "https://github.com/bringout/0" +repository = "https://github.com/bringout/0" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["pos_auto_invoice"] + +[tool.rye] +managed = true +dev-dependencies = [ + "pytest>=8.4.1", +] diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/README.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/README.md new file mode 100644 index 0000000..cc208e4 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/README.md @@ -0,0 +1,48 @@ +# POS Bypass Global Discount + +Odoo addon: pos_bypass_global_discount + +## Installation + +```bash +pip install odoo-bringout-oca-pos-pos_bypass_global_discount +``` + +## Dependencies + +This addon depends on: +- pos_discount +- pos_loyalty +- sale_global_discount + +## Manifest Information + +- **Name**: POS Bypass Global Discount +- **Version**: 16.0.1.0.1 +- **Category**: Point of Sale +- **License**: AGPL-3 +- **Installable**: True + +## Source + +Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_bypass_global_discount`. + +## License + +This package maintains the original AGPL-3 license from the upstream Odoo project. + +## Documentation + +- Overview: doc/OVERVIEW.md +- Architecture: doc/ARCHITECTURE.md +- Models: doc/MODELS.md +- Controllers: doc/CONTROLLERS.md +- Wizards: doc/WIZARDS.md +- Reports: doc/REPORTS.md +- Security: doc/SECURITY.md +- Install: doc/INSTALL.md +- Usage: doc/USAGE.md +- Configuration: doc/CONFIGURATION.md +- Dependencies: doc/DEPENDENCIES.md +- Troubleshooting: doc/TROUBLESHOOTING.md +- FAQ: doc/FAQ.md diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/ARCHITECTURE.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/ARCHITECTURE.md new file mode 100644 index 0000000..2aacffc --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/ARCHITECTURE.md @@ -0,0 +1,32 @@ +# Architecture + +```mermaid +flowchart TD + U[Users] -->|HTTP| V[Views and QWeb Templates] + V --> C[Controllers] + V --> W[Wizards – Transient Models] + C --> M[Models and ORM] + W --> M + M --> R[Reports] + DX[Data XML] --> M + S[Security – ACLs and Groups] -. enforces .-> M + + subgraph Pos_bypass_global_discount Module - pos_bypass_global_discount + direction LR + M:::layer + W:::layer + C:::layer + V:::layer + R:::layer + S:::layer + DX:::layer + end + + classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px +``` + +Notes +- Views include tree/form/kanban templates and report templates. +- Controllers provide website/portal routes when present. +- Wizards are UI flows implemented with `models.TransientModel`. +- Data XML loads data/demo records; Security defines groups and access. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/CONFIGURATION.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/CONFIGURATION.md new file mode 100644 index 0000000..55a7367 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/CONFIGURATION.md @@ -0,0 +1,3 @@ +# Configuration + +Refer to Odoo settings for pos_bypass_global_discount. Configure related models, access rights, and options as needed. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/CONTROLLERS.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/CONTROLLERS.md new file mode 100644 index 0000000..f628e77 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/CONTROLLERS.md @@ -0,0 +1,3 @@ +# Controllers + +This module does not define custom HTTP controllers. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/DEPENDENCIES.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/DEPENDENCIES.md new file mode 100644 index 0000000..ea50342 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/DEPENDENCIES.md @@ -0,0 +1,7 @@ +# Dependencies + +This addon depends on: + +- [pos_discount](https://github.com/bringout/oca-ocb-pos/tree/8e3c420e50146ad6887d3e14c2929a735e316fc1/odoo-bringout-oca-ocb-pos_discount) +- [pos_loyalty](https://github.com/bringout/oca-ocb-pos/tree/8e3c420e50146ad6887d3e14c2929a735e316fc1/odoo-bringout-oca-ocb-pos_loyalty) +- [sale_global_discount](https://github.com/bringout/oca-workflow-process) diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/FAQ.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/FAQ.md new file mode 100644 index 0000000..8bf89b4 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/FAQ.md @@ -0,0 +1,4 @@ +# FAQ + +- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged). +- Q: How to enable? A: Start server with --addon pos_bypass_global_discount or install in UI. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/INSTALL.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/INSTALL.md new file mode 100644 index 0000000..5858f42 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/INSTALL.md @@ -0,0 +1,7 @@ +# Install + +```bash +pip install odoo-bringout-oca-pos-pos_bypass_global_discount" +# or +uv pip install odoo-bringout-oca-pos-pos_bypass_global_discount" +``` diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/MODELS.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/MODELS.md new file mode 100644 index 0000000..9f84ccc --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/MODELS.md @@ -0,0 +1,12 @@ +# Models + +Detected core models and extensions in pos_bypass_global_discount. + +```mermaid +classDiagram + class pos_session +``` + +Notes +- Classes show model technical names; fields omitted for brevity. +- Items listed under _inherit are extensions of existing models. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/OVERVIEW.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/OVERVIEW.md new file mode 100644 index 0000000..5b05b34 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/OVERVIEW.md @@ -0,0 +1,6 @@ +# Overview + +Packaged Odoo addon: pos_bypass_global_discount. Provides features documented in upstream Odoo 16 under this addon. + +- Source: OCA/OCB 16.0, addon pos_bypass_global_discount +- License: LGPL-3 diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/REPORTS.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/REPORTS.md new file mode 100644 index 0000000..e0ea35f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/REPORTS.md @@ -0,0 +1,3 @@ +# Reports + +This module does not define custom reports. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/SECURITY.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/SECURITY.md new file mode 100644 index 0000000..e07da9d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/SECURITY.md @@ -0,0 +1,8 @@ +# Security + +This module does not define custom security rules or access controls beyond Odoo defaults. + +Default Odoo security applies: +- Base user access through standard groups +- Model access inherited from dependencies +- No custom row-level security rules diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/TROUBLESHOOTING.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/TROUBLESHOOTING.md new file mode 100644 index 0000000..56853cb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/TROUBLESHOOTING.md @@ -0,0 +1,5 @@ +# Troubleshooting + +- Ensure Python and Odoo environment matches repo guidance. +- Check database connectivity and logs if startup fails. +- Validate that dependent addons listed in DEPENDENCIES.md are installed. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/USAGE.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/USAGE.md new file mode 100644 index 0000000..746c583 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/USAGE.md @@ -0,0 +1,7 @@ +# Usage + +Start Odoo including this addon (from repo root): + +```bash +python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_bypass_global_discount +``` diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/WIZARDS.md b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/WIZARDS.md new file mode 100644 index 0000000..48e790d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/doc/WIZARDS.md @@ -0,0 +1,3 @@ +# Wizards + +This module does not include UI wizards. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/README.rst b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/README.rst new file mode 100644 index 0000000..7e1914e --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/README.rst @@ -0,0 +1,79 @@ +========================== +POS Bypass Global Discount +========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:118a335107deab420079f4508901489ee3e024abddaf96d69e799da6f3924544 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_bypass_global_discount + :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_bypass_global_discount + :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| + +Field `bypass_global_discount` was introduced in [base_global_discount](https://github.com/OCA/server-backend/tree/16.0/base_global_discount). It's used to exclude some products from global discounts calculations. +This module is meant to be installed as a companion to `sale_global_discount`. It makes sure the POS will also honors the `bypass_global_discount` field when user inputs a Discount at the Order level. + +**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 +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* `Camptocamp `_ + + * Tri Doan + +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. + +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/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/__init__.py b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/__manifest__.py b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/__manifest__.py new file mode 100644 index 0000000..bc1752c --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Camptocamp (https://www.camptocamp.com). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "POS Bypass Global Discount", + "summary": "", + "version": "16.0.1.0.1", + "author": "Camptocamp, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "category": "Point of Sale", + "depends": ["pos_discount", "pos_loyalty", "sale_global_discount"], + "installable": True, + "assets": { + "point_of_sale.assets": [ + "pos_bypass_global_discount/static/src/js/**/*.js", + ], + "web.assets_tests": [ + "pos_bypass_global_discount/static/src/tours/**/*", + ], + }, +} diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/i18n/bs.po b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/i18n/bs.po new file mode 100644 index 0000000..b64778a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/i18n/bs.po @@ -0,0 +1,19 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_bypass_global_discount +# +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_bypass_global_discount +#: model:ir.model,name:pos_bypass_global_discount.model_pos_session +msgid "Point of Sale Session" +msgstr "Sesija POS-a" diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/i18n/it.po b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/i18n/it.po new file mode 100644 index 0000000..23047a0 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/i18n/it.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_bypass_global_discount +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-09-26 09:06+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 5.6.2\n" + +#. module: pos_bypass_global_discount +#: model:ir.model,name:pos_bypass_global_discount.model_pos_session +msgid "Point of Sale Session" +msgstr "Sessione punto vendita" diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/models/__init__.py b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/models/__init__.py new file mode 100644 index 0000000..f7116e3 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/models/__init__.py @@ -0,0 +1 @@ +from . import pos_session diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/models/pos_session.py b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/models/pos_session.py new file mode 100644 index 0000000..e26802d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/models/pos_session.py @@ -0,0 +1,13 @@ +# Copyright 2024 Camptocamp +# 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_product_product(self): + params = super()._loader_params_product_product() + if "search_params" in params and "fields" in params["search_params"]: + params["search_params"]["fields"].append("bypass_global_discount") + return params diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/readme/CONTRIBUTORS.rst b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..b4bdca8 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `Camptocamp `_ + + * Tri Doan diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/readme/DESCRIPTION.rst b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/readme/DESCRIPTION.rst new file mode 100644 index 0000000..e34cc23 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Field `bypass_global_discount` was introduced in [base_global_discount](https://github.com/OCA/server-backend/tree/16.0/base_global_discount). It's used to exclude some products from global discounts calculations. +This module is meant to be installed as a companion to `sale_global_discount`. It makes sure the POS will also honors the `bypass_global_discount` field when user inputs a Discount at the Order level. diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/description/icon.png b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/description/icon.png differ diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/description/index.html b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/description/index.html new file mode 100644 index 0000000..d9b4f1a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/description/index.html @@ -0,0 +1,427 @@ + + + + + +POS Bypass Global Discount + + + +
+

POS Bypass Global Discount

+ + +

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

+

Field bypass_global_discount was introduced in [base_global_discount](https://github.com/OCA/server-backend/tree/16.0/base_global_discount). It’s used to exclude some products from global discounts calculations. +This module is meant to be installed as a companion to sale_global_discount. It makes sure the POS will also honors the bypass_global_discount field when user inputs a Discount at the Order level.

+

Table of contents

+ +
+

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

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

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.

+

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/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/src/js/models.js b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/src/js/models.js new file mode 100644 index 0000000..c814db7 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/src/js/models.js @@ -0,0 +1,15 @@ +odoo.define("pos_bypass_global_discount.models", function (require) { + "use strict"; + + const {Orderline} = require("point_of_sale.models"); + const Registries = require("point_of_sale.Registries"); + + const PosBypassDiscountOrderline = (Orderline) => + class PosBypassDiscountOrderline extends Orderline { + isGlobalDiscountApplicable() { + const res = super.isGlobalDiscountApplicable(); + return !this.product.bypass_global_discount && res; + } + }; + Registries.Model.extend(Orderline, PosBypassDiscountOrderline); +}); diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/src/tours/PosBypassGlobalDiscount.esm.js b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/src/tours/PosBypassGlobalDiscount.esm.js new file mode 100644 index 0000000..8755b1f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/static/src/tours/PosBypassGlobalDiscount.esm.js @@ -0,0 +1,20 @@ +/** @odoo-module **/ +import {getSteps, startSteps} from "point_of_sale.tour.utils"; +import {PosLoyalty} from "pos_loyalty.tour.PosCouponTourMethods"; +import {ProductScreen} from "point_of_sale.tour.ProductScreenTourMethods"; +import Tour from "web_tour.tour"; + +startSteps(); +ProductScreen.do.clickHomeCategory(); +ProductScreen.do.confirmOpeningPopup(); +ProductScreen.exec.addOrderline("Product 1", "1.00", "100"); +PosLoyalty.do.clickDiscountButton(); +PosLoyalty.do.clickConfirmButton(); +ProductScreen.check.totalAmountIs("100.00"); +ProductScreen.exec.addOrderline("Product 2", "1.00", "100"); +PosLoyalty.do.clickDiscountButton(); +PosLoyalty.do.clickConfirmButton(); +// Total = Product 1 + Product 2 - 10% (Product 2) +ProductScreen.check.totalAmountIs("190.00"); + +Tour.register("PosBypassGlobalDiscount", {test: true, url: "/pos/web"}, getSteps()); diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/tests/__init__.py b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/tests/__init__.py new file mode 100644 index 0000000..3a7f351 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/tests/__init__.py @@ -0,0 +1 @@ +from . import test_bypass_global_discount diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/tests/test_bypass_global_discount.py b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/tests/test_bypass_global_discount.py new file mode 100644 index 0000000..d9a3c4e --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pos_bypass_global_discount/tests/test_bypass_global_discount.py @@ -0,0 +1,66 @@ +# Copyright 2024 Camptocamp +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests import tagged + +from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT +from odoo.addons.point_of_sale.tests.test_frontend import TestPointOfSaleHttpCommon + + +@tagged("post_install", "-at_install") +class TestPosBypassGlobalDiscount(TestPointOfSaleHttpCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env["base"].with_context(**DISABLED_MAIL_CONTEXT).env + + def test_bypass_global_discount(self): + # this benefits the tour + # because the DiscountButton is hide after the module is installed + if self.env["ir.module.module"].search( + [("name", "=", "pos_minimize_menu"), ("state", "=", "installed")] + ): + self.main_pos_config.write({"iface_important_buttons": "DiscountButton"}) + + self.discount_product = self.env["product.product"].create( + { + "name": "Discount Product", + "type": "service", + "list_price": 0, + "available_in_pos": True, + "taxes_id": False, + } + ) + self.main_pos_config.write( + { + "module_pos_discount": True, + "discount_product_id": self.discount_product.id, + "discount_pc": 10, + } + ) + self.product01 = self.env["product.product"].create( + { + "name": "Product 1", + "type": "product", + "list_price": 100, + "available_in_pos": True, + "bypass_global_discount": True, + "taxes_id": False, + } + ) + self.product02 = self.env["product.product"].create( + { + "name": "Product 2", + "type": "product", + "list_price": 100, + "available_in_pos": True, + "bypass_global_discount": False, + "taxes_id": False, + } + ) + self.main_pos_config.open_ui() + self.start_tour( + "/pos/web?config_id=%d" % self.main_pos_config.id, + "PosBypassGlobalDiscount", + login="accountman", + ) diff --git a/odoo-bringout-oca-pos-pos_bypass_global_discount/pyproject.toml b/odoo-bringout-oca-pos-pos_bypass_global_discount/pyproject.toml new file mode 100644 index 0000000..8cdeaaf --- /dev/null +++ b/odoo-bringout-oca-pos-pos_bypass_global_discount/pyproject.toml @@ -0,0 +1,44 @@ +[project] +name = "odoo-bringout-oca-pos-pos_bypass_global_discount" +version = "16.0.0" +description = "POS Bypass Global Discount - " +authors = [ + { name = "Ernad Husremovic", email = "hernad@bring.out.ba" } +] +dependencies = [ + "odoo-bringout-oca-pos-pos_discount>=16.0.0", + "odoo-bringout-oca-pos-pos_loyalty>=16.0.0", + "odoo-bringout-oca-pos-sale_global_discount>=16.0.0", + "requests>=2.25.1" +] +readme = "README.md" +requires-python = ">= 3.11" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Office/Business", +] + +[project.urls] +homepage = "https://github.com/bringout/0" +repository = "https://github.com/bringout/0" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["pos_bypass_global_discount"] + +[tool.rye] +managed = true +dev-dependencies = [ + "pytest>=8.4.1", +] diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/README.md b/odoo-bringout-oca-pos-pos_cash_control_override/README.md new file mode 100644 index 0000000..cf49e6e --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/README.md @@ -0,0 +1,46 @@ +# Point of sale cash control override + +Odoo addon: pos_cash_control_override + +## Installation + +```bash +pip install odoo-bringout-oca-pos-pos_cash_control_override +``` + +## Dependencies + +This addon depends on: +- point_of_sale + +## Manifest Information + +- **Name**: Point of sale cash control override +- **Version**: 16.0.1.0.0 +- **Category**: Point of Sale +- **License**: AGPL-3 +- **Installable**: False + +## Source + +Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_cash_control_override`. + +## License + +This package maintains the original AGPL-3 license from the upstream Odoo project. + +## Documentation + +- Overview: doc/OVERVIEW.md +- Architecture: doc/ARCHITECTURE.md +- Models: doc/MODELS.md +- Controllers: doc/CONTROLLERS.md +- Wizards: doc/WIZARDS.md +- Reports: doc/REPORTS.md +- Security: doc/SECURITY.md +- Install: doc/INSTALL.md +- Usage: doc/USAGE.md +- Configuration: doc/CONFIGURATION.md +- Dependencies: doc/DEPENDENCIES.md +- Troubleshooting: doc/TROUBLESHOOTING.md +- FAQ: doc/FAQ.md diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/ARCHITECTURE.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/ARCHITECTURE.md new file mode 100644 index 0000000..938078f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/ARCHITECTURE.md @@ -0,0 +1,32 @@ +# Architecture + +```mermaid +flowchart TD + U[Users] -->|HTTP| V[Views and QWeb Templates] + V --> C[Controllers] + V --> W[Wizards – Transient Models] + C --> M[Models and ORM] + W --> M + M --> R[Reports] + DX[Data XML] --> M + S[Security – ACLs and Groups] -. enforces .-> M + + subgraph Pos_cash_control_override Module - pos_cash_control_override + direction LR + M:::layer + W:::layer + C:::layer + V:::layer + R:::layer + S:::layer + DX:::layer + end + + classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px +``` + +Notes +- Views include tree/form/kanban templates and report templates. +- Controllers provide website/portal routes when present. +- Wizards are UI flows implemented with `models.TransientModel`. +- Data XML loads data/demo records; Security defines groups and access. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/CONFIGURATION.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/CONFIGURATION.md new file mode 100644 index 0000000..8909407 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/CONFIGURATION.md @@ -0,0 +1,3 @@ +# Configuration + +Refer to Odoo settings for pos_cash_control_override. Configure related models, access rights, and options as needed. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/CONTROLLERS.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/CONTROLLERS.md new file mode 100644 index 0000000..f628e77 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/CONTROLLERS.md @@ -0,0 +1,3 @@ +# Controllers + +This module does not define custom HTTP controllers. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/DEPENDENCIES.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/DEPENDENCIES.md new file mode 100644 index 0000000..9dfe640 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/DEPENDENCIES.md @@ -0,0 +1,5 @@ +# Dependencies + +This addon depends on: + +- [point_of_sale](https://github.com/bringout/oca-ocb-sale/tree/681dc8d5fff638cb0862a34e48091a2098d091f8/odoo-bringout-oca-ocb-point_of_sale) diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/FAQ.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/FAQ.md new file mode 100644 index 0000000..fd19d08 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/FAQ.md @@ -0,0 +1,4 @@ +# FAQ + +- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged). +- Q: How to enable? A: Start server with --addon pos_cash_control_override or install in UI. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/INSTALL.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/INSTALL.md new file mode 100644 index 0000000..17386b6 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/INSTALL.md @@ -0,0 +1,7 @@ +# Install + +```bash +pip install odoo-bringout-oca-pos-pos_cash_control_override" +# or +uv pip install odoo-bringout-oca-pos-pos_cash_control_override" +``` diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/MODELS.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/MODELS.md new file mode 100644 index 0000000..15d29c1 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/MODELS.md @@ -0,0 +1,13 @@ +# Models + +Detected core models and extensions in pos_cash_control_override. + +```mermaid +classDiagram + class account_bank_statement_line + class pos_session +``` + +Notes +- Classes show model technical names; fields omitted for brevity. +- Items listed under _inherit are extensions of existing models. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/OVERVIEW.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/OVERVIEW.md new file mode 100644 index 0000000..d9c5bf1 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/OVERVIEW.md @@ -0,0 +1,6 @@ +# Overview + +Packaged Odoo addon: pos_cash_control_override. Provides features documented in upstream Odoo 16 under this addon. + +- Source: OCA/OCB 16.0, addon pos_cash_control_override +- License: LGPL-3 diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/REPORTS.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/REPORTS.md new file mode 100644 index 0000000..e0ea35f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/REPORTS.md @@ -0,0 +1,3 @@ +# Reports + +This module does not define custom reports. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/SECURITY.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/SECURITY.md new file mode 100644 index 0000000..e07da9d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/SECURITY.md @@ -0,0 +1,8 @@ +# Security + +This module does not define custom security rules or access controls beyond Odoo defaults. + +Default Odoo security applies: +- Base user access through standard groups +- Model access inherited from dependencies +- No custom row-level security rules diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/TROUBLESHOOTING.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/TROUBLESHOOTING.md new file mode 100644 index 0000000..56853cb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/TROUBLESHOOTING.md @@ -0,0 +1,5 @@ +# Troubleshooting + +- Ensure Python and Odoo environment matches repo guidance. +- Check database connectivity and logs if startup fails. +- Validate that dependent addons listed in DEPENDENCIES.md are installed. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/USAGE.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/USAGE.md new file mode 100644 index 0000000..606a59d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/USAGE.md @@ -0,0 +1,7 @@ +# Usage + +Start Odoo including this addon (from repo root): + +```bash +python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_cash_control_override +``` diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/doc/WIZARDS.md b/odoo-bringout-oca-pos-pos_cash_control_override/doc/WIZARDS.md new file mode 100644 index 0000000..48e790d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/doc/WIZARDS.md @@ -0,0 +1,3 @@ +# Wizards + +This module does not include UI wizards. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/README.rst b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/README.rst new file mode 100644 index 0000000..479c0ef --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/README.rst @@ -0,0 +1,107 @@ +=================================== +Point of sale cash control override +=================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:e26b5f5dd2dde6c1e2add74106f4c9d11dbfb4c9c965a4de4d072701b882e1d9 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_cash_control_override + :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_cash_control_override + :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 restores the permissions requisites for Point of Sale users +to perform cash operations in their sessions. + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +From `this change `__ a Point +of Sale user who needs to perform cash control operations +*Accounting/Billing* permission is required. That's a huge permission +for the kind of user that only does cashing machine operations. + +We're recovering the former behavior present in previous versions. + +Usage +===== + +After this module is installed: + +1. Choose a user with *Point of Sale/User* permissions but no + *Accounting/Billing* permission. +2. Open a session in a Point of Sale with cash control active. +3. You'll be able to do any of the cash control operations (cash in / + out). + +Known issues / Roadmap +====================== + +- This module will be unnecessary if + https://github.com/odoo/odoo/pull/188798 gets merged or the former + permissions paradigm is restored in any other way. + +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 +------- + +* Tecnativa + +Contributors +------------ + +- `Tecnativa `__ + + - David Vidal + +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. + +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/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/__init__.py b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/__manifest__.py b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/__manifest__.py new file mode 100644 index 0000000..da9af4a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2024 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Point of sale cash control override", + "summary": "Override bare PoS user cash control restrictions", + "version": "16.0.1.0.0", + "category": "Point of Sale", + "author": "Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": [ + "point_of_sale", + ], + "data": [], +} diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/i18n/bs.po b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/i18n/bs.po new file mode 100644 index 0000000..83b4705 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/i18n/bs.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_cash_control_override +# +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_cash_control_override +#: model:ir.model,name:pos_cash_control_override.model_account_bank_statement_line +msgid "Bank Statement Line" +msgstr "Stavka izvoda banke" + +#. module: pos_cash_control_override +#: model:ir.model,name:pos_cash_control_override.model_pos_session +msgid "Point of Sale Session" +msgstr "Sesija POS-a" diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/i18n/it.po b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/i18n/it.po new file mode 100644 index 0000000..d6f9323 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/i18n/it.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_cash_control_override +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-12-09 10:06+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 5.6.2\n" + +#. module: pos_cash_control_override +#: model:ir.model,name:pos_cash_control_override.model_account_bank_statement_line +msgid "Bank Statement Line" +msgstr "Riga estratto conto" + +#. module: pos_cash_control_override +#: model:ir.model,name:pos_cash_control_override.model_pos_session +msgid "Point of Sale Session" +msgstr "Sessione punto vendita" diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/__init__.py b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/__init__.py new file mode 100644 index 0000000..0038997 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/__init__.py @@ -0,0 +1,2 @@ +from . import account_bank_statement_line +from . import pos_session diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/account_bank_statement_line.py b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/account_bank_statement_line.py new file mode 100644 index 0000000..b19295e --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/account_bank_statement_line.py @@ -0,0 +1,15 @@ +# Copyright 2024 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import api, models + + +class AccountBankStatementLine(models.Model): + _inherit = "account.bank.statement.line" + + @api.model_create_multi + def create(self, vals_list): + if self.env.context.get( + "override_cash_control_permissions" + ) and self.user_has_groups("point_of_sale.group_pos_user"): + self = self.sudo() + return super().create(vals_list) diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/pos_session.py b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/pos_session.py new file mode 100644 index 0000000..576ee0d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/models/pos_session.py @@ -0,0 +1,17 @@ +# Copyright 2024 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import models + + +class PosSession(models.Model): + _inherit = "pos.session" + + def try_cash_in_out(self, _type, amount, reason, extras): + if not self.user_has_groups("account.group_account_invoice"): + self = self.with_context(override_cash_control_permissions=True) + return super().try_cash_in_out(_type, amount, reason, extras) + + def _get_pos_ui_pos_config(self, params): + config = super()._get_pos_ui_pos_config(params) + config["has_cash_move_permission"] = True + return config diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/CONTEXT.md b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/CONTEXT.md new file mode 100644 index 0000000..684fc3a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/CONTEXT.md @@ -0,0 +1,5 @@ +From [this change](https://github.com/odoo/odoo/pull/130275) a Point of Sale user +who needs to perform cash control operations *Accounting/Billing* permission is required. +That's a huge permission for the kind of user that only does cashing machine operations. + +We're recovering the former behavior present in previous versions. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/CONTRIBUTORS.md b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..3a16ddf --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- [Tecnativa](https://tecnativa.com) + - David Vidal diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/DESCRIPTION.md b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/DESCRIPTION.md new file mode 100644 index 0000000..58e2a99 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module restores the permissions requisites for Point of Sale users to perform +cash operations in their sessions. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/ROADMAP.md b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/ROADMAP.md new file mode 100644 index 0000000..e3f025a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/ROADMAP.md @@ -0,0 +1,2 @@ +- This module will be unnecessary if https://github.com/odoo/odoo/pull/188798 gets + merged or the former permissions paradigm is restored in any other way. diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/USAGE.md b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/USAGE.md new file mode 100644 index 0000000..a2859d4 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/readme/USAGE.md @@ -0,0 +1,5 @@ +After this module is installed: + +1. Choose a user with *Point of Sale/User* permissions but no *Accounting/Billing* permission. +2. Open a session in a Point of Sale with cash control active. +3. You'll be able to do any of the cash control operations (cash in / out). diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/static/description/icon.png b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/static/description/icon.png differ diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/static/description/index.html b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/static/description/index.html new file mode 100644 index 0000000..85df00a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/static/description/index.html @@ -0,0 +1,457 @@ + + + + + +Point of sale cash control override + + + +
+

Point of sale cash control override

+ + +

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

+

This module restores the permissions requisites for Point of Sale users +to perform cash operations in their sessions.

+

Table of contents

+ +
+

Use Cases / Context

+

From this change a Point +of Sale user who needs to perform cash control operations +Accounting/Billing permission is required. That’s a huge permission +for the kind of user that only does cashing machine operations.

+

We’re recovering the former behavior present in previous versions.

+
+
+

Usage

+

After this module is installed:

+
    +
  1. Choose a user with Point of Sale/User permissions but no +Accounting/Billing permission.
  2. +
  3. Open a session in a Point of Sale with cash control active.
  4. +
  5. You’ll be able to do any of the cash control operations (cash in / +out).
  6. +
+
+
+

Known issues / Roadmap

+ +
+
+

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

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

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.

+

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/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/tests/__init__.py b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/tests/__init__.py new file mode 100644 index 0000000..ab211c0 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/tests/__init__.py @@ -0,0 +1 @@ +from . import test_frontend diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/tests/test_frontend.py b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/tests/test_frontend.py new file mode 100644 index 0000000..536a0f6 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pos_cash_control_override/tests/test_frontend.py @@ -0,0 +1,29 @@ +# Copyright 2024 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import Command +from odoo.tests import tagged + +from odoo.addons.point_of_sale.tests.test_frontend import TestPointOfSaleHttpCommon + + +@tagged("post_install", "-at_install") +class TestUi(TestPointOfSaleHttpCommon): + def test_chrome_without_accounting_permission(self): + self.env.user.write( + { + "groups_id": [ + Command.set( + [ + self.env.ref("base.group_user").id, + self.env.ref("point_of_sale.group_pos_user").id, + ] + ) + ] + } + ) + self.main_pos_config.open_ui() + self.start_tour( + "/pos/ui?config_id=%d" % self.main_pos_config.id, + "ChromeTour", + login="accountman", + ) diff --git a/odoo-bringout-oca-pos-pos_cash_control_override/pyproject.toml b/odoo-bringout-oca-pos-pos_cash_control_override/pyproject.toml new file mode 100644 index 0000000..c6886cb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_cash_control_override/pyproject.toml @@ -0,0 +1,42 @@ +[project] +name = "odoo-bringout-oca-pos-pos_cash_control_override" +version = "16.0.0" +description = "Point of sale cash control override - Override bare PoS user cash control restrictions" +authors = [ + { name = "Ernad Husremovic", email = "hernad@bring.out.ba" } +] +dependencies = [ + "odoo-bringout-oca-ocb-point_of_sale>=16.0.0", + "requests>=2.25.1" +] +readme = "README.md" +requires-python = ">= 3.11" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Office/Business", +] + +[project.urls] +homepage = "https://github.com/bringout/0" +repository = "https://github.com/bringout/0" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["pos_cash_control_override"] + +[tool.rye] +managed = true +dev-dependencies = [ + "pytest>=8.4.1", +] diff --git a/odoo-bringout-oca-pos-pos_config_logo/README.md b/odoo-bringout-oca-pos-pos_config_logo/README.md new file mode 100644 index 0000000..639adc5 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/README.md @@ -0,0 +1,46 @@ +# Point of sale logo + +Odoo addon: pos_config_logo + +## Installation + +```bash +pip install odoo-bringout-oca-pos-pos_config_logo +``` + +## Dependencies + +This addon depends on: +- point_of_sale + +## Manifest Information + +- **Name**: Point of sale logo +- **Version**: 16.0.1.0.0 +- **Category**: Point of Sale +- **License**: AGPL-3 +- **Installable**: True + +## Source + +Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_config_logo`. + +## License + +This package maintains the original AGPL-3 license from the upstream Odoo project. + +## Documentation + +- Overview: doc/OVERVIEW.md +- Architecture: doc/ARCHITECTURE.md +- Models: doc/MODELS.md +- Controllers: doc/CONTROLLERS.md +- Wizards: doc/WIZARDS.md +- Reports: doc/REPORTS.md +- Security: doc/SECURITY.md +- Install: doc/INSTALL.md +- Usage: doc/USAGE.md +- Configuration: doc/CONFIGURATION.md +- Dependencies: doc/DEPENDENCIES.md +- Troubleshooting: doc/TROUBLESHOOTING.md +- FAQ: doc/FAQ.md diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/ARCHITECTURE.md b/odoo-bringout-oca-pos-pos_config_logo/doc/ARCHITECTURE.md new file mode 100644 index 0000000..a6b3c57 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/ARCHITECTURE.md @@ -0,0 +1,32 @@ +# Architecture + +```mermaid +flowchart TD + U[Users] -->|HTTP| V[Views and QWeb Templates] + V --> C[Controllers] + V --> W[Wizards – Transient Models] + C --> M[Models and ORM] + W --> M + M --> R[Reports] + DX[Data XML] --> M + S[Security – ACLs and Groups] -. enforces .-> M + + subgraph Pos_config_logo Module - pos_config_logo + direction LR + M:::layer + W:::layer + C:::layer + V:::layer + R:::layer + S:::layer + DX:::layer + end + + classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px +``` + +Notes +- Views include tree/form/kanban templates and report templates. +- Controllers provide website/portal routes when present. +- Wizards are UI flows implemented with `models.TransientModel`. +- Data XML loads data/demo records; Security defines groups and access. diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/CONFIGURATION.md b/odoo-bringout-oca-pos-pos_config_logo/doc/CONFIGURATION.md new file mode 100644 index 0000000..dbd72bc --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/CONFIGURATION.md @@ -0,0 +1,3 @@ +# Configuration + +Refer to Odoo settings for pos_config_logo. Configure related models, access rights, and options as needed. diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/CONTROLLERS.md b/odoo-bringout-oca-pos-pos_config_logo/doc/CONTROLLERS.md new file mode 100644 index 0000000..f628e77 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/CONTROLLERS.md @@ -0,0 +1,3 @@ +# Controllers + +This module does not define custom HTTP controllers. diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/DEPENDENCIES.md b/odoo-bringout-oca-pos-pos_config_logo/doc/DEPENDENCIES.md new file mode 100644 index 0000000..9dfe640 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/DEPENDENCIES.md @@ -0,0 +1,5 @@ +# Dependencies + +This addon depends on: + +- [point_of_sale](https://github.com/bringout/oca-ocb-sale/tree/681dc8d5fff638cb0862a34e48091a2098d091f8/odoo-bringout-oca-ocb-point_of_sale) diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/FAQ.md b/odoo-bringout-oca-pos-pos_config_logo/doc/FAQ.md new file mode 100644 index 0000000..66d5394 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/FAQ.md @@ -0,0 +1,4 @@ +# FAQ + +- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged). +- Q: How to enable? A: Start server with --addon pos_config_logo or install in UI. diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/INSTALL.md b/odoo-bringout-oca-pos-pos_config_logo/doc/INSTALL.md new file mode 100644 index 0000000..311ec29 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/INSTALL.md @@ -0,0 +1,7 @@ +# Install + +```bash +pip install odoo-bringout-oca-pos-pos_config_logo" +# or +uv pip install odoo-bringout-oca-pos-pos_config_logo" +``` diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/MODELS.md b/odoo-bringout-oca-pos-pos_config_logo/doc/MODELS.md new file mode 100644 index 0000000..e09b5ec --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/MODELS.md @@ -0,0 +1,13 @@ +# Models + +Detected core models and extensions in pos_config_logo. + +```mermaid +classDiagram + class pos_config + class res_config_settings +``` + +Notes +- Classes show model technical names; fields omitted for brevity. +- Items listed under _inherit are extensions of existing models. diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/OVERVIEW.md b/odoo-bringout-oca-pos-pos_config_logo/doc/OVERVIEW.md new file mode 100644 index 0000000..c94c2be --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/OVERVIEW.md @@ -0,0 +1,6 @@ +# Overview + +Packaged Odoo addon: pos_config_logo. Provides features documented in upstream Odoo 16 under this addon. + +- Source: OCA/OCB 16.0, addon pos_config_logo +- License: LGPL-3 diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/REPORTS.md b/odoo-bringout-oca-pos-pos_config_logo/doc/REPORTS.md new file mode 100644 index 0000000..e0ea35f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/REPORTS.md @@ -0,0 +1,3 @@ +# Reports + +This module does not define custom reports. diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/SECURITY.md b/odoo-bringout-oca-pos-pos_config_logo/doc/SECURITY.md new file mode 100644 index 0000000..e07da9d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/SECURITY.md @@ -0,0 +1,8 @@ +# Security + +This module does not define custom security rules or access controls beyond Odoo defaults. + +Default Odoo security applies: +- Base user access through standard groups +- Model access inherited from dependencies +- No custom row-level security rules diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/TROUBLESHOOTING.md b/odoo-bringout-oca-pos-pos_config_logo/doc/TROUBLESHOOTING.md new file mode 100644 index 0000000..56853cb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/TROUBLESHOOTING.md @@ -0,0 +1,5 @@ +# Troubleshooting + +- Ensure Python and Odoo environment matches repo guidance. +- Check database connectivity and logs if startup fails. +- Validate that dependent addons listed in DEPENDENCIES.md are installed. diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/USAGE.md b/odoo-bringout-oca-pos-pos_config_logo/doc/USAGE.md new file mode 100644 index 0000000..30b94a1 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/USAGE.md @@ -0,0 +1,7 @@ +# Usage + +Start Odoo including this addon (from repo root): + +```bash +python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_config_logo +``` diff --git a/odoo-bringout-oca-pos-pos_config_logo/doc/WIZARDS.md b/odoo-bringout-oca-pos-pos_config_logo/doc/WIZARDS.md new file mode 100644 index 0000000..48e790d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/doc/WIZARDS.md @@ -0,0 +1,3 @@ +# Wizards + +This module does not include UI wizards. diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/README.rst b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/README.rst new file mode 100644 index 0000000..39721c9 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/README.rst @@ -0,0 +1,105 @@ +================== +Point of sale logo +================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:a46f588741e2e614e704b6d09afcfef2771443c7d94642035b8a9047ea97bebd + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_config_logo + :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_config_logo + :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 allows to configure a point of sale logo per config to +override the company one. + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +This module is useful for a company that runs stores with different +brandings. To have a logo from the main branch is weird for the customer +of those branded stores. + +Configuration +============= + +To configure this module, you need to: + +- Go to *Point of sale > Configuration > Settings* +- Select the point of sale for which you wish to change the logo. +- Set the *Alternative point of sale logo* setting on and upload the + desired logo. + +From now on, that point of sale will print that logo, while the others +will print the company one. + +Usage +===== + +When the cashier prints a receipt the point of sale logo will show up in +the receipt. + +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 +------- + +* Tecnativa + +Contributors +------------ + +- `Tecnativa `__ + + - David Vidal + +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. + +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/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/__init__.py b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/__manifest__.py b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/__manifest__.py new file mode 100644 index 0000000..3eb829f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2024 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Point of sale logo", + "summary": "Set logotypes different from the company's one", + "version": "16.0.1.0.0", + "category": "Point of Sale", + "author": "Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": [ + "point_of_sale", + ], + "data": [ + "views/res_config_settings_views.xml", + ], + "assets": { + "point_of_sale.assets": [ + "pos_config_logo/static/src/js/**/*.js", + ], + }, + "installable": True, +} diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/i18n/bs.po b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/i18n/bs.po new file mode 100644 index 0000000..75d6349 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/i18n/bs.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_config_logo +# +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_config_logo +#: model_terms:ir.ui.view,arch_db:pos_config_logo.res_config_settings_view_form +msgid "Alternative point of sale logo" +msgstr "Alternative point of sale logo" + +#. module: pos_config_logo +#: model:ir.model,name:pos_config_logo.model_res_config_settings +msgid "Config Settings" +msgstr "Postavke" + +#. module: pos_config_logo +#: model:ir.model.fields,field_description:pos_config_logo.field_res_config_settings__has_pos_config_logo +msgid "Has Pos Config Logo" +msgstr "Has Pos Config Logo" + +#. module: pos_config_logo +#: model_terms:ir.ui.view,arch_db:pos_config_logo.res_config_settings_view_form +msgid "If set, this logo will be used instead of the company's one" +msgstr "If set, this logo will be used instead of the company's one" + +#. module: pos_config_logo +#: model:ir.model.fields,field_description:pos_config_logo.field_pos_config__logo +#: model:ir.model.fields,field_description:pos_config_logo.field_res_config_settings__pos_config_logo +msgid "Logo" +msgstr "Logo" + +#. module: pos_config_logo +#: model:ir.model,name:pos_config_logo.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Postavke prodajnog mjesta" + +#. module: pos_config_logo +#: model:ir.model.fields,help:pos_config_logo.field_res_config_settings__has_pos_config_logo +msgid "Use an alternative logo for this store" +msgstr "Use an alternative logo for this store" diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/i18n/it.po b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/i18n/it.po new file mode 100644 index 0000000..22d242b --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/i18n/it.po @@ -0,0 +1,53 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_config_logo +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-07-22 08:58+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 5.6.2\n" + +#. module: pos_config_logo +#: model_terms:ir.ui.view,arch_db:pos_config_logo.res_config_settings_view_form +msgid "Alternative point of sale logo" +msgstr "Logo alternativo punto vendita" + +#. module: pos_config_logo +#: model:ir.model,name:pos_config_logo.model_res_config_settings +msgid "Config Settings" +msgstr "Impostazioni configurazione" + +#. module: pos_config_logo +#: model:ir.model.fields,field_description:pos_config_logo.field_res_config_settings__has_pos_config_logo +msgid "Has Pos Config Logo" +msgstr "Ha logo configurazione POS" + +#. module: pos_config_logo +#: model_terms:ir.ui.view,arch_db:pos_config_logo.res_config_settings_view_form +msgid "If set, this logo will be used instead of the company's one" +msgstr "Se impostato, questo logo verrà utilizzato al posto di quello aziendale" + +#. module: pos_config_logo +#: model:ir.model.fields,field_description:pos_config_logo.field_pos_config__logo +#: model:ir.model.fields,field_description:pos_config_logo.field_res_config_settings__pos_config_logo +msgid "Logo" +msgstr "Logo" + +#. module: pos_config_logo +#: model:ir.model,name:pos_config_logo.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configurazione punto vendita" + +#. module: pos_config_logo +#: model:ir.model.fields,help:pos_config_logo.field_res_config_settings__has_pos_config_logo +msgid "Use an alternative logo for this store" +msgstr "Utilizza un logo alternativo per questo negozio" diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/__init__.py b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/__init__.py new file mode 100644 index 0000000..2b92809 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/__init__.py @@ -0,0 +1,2 @@ +from . import pos_config +from . import res_config_settings diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/pos_config.py b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/pos_config.py new file mode 100644 index 0000000..0124a18 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/pos_config.py @@ -0,0 +1,9 @@ +# Copyright 2024 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class PosConfig(models.Model): + _inherit = "pos.config" + + logo = fields.Binary() diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/res_config_settings.py b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/res_config_settings.py new file mode 100644 index 0000000..a4709f6 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/models/res_config_settings.py @@ -0,0 +1,24 @@ +# Copyright 2024 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + pos_config_logo = fields.Image(related="pos_config_id.logo", readonly=False) + has_pos_config_logo = fields.Boolean( + help="Use an alternative logo for this store", + compute="_compute_has_pos_config_logo", + inverse="_inverse_has_pos_config_logo", + ) + + @api.depends("pos_config_id") + def _compute_has_pos_config_logo(self): + for config in self: + config.has_pos_config_logo = bool(config.pos_config_logo) + + def _inverse_has_pos_config_logo(self): + for config in self: + if not config.has_pos_config_logo: + config.pos_config_logo = False diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONFIGURE.md b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONFIGURE.md new file mode 100644 index 0000000..cf1150c --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONFIGURE.md @@ -0,0 +1,8 @@ +To configure this module, you need to: + +- Go to *Point of sale > Configuration > Settings* +- Select the point of sale for which you wish to change the logo. +- Set the *Alternative point of sale logo* setting on and upload the desired logo. + +From now on, that point of sale will print that logo, while the others will print the +company one. diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONTEXT.md b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONTEXT.md new file mode 100644 index 0000000..c51aba7 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONTEXT.md @@ -0,0 +1,2 @@ +This module is useful for a company that runs stores with different brandings. To have +a logo from the main branch is weird for the customer of those branded stores. diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONTRIBUTORS.md b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..3a16ddf --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- [Tecnativa](https://tecnativa.com) + - David Vidal diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/DESCRIPTION.md b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/DESCRIPTION.md new file mode 100644 index 0000000..105d766 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module allows to configure a point of sale logo per config to override the company +one. diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/USAGE.md b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/USAGE.md new file mode 100644 index 0000000..f782ee1 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/readme/USAGE.md @@ -0,0 +1 @@ +When the cashier prints a receipt the point of sale logo will show up in the receipt. diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/description/icon.png b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/description/icon.png differ diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/description/index.html b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/description/index.html new file mode 100644 index 0000000..6b8a4b4 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/description/index.html @@ -0,0 +1,453 @@ + + + + + +Point of sale logo + + + + + + diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/src/js/models.esm.js b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/src/js/models.esm.js new file mode 100644 index 0000000..103787d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/static/src/js/models.esm.js @@ -0,0 +1,73 @@ +/** @odoo-module **/ +import {Order, PosGlobalState} from "point_of_sale.models"; +import Registries from "point_of_sale.Registries"; + +export const ConfigImagePosGlobalState = (OriginalPosGlobalState) => + class extends OriginalPosGlobalState { + /** + * @override + */ + constructor() { + super(...arguments); + this.config_logo = null; + this.config_logo_base64 = ""; + } + /** + * Replicate the picture load of the company logo for the config logo + * @override + * @returns {undefined} The promise is resolved in place + */ + async _loadPictures() { + await super._loadPictures(...arguments); + this.config_logo = new Image(); + return new Promise((resolve, reject) => { + this.config_logo.onload = () => { + const img = this.config_logo; + let ratio = 1; + const targetwidth = 300; + const maxheight = 150; + if (img.width !== targetwidth) { + ratio = targetwidth / img.width; + } + if (img.height * ratio > maxheight) { + ratio = maxheight / img.height; + } + const width = Math.floor(img.width * ratio); + const height = Math.floor(img.height * ratio); + const c = document.createElement("canvas"); + c.width = width; + c.height = height; + const ctx = c.getContext("2d"); + ctx.drawImage(this.config_logo, 0, 0, width, height); + + this.config_logo_base64 = c.toDataURL(); + resolve(); + }; + this.config_logo.onerror = () => { + reject(); + }; + this.config_logo.crossOrigin = "anonymous"; + this.config_logo.src = `/web/image?model=pos.config&id=${this.config.id}&field=logo`; + }); + } + }; + +Registries.Model.extend(PosGlobalState, ConfigImagePosGlobalState); + +const ConfigImageOrder = (OriginalOrder) => + class extends OriginalOrder { + /** + * @override + * Switch to the config logo if it's available + * @returns {Object} receipt + */ + export_for_printing() { + const receipt = super.export_for_printing(...arguments); + if (this.pos.config.logo) { + receipt.company.logo = this.pos.config_logo_base64; + } + return receipt; + } + }; + +Registries.Model.extend(Order, ConfigImageOrder); diff --git a/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/views/res_config_settings_views.xml b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/views/res_config_settings_views.xml new file mode 100644 index 0000000..e2b3615 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pos_config_logo/views/res_config_settings_views.xml @@ -0,0 +1,31 @@ + + + + res.config.settings + + +
+
+
+ +
+
+
+
+
+
+
+
diff --git a/odoo-bringout-oca-pos-pos_config_logo/pyproject.toml b/odoo-bringout-oca-pos-pos_config_logo/pyproject.toml new file mode 100644 index 0000000..0da2789 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_config_logo/pyproject.toml @@ -0,0 +1,42 @@ +[project] +name = "odoo-bringout-oca-pos-pos_config_logo" +version = "16.0.0" +description = "Point of sale logo - Set logotypes different from the company's one" +authors = [ + { name = "Ernad Husremovic", email = "hernad@bring.out.ba" } +] +dependencies = [ + "odoo-bringout-oca-ocb-point_of_sale>=16.0.0", + "requests>=2.25.1" +] +readme = "README.md" +requires-python = ">= 3.11" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Office/Business", +] + +[project.urls] +homepage = "https://github.com/bringout/0" +repository = "https://github.com/bringout/0" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["pos_config_logo"] + +[tool.rye] +managed = true +dev-dependencies = [ + "pytest>=8.4.1", +] diff --git a/odoo-bringout-oca-pos-pos_container_deposit/README.md b/odoo-bringout-oca-pos-pos_container_deposit/README.md new file mode 100644 index 0000000..7955900 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/README.md @@ -0,0 +1,46 @@ +# POS Container Deposit + +Odoo addon: pos_container_deposit + +## Installation + +```bash +pip install odoo-bringout-oca-pos-pos_container_deposit +``` + +## Dependencies + +This addon depends on: +- point_of_sale + +## Manifest Information + +- **Name**: POS Container Deposit +- **Version**: 16.0.1.0.0 +- **Category**: Point of Sale +- **License**: AGPL-3 +- **Installable**: True + +## Source + +Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_container_deposit`. + +## License + +This package maintains the original AGPL-3 license from the upstream Odoo project. + +## Documentation + +- Overview: doc/OVERVIEW.md +- Architecture: doc/ARCHITECTURE.md +- Models: doc/MODELS.md +- Controllers: doc/CONTROLLERS.md +- Wizards: doc/WIZARDS.md +- Reports: doc/REPORTS.md +- Security: doc/SECURITY.md +- Install: doc/INSTALL.md +- Usage: doc/USAGE.md +- Configuration: doc/CONFIGURATION.md +- Dependencies: doc/DEPENDENCIES.md +- Troubleshooting: doc/TROUBLESHOOTING.md +- FAQ: doc/FAQ.md diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/ARCHITECTURE.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/ARCHITECTURE.md new file mode 100644 index 0000000..68151f5 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/ARCHITECTURE.md @@ -0,0 +1,32 @@ +# Architecture + +```mermaid +flowchart TD + U[Users] -->|HTTP| V[Views and QWeb Templates] + V --> C[Controllers] + V --> W[Wizards – Transient Models] + C --> M[Models and ORM] + W --> M + M --> R[Reports] + DX[Data XML] --> M + S[Security – ACLs and Groups] -. enforces .-> M + + subgraph Pos_container_deposit Module - pos_container_deposit + direction LR + M:::layer + W:::layer + C:::layer + V:::layer + R:::layer + S:::layer + DX:::layer + end + + classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px +``` + +Notes +- Views include tree/form/kanban templates and report templates. +- Controllers provide website/portal routes when present. +- Wizards are UI flows implemented with `models.TransientModel`. +- Data XML loads data/demo records; Security defines groups and access. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/CONFIGURATION.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/CONFIGURATION.md new file mode 100644 index 0000000..fec8571 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/CONFIGURATION.md @@ -0,0 +1,3 @@ +# Configuration + +Refer to Odoo settings for pos_container_deposit. Configure related models, access rights, and options as needed. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/CONTROLLERS.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/CONTROLLERS.md new file mode 100644 index 0000000..f628e77 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/CONTROLLERS.md @@ -0,0 +1,3 @@ +# Controllers + +This module does not define custom HTTP controllers. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/DEPENDENCIES.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/DEPENDENCIES.md new file mode 100644 index 0000000..9dfe640 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/DEPENDENCIES.md @@ -0,0 +1,5 @@ +# Dependencies + +This addon depends on: + +- [point_of_sale](https://github.com/bringout/oca-ocb-sale/tree/681dc8d5fff638cb0862a34e48091a2098d091f8/odoo-bringout-oca-ocb-point_of_sale) diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/FAQ.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/FAQ.md new file mode 100644 index 0000000..dd70993 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/FAQ.md @@ -0,0 +1,4 @@ +# FAQ + +- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged). +- Q: How to enable? A: Start server with --addon pos_container_deposit or install in UI. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/INSTALL.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/INSTALL.md new file mode 100644 index 0000000..639d891 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/INSTALL.md @@ -0,0 +1,7 @@ +# Install + +```bash +pip install odoo-bringout-oca-pos-pos_container_deposit" +# or +uv pip install odoo-bringout-oca-pos-pos_container_deposit" +``` diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/MODELS.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/MODELS.md new file mode 100644 index 0000000..e4a9609 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/MODELS.md @@ -0,0 +1,14 @@ +# Models + +Detected core models and extensions in pos_container_deposit. + +```mermaid +classDiagram + class pos_session + class product_product + class product_template +``` + +Notes +- Classes show model technical names; fields omitted for brevity. +- Items listed under _inherit are extensions of existing models. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/OVERVIEW.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/OVERVIEW.md new file mode 100644 index 0000000..1cfecce --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/OVERVIEW.md @@ -0,0 +1,6 @@ +# Overview + +Packaged Odoo addon: pos_container_deposit. Provides features documented in upstream Odoo 16 under this addon. + +- Source: OCA/OCB 16.0, addon pos_container_deposit +- License: LGPL-3 diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/REPORTS.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/REPORTS.md new file mode 100644 index 0000000..e0ea35f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/REPORTS.md @@ -0,0 +1,3 @@ +# Reports + +This module does not define custom reports. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/SECURITY.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/SECURITY.md new file mode 100644 index 0000000..e07da9d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/SECURITY.md @@ -0,0 +1,8 @@ +# Security + +This module does not define custom security rules or access controls beyond Odoo defaults. + +Default Odoo security applies: +- Base user access through standard groups +- Model access inherited from dependencies +- No custom row-level security rules diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/TROUBLESHOOTING.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/TROUBLESHOOTING.md new file mode 100644 index 0000000..56853cb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/TROUBLESHOOTING.md @@ -0,0 +1,5 @@ +# Troubleshooting + +- Ensure Python and Odoo environment matches repo guidance. +- Check database connectivity and logs if startup fails. +- Validate that dependent addons listed in DEPENDENCIES.md are installed. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/USAGE.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/USAGE.md new file mode 100644 index 0000000..8d7d4a2 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/USAGE.md @@ -0,0 +1,7 @@ +# Usage + +Start Odoo including this addon (from repo root): + +```bash +python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_container_deposit +``` diff --git a/odoo-bringout-oca-pos-pos_container_deposit/doc/WIZARDS.md b/odoo-bringout-oca-pos-pos_container_deposit/doc/WIZARDS.md new file mode 100644 index 0000000..48e790d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/doc/WIZARDS.md @@ -0,0 +1,3 @@ +# Wizards + +This module does not include UI wizards. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/README.rst b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/README.rst new file mode 100644 index 0000000..c09b399 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/README.rst @@ -0,0 +1,117 @@ +===================== +POS Container Deposit +===================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:32a0d00fa71650c51313d74e5b39e1bbec3b17934e275fd3b2e875411d4422f4 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_container_deposit + :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_container_deposit + :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 allows the use of deposit products for PoS products. + +An example of such a deposit product would be a bottle of cola, where the bottle is +being sold for an extra 25 cents, which you get back when you bring the bottle back to +the store intact. Whenever the cola is added to a PoS order, the bottle is added too. +If the cola quantity changes, the bottle quantity will change as well. + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +Note there are several implementations of the concept of deposits with varying degrees of complexity: + +- `product_packaging_container_deposit `_ +- `pos_product_pack `_ + +This module focusses on simplicity for users who don't want to get into packaging. + +Configuration +============= + +To configure this module, you need to go to *Point of Sale > Products*. + +#. Select or add at least one 'deposit product', such as 'Bottle 1L', + with a non-zero price and with the checkbox 'Is Deposit' set to True. + +#. Select or add at least one product of which 'Use Deposit' is checked, + such as '1 liter of cola'. In the accompanying product selection field, + select the bottle. The two products are now linked. + +Usage +===== + +To use this module, open a POS session and: + +#. When a deposit product (eg. cola) is added, the bottle is added to the + order as well and the quantities are kept in sync. + +#. When someone brings back bottles to the store, you can just add a bottle + and enter a negative sale quantity, thus refunding the bottle. + +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 +~~~~~~~ + +* Sunflower IT +* Open2bizz + +Contributors +~~~~~~~~~~~~ + +Tom Blauwendraat +Holger Brunn (https://hunki-enterprises.com) +Stefan Rijnhart + +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. + +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/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/__init__.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/__manifest__.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/__manifest__.py new file mode 100644 index 0000000..9c48c2a --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/__manifest__.py @@ -0,0 +1,26 @@ +{ + "name": "POS Container Deposit", + "version": "16.0.1.0.0", + "category": "Point of Sale", + "summary": "This module is used to manage container deposits for products" + " in Point of Sale.", + "author": "Sunflower IT, Open2bizz, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": ["point_of_sale"], + "data": [ + "views/product_template.xml", + ], + "demo": [ + "demo/product_product.xml", + ], + "assets": { + "web.assets_tests": [ + "pos_container_deposit/static/tests/tours/*.js", + ], + "point_of_sale.assets": [ + "pos_container_deposit/static/src/js/*.js", + ], + }, + "installable": True, +} diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/demo/product_product.xml b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/demo/product_product.xml new file mode 100644 index 0000000..415dc42 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/demo/product_product.xml @@ -0,0 +1,17 @@ + + + + Bottle deposit .25 + + + + 0.25 + + + Generic sugar liquid + + + + 1.75 + + diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/bs.po b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/bs.po new file mode 100644 index 0000000..6b38080 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/bs.po @@ -0,0 +1,85 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_container_deposit +# +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_container_deposit +#: model:product.template,name:pos_container_deposit.demo_deposit_product_product_template +msgid "Bottle deposit .25" +msgstr "Bottle deposit .25" + +#. module: pos_container_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_product__is_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_template__is_deposit +msgid "Check this if this product is a container for which you charge deposit" +msgstr "Check this if this product is a container for which you charge deposit" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_product__deposit_product_id +msgid "Deposit" +msgstr "Polog" + +#. module: pos_container_deposit +#. odoo-javascript +#: code:addons/pos_container_deposit/static/src/js/models.js:0 +#, python-format +msgid "Deposit not available" +msgstr "Deposit not available" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_template__deposit_product_id +msgid "Deposit product" +msgstr "Deposit product" + +#. module: pos_container_deposit +#: model:product.template,name:pos_container_deposit.demo_product_product_template +msgid "Generic sugar liquid" +msgstr "Generic sugar liquid" + +#. module: pos_container_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_product__deposit_product_id +#: model:ir.model.fields,help:pos_container_deposit.field_product_template__deposit_product_id +msgid "" +"If this product is packaged in a container for which you charge deposit, add" +" a product here that stands for the deposit" +msgstr "" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_product__is_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_template__is_deposit +msgid "Is Deposit" +msgstr "Is Deposit" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_pos_session +msgid "Point of Sale Session" +msgstr "Sesija POS-a" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_product_template +msgid "Product" +msgstr "Artikal" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_product_product +msgid "Product Variant" +msgstr "Varijanta proizvoda" + +#. module: pos_container_deposit +#. odoo-javascript +#: code:addons/pos_container_deposit/static/src/js/models.js:0 +#, python-format +msgid "" +"The product %s is configured as having a deposit but the deposit product %s " +"is not available in POS." +msgstr "" diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/it.po b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/it.po new file mode 100644 index 0000000..1634f68 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/it.po @@ -0,0 +1,94 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_container_deposit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-02-03 22:06+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 5.6.2\n" + +#. module: pos_container_deposit +#: model:product.template,name:pos_container_deposit.demo_deposit_product_product_template +msgid "Bottle deposit .25" +msgstr "Cauzione bottiglia .25" + +#. module: pos_container_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_product__is_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_template__is_deposit +msgid "Check this if this product is a container for which you charge deposit" +msgstr "" +"Selezionare se questo prodotto è un contenitore per il quale si applica una " +"cauzione" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_product__deposit_product_id +msgid "Deposit" +msgstr "Deposito" + +#. module: pos_container_deposit +#. odoo-javascript +#: code:addons/pos_container_deposit/static/src/js/models.js:0 +#, python-format +msgid "Deposit not available" +msgstr "Deposito non disponibile" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_template__deposit_product_id +msgid "Deposit product" +msgstr "Prodotto deposito" + +#. module: pos_container_deposit +#: model:product.template,name:pos_container_deposit.demo_product_product_template +msgid "Generic sugar liquid" +msgstr "Liquido dolcificante generico" + +#. module: pos_container_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_product__deposit_product_id +#: model:ir.model.fields,help:pos_container_deposit.field_product_template__deposit_product_id +msgid "" +"If this product is packaged in a container for which you charge deposit, add" +" a product here that stands for the deposit" +msgstr "" +"Se questo prodotto è imballato in un contenitore per il quale si applica una " +"cauzione, aggiungere qui un prodotto per la cauzione" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_product__is_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_template__is_deposit +msgid "Is Deposit" +msgstr "È una cauzione" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_pos_session +msgid "Point of Sale Session" +msgstr "Sessione punto vendita" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_product_template +msgid "Product" +msgstr "Prodotto" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_product_product +msgid "Product Variant" +msgstr "Variante prodotto" + +#. module: pos_container_deposit +#. odoo-javascript +#: code:addons/pos_container_deposit/static/src/js/models.js:0 +#, python-format +msgid "" +"The product %s is configured as having a deposit but the deposit product %s " +"is not available in POS." +msgstr "" +"Il prodotto %s è configurato con una cauzione ma il prodotto cauzione %s non " +"è disponibile nel POS." diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/nl.po b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/nl.po new file mode 100644 index 0000000..8339087 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/i18n/nl.po @@ -0,0 +1,94 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_container_deposit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-04-07 08:23+0000\n" +"PO-Revision-Date: 2015-12-07 14:46+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_container_deposit +#: model:product.template,name:pos_container_deposit.demo_deposit_product_product_template +msgid "Bottle deposit .25" +msgstr "" + +#. module: pos_container_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_product__is_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_template__is_deposit +msgid "Check this if this product is a container for which you charge deposit" +msgstr "" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_product__deposit_product_id +#, fuzzy +msgid "Deposit" +msgstr "Statiegeld" + +#. module: pos_container_deposit +#. odoo-javascript +#: code:addons/pos_container_deposit/static/src/js/models.js:0 +#, python-format +msgid "Deposit not available" +msgstr "" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_template__deposit_product_id +msgid "Deposit product" +msgstr "" + +#. module: pos_container_deposit +#: model:product.template,name:pos_container_deposit.demo_product_product_template +msgid "Generic sugar liquid" +msgstr "" + +#. module: pos_container_deposit +#: model:ir.model.fields,help:pos_container_deposit.field_product_product__deposit_product_id +#: model:ir.model.fields,help:pos_container_deposit.field_product_template__deposit_product_id +msgid "" +"If this product is packaged in a container for which you charge deposit, add " +"a product here that stands for the deposit" +msgstr "" + +#. module: pos_container_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_product__is_deposit +#: model:ir.model.fields,field_description:pos_container_deposit.field_product_template__is_deposit +msgid "Is Deposit" +msgstr "" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_pos_session +msgid "Point of Sale Session" +msgstr "" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_product_template +#, fuzzy +msgid "Product" +msgstr "Productsjabloon" + +#. module: pos_container_deposit +#: model:ir.model,name:pos_container_deposit.model_product_product +#, fuzzy +msgid "Product Variant" +msgstr "Productsjabloon" + +#. module: pos_container_deposit +#. odoo-javascript +#: code:addons/pos_container_deposit/static/src/js/models.js:0 +#, python-format +msgid "" +"The product %s is configured as having a deposit but the deposit product %s " +"is not available in POS." +msgstr "" + +#~ msgid "Select Deposit" +#~ msgstr "Statiegeldproduct" diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/__init__.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/__init__.py new file mode 100644 index 0000000..7d613c7 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/__init__.py @@ -0,0 +1,3 @@ +from . import pos_session +from . import product_product +from . import product_template diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/pos_session.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/pos_session.py new file mode 100644 index 0000000..cb6f874 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/pos_session.py @@ -0,0 +1,13 @@ +from odoo import models + + +class PosSession(models.Model): + _inherit = "pos.session" + + def _loader_params_product_product(self): + """ + Load all deposit products and add deposit related fields + """ + result = super()._loader_params_product_product() + result["search_params"]["fields"] += ["deposit_product_id", "is_deposit"] + return result diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/product_product.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/product_product.py new file mode 100644 index 0000000..d6eb0f9 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/product_product.py @@ -0,0 +1,16 @@ +# Copyright 2021 Sunflower IT +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ProductProduct(models.Model): + _inherit = "product.product" + + deposit_product_id = fields.Many2one( + "product.product", + "Deposit", + domain=[("is_deposit", "!=", False)], + help="If this product is packaged in a container for which you charge deposit, " + "add a product here that stands for the deposit", + ) diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/product_template.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/product_template.py new file mode 100644 index 0000000..7e5df0d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/models/product_template.py @@ -0,0 +1,58 @@ +# Copyright 2024 Hunki Enterprises BV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + is_deposit = fields.Boolean( + help="Check this if this product is a container for which you charge deposit", + ) + deposit_product_id = fields.Many2one( + "product.product", + "Deposit product", + domain=[("is_deposit", "!=", False)], + help="If this product is packaged in a container for which you charge deposit, " + "add a product here that stands for the deposit", + compute="_compute_deposit_product_id", + inverse="_inverse_deposit_product_id", + search="_search_deposit_product_id", + ) + + @api.depends("product_variant_ids.deposit_product_id") + def _compute_deposit_product_id(self): + for this in self: + this.deposit_product_id = ( + this.product_variant_ids.deposit_product_id + if this.product_variant_count == 1 + else False + ) + + def _inverse_deposit_product_id(self): + for this in self: + if this.product_variant_count > 1: + continue + this.product_variant_ids.write( + { + "deposit_product_id": this.deposit_product_id, + } + ) + + def _search_deposit_product_id(self, operator, value): + return [("product_variant_ids.deposit_product_id", operator, value)] + + def copy(self, default=None): + """ + Take care that copies include the deposit product + """ + if default is None: + default = {} + default.setdefault("deposit_product_id", self.deposit_product_id.id) + return super().copy(default=default) + + def _get_related_fields_variant_template(self): + result = super()._get_related_fields_variant_template() + result.append("deposit_product_id") + return result diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONFIGURE.rst b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONFIGURE.rst new file mode 100644 index 0000000..e9b450b --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONFIGURE.rst @@ -0,0 +1,8 @@ +To configure this module, you need to go to *Point of Sale > Products*. + +#. Select or add at least one 'deposit product', such as 'Bottle 1L', + with a non-zero price and with the checkbox 'Is Deposit' set to True. + +#. Select or add at least one product of which 'Use Deposit' is checked, + such as '1 liter of cola'. In the accompanying product selection field, + select the bottle. The two products are now linked. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONTEXT.rst b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONTEXT.rst new file mode 100644 index 0000000..a206dbf --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONTEXT.rst @@ -0,0 +1,6 @@ +Note there are several implementations of the concept of deposits with varying degrees of complexity: + +- `product_packaging_container_deposit `_ +- `pos_product_pack `_ + +This module focusses on simplicity for users who don't want to get into packaging. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONTRIBUTORS.rst b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..ad00cf0 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +Tom Blauwendraat +Holger Brunn (https://hunki-enterprises.com) +Stefan Rijnhart diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/DESCRIPTION.rst b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/DESCRIPTION.rst new file mode 100644 index 0000000..a38f59c --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/DESCRIPTION.rst @@ -0,0 +1,6 @@ +This module allows the use of deposit products for PoS products. + +An example of such a deposit product would be a bottle of cola, where the bottle is +being sold for an extra 25 cents, which you get back when you bring the bottle back to +the store intact. Whenever the cola is added to a PoS order, the bottle is added too. +If the cola quantity changes, the bottle quantity will change as well. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/USAGE.rst b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/USAGE.rst new file mode 100644 index 0000000..4dfc005 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/readme/USAGE.rst @@ -0,0 +1,7 @@ +To use this module, open a POS session and: + +#. When a deposit product (eg. cola) is added, the bottle is added to the + order as well and the quantities are kept in sync. + +#. When someone brings back bottles to the store, you can just add a bottle + and enter a negative sale quantity, thus refunding the bottle. diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/description/icon.png b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/description/icon.png differ diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/description/index.html b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/description/index.html new file mode 100644 index 0000000..ff28166 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/description/index.html @@ -0,0 +1,461 @@ + + + + + +POS Container Deposit + + + +
+

POS Container Deposit

+ + +

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

+

This module allows the use of deposit products for PoS products.

+

An example of such a deposit product would be a bottle of cola, where the bottle is +being sold for an extra 25 cents, which you get back when you bring the bottle back to +the store intact. Whenever the cola is added to a PoS order, the bottle is added too. +If the cola quantity changes, the bottle quantity will change as well.

+

Table of contents

+ +
+

Use Cases / Context

+

Note there are several implementations of the concept of deposits with varying degrees of complexity:

+ +

This module focusses on simplicity for users who don’t want to get into packaging.

+
+
+

Configuration

+

To configure this module, you need to go to Point of Sale > Products.

+
    +
  1. Select or add at least one ‘deposit product’, such as ‘Bottle 1L’, +with a non-zero price and with the checkbox ‘Is Deposit’ set to True.
  2. +
  3. Select or add at least one product of which ‘Use Deposit’ is checked, +such as ‘1 liter of cola’. In the accompanying product selection field, +select the bottle. The two products are now linked.
  4. +
+
+
+

Usage

+

To use this module, open a POS session and:

+
    +
  1. When a deposit product (eg. cola) is added, the bottle is added to the +order as well and the quantities are kept in sync.
  2. +
  3. When someone brings back bottles to the store, you can just add a bottle +and enter a negative sale quantity, thus refunding the bottle.
  4. +
+
+
+

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

+
    +
  • Sunflower IT
  • +
  • Open2bizz
  • +
+
+ +
+

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.

+

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/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/src/js/components.js b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/src/js/components.js new file mode 100644 index 0000000..fd08aae --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/src/js/components.js @@ -0,0 +1,22 @@ +/* Copyright 2024 Hunki Enterprises BV + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + */ +odoo.define("pos_container_deposit.components", function (require) { + "use strict"; + + const Orderline = require("point_of_sale.Orderline"); + const Registries = require("point_of_sale.Registries"); + const PosDepositOrderlineExtension = (Orderline) => + class PosDepositOrderline extends Orderline { + selectLine() { + /** + * Don't allow selecting deposit products + **/ + if (!this.props.line.is_container_deposit) { + super.selectLine(...arguments); + } + } + }; + + Registries.Component.extend(Orderline, PosDepositOrderlineExtension); +}); diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/src/js/models.js b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/src/js/models.js new file mode 100644 index 0000000..7fe38df --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/src/js/models.js @@ -0,0 +1,152 @@ +/* Copyright 2024 Hunki Enterprises BV + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + */ +odoo.define("pos_container_deposit.models", function (require) { + "use strict"; + + const {Order, Orderline} = require("point_of_sale.models"); + const Registries = require("point_of_sale.Registries"); + const {Gui} = require("point_of_sale.Gui"); + const core = require("web.core"); + const _t = core._t; + + const PosDepositOrderExtension = (Order) => + class PosDepositOrder extends Order { + add_product(product) { + /** + * Show an error message when adding a product with a container deposit product that is not loaded + **/ + var deposit = null; + if (product.deposit_product_id) { + deposit = this.pos.db.product_by_id[product.deposit_product_id[0]]; + if (!deposit) { + Gui.showPopup("ErrorPopup", { + title: _t("Deposit not available"), + body: _.str.sprintf( + _t( + "The product %s is configured as having a deposit but the deposit product %s is not available in POS." + ), + product.display_name, + product.deposit_product_id[1] + ), + }); + return false; + } + } + super.add_product(...arguments); + } + add_orderline(line) { + /** + * When adding a product with container deposit, add its container deposit product + **/ + super.add_orderline(...arguments); + if (line.container_deposit_product && !line.container_deposit_line) { + this.add_product(line.container_deposit_product, { + quantity: line.get_quantity(), + }); + line.container_deposit_line = this.get_last_orderline(); + line.container_deposit_line.is_container_deposit = true; + this.select_orderline(line); + } + } + select_orderline(line) { + /** + * Never select an orderline with deposit, select one next to it instead + **/ + if (line && line.is_container_deposit) { + const line_index = this.orderlines.indexOf(line); + if (line_index >= 0 && this.orderlines.length > 1) { + super.select_orderline( + this.orderlines[line_index ? line_index - 1 : 0] + ); + } + } else { + super.select_orderline(...arguments); + } + } + }; + + const PosDepositOrderlineExtension = (Orderline) => + class PosDepositOrderLine extends Orderline { + constructor() { + /** + * Set container deposit specific properties + **/ + super(...arguments); + const deposit_product = this.product + ? this.pos.db.get_product_by_id(this.product.id).deposit_product_id + : null; + if (deposit_product) { + this.container_deposit_product = this.pos.db.get_product_by_id( + deposit_product[0] + ); + } + } + init_from_JSON(json) { + /** + * Restore container deposit specific properties and link between line with deposit and deposit line + **/ + super.init_from_JSON(json); + if (json.container_deposit_line_id) { + this.container_deposit_line = + this.order.get_orderline(json.container_deposit_line_id) || + json.container_deposit_line_id; + } + if (json.is_container_deposit) { + for (var i = 0; i < this.order.orderlines.length; i++) { + if ( + this.order.orderlines[i].container_deposit_line === this.id + ) { + this.order.orderlines[i].container_deposit_line = this; + break; + } + } + this.is_container_deposit = true; + } + } + export_as_JSON() { + /** + * Export deposit line as id + **/ + const result = super.export_as_JSON(); + result.is_container_deposit = this.is_container_deposit; + if (this.container_deposit_line) { + result.container_deposit_line_id = this.container_deposit_line.id; + } + return result; + } + set_quantity(quantity, keep_price) { + /** + * When setting quantity of a product with deposit, also add to its deposit line + **/ + const difference = + quantity === "remove" ? -this.quantity : quantity - this.quantity; + const deposit_line = this.container_deposit_line; + const result = super.set_quantity(...arguments); + if ((difference || quantity === "remove") && deposit_line) { + var deposit_quantity = deposit_line.quantity + difference; + deposit_line.set_quantity( + deposit_quantity + ? deposit_quantity + : quantity === "remove" + ? quantity + : deposit_quantity, + keep_price + ); + } + return result; + } + can_be_merged_with(orderline) { + /** + * Never merge deposit orderlines + **/ + if (this.is_container_deposit || orderline.is_container_deposit) { + return false; + } + return super.can_be_merged_with(...arguments); + } + }; + + Registries.Model.extend(Order, PosDepositOrderExtension); + Registries.Model.extend(Orderline, PosDepositOrderlineExtension); +}); diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/tests/tours/pos_container_deposit_tour.js b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/tests/tours/pos_container_deposit_tour.js new file mode 100644 index 0000000..86adc00 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/static/tests/tours/pos_container_deposit_tour.js @@ -0,0 +1,46 @@ +odoo.define("pos_container_deposit.test_tour", function (require) { + "use strict"; + + const {ProductScreen} = require("point_of_sale.tour.ProductScreenTourMethods"); + const {getSteps, startSteps} = require("point_of_sale.tour.utils"); + const Tour = require("web_tour.tour"); + const product_name = "Generic sugar liquid"; + const deposit_product_name = "Bottle deposit .25"; + + startSteps(); + + ProductScreen.do.clickHomeCategory(); + ProductScreen.do.clickDisplayedProduct(product_name); + ProductScreen.do.clickDisplayedProduct(product_name); + ProductScreen.check.checkOrderlinesNumber(2); + ProductScreen.check.selectedOrderlineHas(product_name); + getSteps().push({ + content: `selecting orderline with product '${deposit_product_name}' and quantity '2.0'`, + trigger: `.order .orderline:not(:has(.selected)) .product-name:contains("${deposit_product_name}") ~ .info-list em:contains("2.0")`, + }); + ProductScreen.check.selectedOrderlineHas(product_name); + ProductScreen.do.pressNumpad("Price"); + ProductScreen.check.modeIsActive("Price"); + ProductScreen.do.pressNumpad("5"); + ProductScreen.check.selectedOrderlineHas(product_name, "2", "10"); + ProductScreen.do.clickDisplayedProduct(product_name); + ProductScreen.do.clickDisplayedProduct(product_name); + ProductScreen.check.checkOrderlinesNumber(4); + ProductScreen.do.pressNumpad("Qty"); + ProductScreen.do.pressNumpad("Backspace"); + ProductScreen.do.pressNumpad("Backspace"); + ProductScreen.check.modeIsActive("Qty"); + ProductScreen.check.selectedOrderlineHas(product_name, "2", "10"); + ProductScreen.check.checkOrderlinesNumber(2); + ProductScreen.do.pressNumpad("Qty"); + ProductScreen.do.pressNumpad("Backspace"); + ProductScreen.do.pressNumpad("Backspace"); + ProductScreen.check.modeIsActive("Qty"); + ProductScreen.check.orderIsEmpty(); + + Tour.register( + "pos_container_deposit.test_tour", + {test: true, url: "/pos/ui"}, + getSteps() + ); +}); diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/__init__.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/__init__.py new file mode 100644 index 0000000..d03d38c --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/__init__.py @@ -0,0 +1,2 @@ +from . import test_pos_container_deposit +from . import test_pos_container_deposit_frontend diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/test_pos_container_deposit.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/test_pos_container_deposit.py new file mode 100644 index 0000000..a8e0a0e --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/test_pos_container_deposit.py @@ -0,0 +1,49 @@ +# Copyright 2024 Hunki Enterprises BV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo.tests.common import TransactionCase + + +class TestPosDeposit(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.deposit_product = cls.env.ref("pos_container_deposit.demo_deposit_product") + cls.product = cls.env.ref("pos_container_deposit.demo_product") + cls.product_template = cls.product.product_tmpl_id + + def test_product_behavior(self): + """ + Test that product search, write, copy behaves as expected with deposit products + """ + self.assertIn( + self.product, + self.env["product.product"].search( + [ + ("deposit_product_id", "=", self.deposit_product.id), + ] + ), + ) + self.assertIn( + self.product_template, + self.env["product.template"].search( + [ + ("deposit_product_id", "=", self.deposit_product.id), + ] + ), + ) + self.product_template.deposit_product_id = False + self.assertFalse(self.product.deposit_product_id) + self.product.deposit_product_id = self.deposit_product + self.assertEqual(self.product_template.deposit_product_id, self.deposit_product) + product2 = self.product.copy({}) + self.assertEqual(product2.deposit_product_id, self.deposit_product) + self.assertEqual(self.product_template.deposit_product_id, self.deposit_product) + template2 = self.product_template.copy() + self.assertEqual(template2.deposit_product_id, self.deposit_product) + + def test_pos_session(self): + """ + Be sure the extra field and domain are included + """ + params = self.env["pos.session"]._loader_params_product_product() + self.assertIn("deposit_product_id", params["search_params"]["fields"]) diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/test_pos_container_deposit_frontend.py b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/test_pos_container_deposit_frontend.py new file mode 100644 index 0000000..c6228f3 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/tests/test_pos_container_deposit_frontend.py @@ -0,0 +1,14 @@ +from odoo.tests.common import tagged + +from odoo.addons.point_of_sale.tests.test_frontend import TestPointOfSaleHttpCommon + + +@tagged("post_install", "-at_install") +class TestPosContainerDeposit(TestPointOfSaleHttpCommon): + def run_tour(self): + self.main_pos_config.open_ui() + self.start_tour( + "/pos/ui?config_id=%d" % self.main_pos_config.id, + "pos_container_deposit.test_tour", + login="accountman", + ) diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/views/product_template.xml b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/views/product_template.xml new file mode 100644 index 0000000..01bec8b --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pos_container_deposit/views/product_template.xml @@ -0,0 +1,28 @@ + + + + product.template + + + + + + + + + + product.template + + + + + + + + diff --git a/odoo-bringout-oca-pos-pos_container_deposit/pyproject.toml b/odoo-bringout-oca-pos-pos_container_deposit/pyproject.toml new file mode 100644 index 0000000..2ccaae0 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_container_deposit/pyproject.toml @@ -0,0 +1,42 @@ +[project] +name = "odoo-bringout-oca-pos-pos_container_deposit" +version = "16.0.0" +description = "POS Container Deposit - This module is used to manage container deposits for products in Point of Sale." +authors = [ + { name = "Ernad Husremovic", email = "hernad@bring.out.ba" } +] +dependencies = [ + "odoo-bringout-oca-ocb-point_of_sale>=16.0.0", + "requests>=2.25.1" +] +readme = "README.md" +requires-python = ">= 3.11" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Office/Business", +] + +[project.urls] +homepage = "https://github.com/bringout/0" +repository = "https://github.com/bringout/0" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["pos_container_deposit"] + +[tool.rye] +managed = true +dev-dependencies = [ + "pytest>=8.4.1", +] diff --git a/odoo-bringout-oca-pos-pos_customer_comment/README.md b/odoo-bringout-oca-pos-pos_customer_comment/README.md new file mode 100644 index 0000000..d47e037 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/README.md @@ -0,0 +1,46 @@ +# Point of Sale - Cashier Comment + +Odoo addon: pos_customer_comment + +## Installation + +```bash +pip install odoo-bringout-oca-pos-pos_customer_comment +``` + +## Dependencies + +This addon depends on: +- point_of_sale + +## Manifest Information + +- **Name**: Point of Sale - Cashier Comment +- **Version**: 16.0.1.0.3 +- **Category**: Point of Sale +- **License**: AGPL-3 +- **Installable**: True + +## Source + +Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_customer_comment`. + +## License + +This package maintains the original AGPL-3 license from the upstream Odoo project. + +## Documentation + +- Overview: doc/OVERVIEW.md +- Architecture: doc/ARCHITECTURE.md +- Models: doc/MODELS.md +- Controllers: doc/CONTROLLERS.md +- Wizards: doc/WIZARDS.md +- Reports: doc/REPORTS.md +- Security: doc/SECURITY.md +- Install: doc/INSTALL.md +- Usage: doc/USAGE.md +- Configuration: doc/CONFIGURATION.md +- Dependencies: doc/DEPENDENCIES.md +- Troubleshooting: doc/TROUBLESHOOTING.md +- FAQ: doc/FAQ.md diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/ARCHITECTURE.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/ARCHITECTURE.md new file mode 100644 index 0000000..a22a94c --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/ARCHITECTURE.md @@ -0,0 +1,32 @@ +# Architecture + +```mermaid +flowchart TD + U[Users] -->|HTTP| V[Views and QWeb Templates] + V --> C[Controllers] + V --> W[Wizards – Transient Models] + C --> M[Models and ORM] + W --> M + M --> R[Reports] + DX[Data XML] --> M + S[Security – ACLs and Groups] -. enforces .-> M + + subgraph Pos_customer_comment Module - pos_customer_comment + direction LR + M:::layer + W:::layer + C:::layer + V:::layer + R:::layer + S:::layer + DX:::layer + end + + classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px +``` + +Notes +- Views include tree/form/kanban templates and report templates. +- Controllers provide website/portal routes when present. +- Wizards are UI flows implemented with `models.TransientModel`. +- Data XML loads data/demo records; Security defines groups and access. diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/CONFIGURATION.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/CONFIGURATION.md new file mode 100644 index 0000000..d967547 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/CONFIGURATION.md @@ -0,0 +1,3 @@ +# Configuration + +Refer to Odoo settings for pos_customer_comment. Configure related models, access rights, and options as needed. diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/CONTROLLERS.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/CONTROLLERS.md new file mode 100644 index 0000000..f628e77 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/CONTROLLERS.md @@ -0,0 +1,3 @@ +# Controllers + +This module does not define custom HTTP controllers. diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/DEPENDENCIES.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/DEPENDENCIES.md new file mode 100644 index 0000000..9dfe640 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/DEPENDENCIES.md @@ -0,0 +1,5 @@ +# Dependencies + +This addon depends on: + +- [point_of_sale](https://github.com/bringout/oca-ocb-sale/tree/681dc8d5fff638cb0862a34e48091a2098d091f8/odoo-bringout-oca-ocb-point_of_sale) diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/FAQ.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/FAQ.md new file mode 100644 index 0000000..eac0c7d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/FAQ.md @@ -0,0 +1,4 @@ +# FAQ + +- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged). +- Q: How to enable? A: Start server with --addon pos_customer_comment or install in UI. diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/INSTALL.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/INSTALL.md new file mode 100644 index 0000000..ee654d5 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/INSTALL.md @@ -0,0 +1,7 @@ +# Install + +```bash +pip install odoo-bringout-oca-pos-pos_customer_comment" +# or +uv pip install odoo-bringout-oca-pos-pos_customer_comment" +``` diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/MODELS.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/MODELS.md new file mode 100644 index 0000000..1f63c5b --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/MODELS.md @@ -0,0 +1,13 @@ +# Models + +Detected core models and extensions in pos_customer_comment. + +```mermaid +classDiagram + class pos_session + class res_partner +``` + +Notes +- Classes show model technical names; fields omitted for brevity. +- Items listed under _inherit are extensions of existing models. diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/OVERVIEW.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/OVERVIEW.md new file mode 100644 index 0000000..56be01e --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/OVERVIEW.md @@ -0,0 +1,6 @@ +# Overview + +Packaged Odoo addon: pos_customer_comment. Provides features documented in upstream Odoo 16 under this addon. + +- Source: OCA/OCB 16.0, addon pos_customer_comment +- License: LGPL-3 diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/REPORTS.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/REPORTS.md new file mode 100644 index 0000000..e0ea35f --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/REPORTS.md @@ -0,0 +1,3 @@ +# Reports + +This module does not define custom reports. diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/SECURITY.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/SECURITY.md new file mode 100644 index 0000000..e07da9d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/SECURITY.md @@ -0,0 +1,8 @@ +# Security + +This module does not define custom security rules or access controls beyond Odoo defaults. + +Default Odoo security applies: +- Base user access through standard groups +- Model access inherited from dependencies +- No custom row-level security rules diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/TROUBLESHOOTING.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/TROUBLESHOOTING.md new file mode 100644 index 0000000..56853cb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/TROUBLESHOOTING.md @@ -0,0 +1,5 @@ +# Troubleshooting + +- Ensure Python and Odoo environment matches repo guidance. +- Check database connectivity and logs if startup fails. +- Validate that dependent addons listed in DEPENDENCIES.md are installed. diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/USAGE.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/USAGE.md new file mode 100644 index 0000000..8f8697d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/USAGE.md @@ -0,0 +1,7 @@ +# Usage + +Start Odoo including this addon (from repo root): + +```bash +python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_customer_comment +``` diff --git a/odoo-bringout-oca-pos-pos_customer_comment/doc/WIZARDS.md b/odoo-bringout-oca-pos-pos_customer_comment/doc/WIZARDS.md new file mode 100644 index 0000000..48e790d --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/doc/WIZARDS.md @@ -0,0 +1,3 @@ +# Wizards + +This module does not include UI wizards. diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/README.rst b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/README.rst new file mode 100644 index 0000000..d080e2b --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/__init__.py b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/__manifest__.py b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/__manifest__.py new file mode 100644 index 0000000..8ff8142 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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": "16.0.1.0.3", + "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/tests/tours/PosCustomerComment.tour.js", + ], + }, + "demo": [ + "demo/res_partner.xml", + ], + "installable": True, +} diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/demo/res_partner.xml b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/demo/res_partner.xml new file mode 100644 index 0000000..889d589 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/demo/res_partner.xml @@ -0,0 +1,13 @@ + + + + + Important information to display in Point of Sale + + diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/bs.po b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/bs.po new file mode 100644 index 0000000..27781a3 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/bs.po @@ -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 "Cashier Comment" + +#. 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 "Komentar" + +#. 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 "Kontakt" + +#. 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 "Has PoS Comment" + +#. module: pos_customer_comment +#: model:ir.model,name:pos_customer_comment.model_pos_session +msgid "Point of Sale Session" +msgstr "Sesija POS-a" diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/es.po b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/es.po new file mode 100644 index 0000000..764f18b --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/fr.po b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/fr.po new file mode 100644 index 0000000..c9bc827 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/it.po b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/i18n/it.po new file mode 100644 index 0000000..13e7b91 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/models/__init__.py b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/models/__init__.py new file mode 100644 index 0000000..3d937eb --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/models/__init__.py @@ -0,0 +1,2 @@ +from . import pos_session +from . import res_partner diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/models/pos_session.py b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/models/pos_session.py new file mode 100644 index 0000000..c28bfc2 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/models/res_partner.py b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/models/res_partner.py new file mode 100644 index 0000000..3024889 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/CONTRIBUTORS.rst b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..2618270 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Sylvain LE GAL (https://twitter.com/legalsylvain) +* Juan Carlos Bonilla diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/CREDITS.rst b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/CREDITS.rst new file mode 100644 index 0000000..4c3758b --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/DESCRIPTION.rst b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/DESCRIPTION.rst new file mode 100644 index 0000000..dbc5391 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/ROADMAP.rst b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/ROADMAP.rst new file mode 100644 index 0000000..6b490fd --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/USAGE.rst b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/readme/USAGE.rst new file mode 100644 index 0000000..9c79997 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/icon.png b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/icon.png differ diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/index.html b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/index.html new file mode 100644 index 0000000..57e7b76 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/pos_customer_form.png b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/pos_customer_form.png new file mode 100644 index 0000000..525d87e Binary files /dev/null and b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/pos_customer_form.png differ diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/pos_customer_tree.png b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/pos_customer_tree.png new file mode 100644 index 0000000..7587865 Binary files /dev/null and b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/pos_customer_tree.png differ diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/res_partner_form.png b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/res_partner_form.png new file mode 100644 index 0000000..435c08c Binary files /dev/null and b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/description/res_partner_form.png differ diff --git a/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/src/css/pos_customer_comment.scss b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/src/css/pos_customer_comment.scss new file mode 100644 index 0000000..80be511 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/src/js/PartnerDetailsEdit.esm.js b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/src/js/PartnerDetailsEdit.esm.js new file mode 100644 index 0000000..daaec00 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/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/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml new file mode 100644 index 0000000..9dbfd89 --- /dev/null +++ b/odoo-bringout-oca-pos-pos_customer_comment/pos_customer_comment/static/src/xml/PartnerDetailsEdit.xml @@ -0,0 +1,30 @@ + + + + + + +
+ Comment +