mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-21 18:12:10 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
46
odoo-bringout-oca-pos-pos_product_label/README.md
Normal file
46
odoo-bringout-oca-pos-pos_product_label/README.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# POS Product Label
|
||||
|
||||
Odoo addon: pos_product_label
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-pos-pos_product_label
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- point_of_sale
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: POS Product Label
|
||||
- **Version**: 16.0.1.0.2
|
||||
- **Category**: Point of Sale
|
||||
- **License**: AGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_product_label`.
|
||||
|
||||
## 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
|
||||
32
odoo-bringout-oca-pos-pos_product_label/doc/ARCHITECTURE.md
Normal file
32
odoo-bringout-oca-pos-pos_product_label/doc/ARCHITECTURE.md
Normal file
|
|
@ -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_product_label Module - pos_product_label
|
||||
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.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Configuration
|
||||
|
||||
Refer to Odoo settings for pos_product_label. Configure related models, access rights, and options as needed.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Controllers
|
||||
|
||||
This module does not define custom HTTP controllers.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# Dependencies
|
||||
|
||||
This addon depends on:
|
||||
|
||||
- [point_of_sale](../../odoo-bringout-oca-ocb-point_of_sale)
|
||||
4
odoo-bringout-oca-pos-pos_product_label/doc/FAQ.md
Normal file
4
odoo-bringout-oca-pos-pos_product_label/doc/FAQ.md
Normal file
|
|
@ -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_product_label or install in UI.
|
||||
7
odoo-bringout-oca-pos-pos_product_label/doc/INSTALL.md
Normal file
7
odoo-bringout-oca-pos-pos_product_label/doc/INSTALL.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Install
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-pos-pos_product_label"
|
||||
# or
|
||||
uv pip install odoo-bringout-oca-pos-pos_product_label"
|
||||
```
|
||||
14
odoo-bringout-oca-pos-pos_product_label/doc/MODELS.md
Normal file
14
odoo-bringout-oca-pos-pos_product_label/doc/MODELS.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Models
|
||||
|
||||
Detected core models and extensions in pos_product_label.
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class pos_config
|
||||
class pos_session
|
||||
class res_config_settings
|
||||
```
|
||||
|
||||
Notes
|
||||
- Classes show model technical names; fields omitted for brevity.
|
||||
- Items listed under _inherit are extensions of existing models.
|
||||
6
odoo-bringout-oca-pos-pos_product_label/doc/OVERVIEW.md
Normal file
6
odoo-bringout-oca-pos-pos_product_label/doc/OVERVIEW.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Overview
|
||||
|
||||
Packaged Odoo addon: pos_product_label. Provides features documented in upstream Odoo 16 under this addon.
|
||||
|
||||
- Source: OCA/OCB 16.0, addon pos_product_label
|
||||
- License: LGPL-3
|
||||
3
odoo-bringout-oca-pos-pos_product_label/doc/REPORTS.md
Normal file
3
odoo-bringout-oca-pos-pos_product_label/doc/REPORTS.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Reports
|
||||
|
||||
This module does not define custom reports.
|
||||
8
odoo-bringout-oca-pos-pos_product_label/doc/SECURITY.md
Normal file
8
odoo-bringout-oca-pos-pos_product_label/doc/SECURITY.md
Normal file
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
7
odoo-bringout-oca-pos-pos_product_label/doc/USAGE.md
Normal file
7
odoo-bringout-oca-pos-pos_product_label/doc/USAGE.md
Normal file
|
|
@ -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_product_label
|
||||
```
|
||||
3
odoo-bringout-oca-pos-pos_product_label/doc/WIZARDS.md
Normal file
3
odoo-bringout-oca-pos-pos_product_label/doc/WIZARDS.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Wizards
|
||||
|
||||
This module does not include UI wizards.
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
=================
|
||||
POS Product Label
|
||||
=================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:c8f69e5247c8d31cb5ce975c4d0b4af0abccfd4444e96fe0d603ab57cabaad54
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |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_product_label
|
||||
: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_product_label
|
||||
: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|
|
||||
|
||||
Adds a "Print Labels" button to print the product labels for the ordered products.
|
||||
The button opens a wizard that allows to configure the label layout and quantities.
|
||||
The behavior is similar to the core "Print Labels" button in Stock Pickings.
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_product_label/static/description/preview.png
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
#. Add products to the order
|
||||
#. Click on the "Print Labels" button
|
||||
#. Choose the label layout and confirm
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/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 <https://github.com/OCA/pos/issues/new?body=module:%20pos_product_label%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
* Camptocamp
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* `Camptocamp <https://www.camptocamp.com>`_
|
||||
|
||||
* Iván Todorovich <ivan.todorovich@camptocamp.com>
|
||||
|
||||
* [Trobz](https://www.trobz.com):
|
||||
|
||||
* Tri Doan <tridm@trobz.com>
|
||||
|
||||
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-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px
|
||||
:target: https://github.com/ivantodorovich
|
||||
:alt: ivantodorovich
|
||||
|
||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-ivantodorovich|
|
||||
|
||||
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/16.0/pos_product_label>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
from . import models
|
||||
from . import wizards
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2023 Camptocamp SA (https://www.camptocamp.com).
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "POS Product Label",
|
||||
"summary": "Print product labels from the POS",
|
||||
"version": "16.0.1.0.2",
|
||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||
"maintainers": ["ivantodorovich"],
|
||||
"website": "https://github.com/OCA/pos",
|
||||
"license": "AGPL-3",
|
||||
"category": "Point of Sale",
|
||||
"depends": ["point_of_sale"],
|
||||
"data": ["views/res_config_settings.xml"],
|
||||
"assets": {
|
||||
"point_of_sale.assets": [
|
||||
"pos_product_label/static/src/**/*.js",
|
||||
"pos_product_label/static/src/**/*.xml",
|
||||
"pos_product_label/static/src/**/*.scss",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_product_label
|
||||
#
|
||||
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_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Cancel"
|
||||
msgstr "Otkaži"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Choose Labels Layout"
|
||||
msgstr "Odaberite izgled naljepnica"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_product_label_layout
|
||||
msgid "Choose the sheet layout to print the labels"
|
||||
msgstr "Odaberite kako želite rasporediti naljepnice na papiru prilikom ispisa"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Postavke"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Custom"
|
||||
msgstr "Prilagođeno"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model.fields,help:pos_product_label.field_pos_config__iface_product_label
|
||||
#: model:ir.model.fields,help:pos_product_label.field_res_config_settings__iface_product_label
|
||||
#: model_terms:ir.ui.view,arch_db:pos_product_label.res_config_settings_view_form
|
||||
msgid "Display a button to print Product Labels for ordered products"
|
||||
msgstr "Prikaži dugme za štampanje etiketa proizvoda za naručene proizvode"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Extra Content"
|
||||
msgstr "Dodatni sadržaj"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Order Quantities"
|
||||
msgstr "Količine narudžbe"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_pos_config
|
||||
msgid "Point of Sale Configuration"
|
||||
msgstr "Postavke prodajnog mjesta"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr "Sesija POS-a"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Print"
|
||||
msgstr "Ispis"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelButton.xml:0
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelButton.xml:0
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelButton.xml:0
|
||||
#, python-format
|
||||
msgid "Print Labels"
|
||||
msgstr "Štampa labela"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model.fields,field_description:pos_product_label.field_pos_config__iface_product_label
|
||||
#: model:ir.model.fields,field_description:pos_product_label.field_res_config_settings__iface_product_label
|
||||
msgid "Print Product Labels"
|
||||
msgstr "Štampaj etikete proizvoda"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Quantity"
|
||||
msgstr "Količina"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Quantity to Print"
|
||||
msgstr "Količina za štampanje"
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_product_label
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-02-08 22:35+0000\n"
|
||||
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Choose Labels Layout"
|
||||
msgstr "Elija el Diseño de las Etiquetas"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_product_label_layout
|
||||
msgid "Choose the sheet layout to print the labels"
|
||||
msgstr "Elija el diseño de hoja para imprimir las etiquetas"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Ajustes Config"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Custom"
|
||||
msgstr "Personalizar"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model.fields,help:pos_product_label.field_pos_config__iface_product_label
|
||||
#: model:ir.model.fields,help:pos_product_label.field_res_config_settings__iface_product_label
|
||||
#: model_terms:ir.ui.view,arch_db:pos_product_label.res_config_settings_view_form
|
||||
msgid "Display a button to print Product Labels for ordered products"
|
||||
msgstr ""
|
||||
"Mostrar un botón para imprimir las Etiquetas de Producto para los productos "
|
||||
"pedidos"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Extra Content"
|
||||
msgstr "Contenido Extra"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Format"
|
||||
msgstr "Formato"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Order Quantities"
|
||||
msgstr "Cantidades Ordenadas"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_pos_config
|
||||
msgid "Point of Sale Configuration"
|
||||
msgstr "Configuración de Punto de Venta"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr "Sesión del Punto de Venta"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Print"
|
||||
msgstr "Imprimir"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelButton.xml:0
|
||||
#, python-format
|
||||
msgid "Print Labels"
|
||||
msgstr "Imprimir Etiquetas"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model.fields,field_description:pos_product_label.field_pos_config__iface_product_label
|
||||
#: model:ir.model.fields,field_description:pos_product_label.field_res_config_settings__iface_product_label
|
||||
msgid "Print Product Labels"
|
||||
msgstr "Imprimir Etiquetas de Producto"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Quantity"
|
||||
msgstr "Cantidad"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Quantity to Print"
|
||||
msgstr "Cantidad a Imprimir"
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_product_label
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-04-22 09:34+0000\n"
|
||||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Cancel"
|
||||
msgstr "Annulla"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Choose Labels Layout"
|
||||
msgstr "Scegliere disposizione etichette"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_product_label_layout
|
||||
msgid "Choose the sheet layout to print the labels"
|
||||
msgstr "Scegliere la disposizione del foglio per la stampa etichette"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Impostazioni configurazione"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Custom"
|
||||
msgstr "Personalizzato"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model.fields,help:pos_product_label.field_pos_config__iface_product_label
|
||||
#: model:ir.model.fields,help:pos_product_label.field_res_config_settings__iface_product_label
|
||||
#: model_terms:ir.ui.view,arch_db:pos_product_label.res_config_settings_view_form
|
||||
msgid "Display a button to print Product Labels for ordered products"
|
||||
msgstr ""
|
||||
"Visualizza un pulsante per stampare etichetteprodoto per i prodotti ordinati"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Extra Content"
|
||||
msgstr "Contenuto aggiuntivo"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Format"
|
||||
msgstr "Formato"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Order Quantities"
|
||||
msgstr "Quantità ordine"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_pos_config
|
||||
msgid "Point of Sale Configuration"
|
||||
msgstr "Configurazione punto vendita"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr "Sessione punto vendita"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Print"
|
||||
msgstr "Stampa"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelButton.xml:0
|
||||
#, python-format
|
||||
msgid "Print Labels"
|
||||
msgstr "Stampa etichette"
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model.fields,field_description:pos_product_label.field_pos_config__iface_product_label
|
||||
#: model:ir.model.fields,field_description:pos_product_label.field_res_config_settings__iface_product_label
|
||||
msgid "Print Product Labels"
|
||||
msgstr "Stampa etichette prodotto"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Quantity"
|
||||
msgstr "Quantità"
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Quantity to Print"
|
||||
msgstr "Quantità da stampare"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "custom"
|
||||
#~ msgstr "personalizzato"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "order"
|
||||
#~ msgstr "ordine"
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_product_label
|
||||
#
|
||||
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_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Choose Labels Layout"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_product_label_layout
|
||||
msgid "Choose the sheet layout to print the labels"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Custom"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model.fields,help:pos_product_label.field_pos_config__iface_product_label
|
||||
#: model:ir.model.fields,help:pos_product_label.field_res_config_settings__iface_product_label
|
||||
#: model_terms:ir.ui.view,arch_db:pos_product_label.res_config_settings_view_form
|
||||
msgid "Display a button to print Product Labels for ordered products"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Extra Content"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Format"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Order Quantities"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_pos_config
|
||||
msgid "Point of Sale Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model,name:pos_product_label.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelButton.xml:0
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelButton.xml:0
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelButton.xml:0
|
||||
#, python-format
|
||||
msgid "Print Labels"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#: model:ir.model.fields,field_description:pos_product_label.field_pos_config__iface_product_label
|
||||
#: model:ir.model.fields,field_description:pos_product_label.field_res_config_settings__iface_product_label
|
||||
msgid "Print Product Labels"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Quantity"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_product_label
|
||||
#. odoo-javascript
|
||||
#: code:addons/pos_product_label/static/src/PrintLabelPopup.xml:0
|
||||
#, python-format
|
||||
msgid "Quantity to Print"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
from . import pos_config
|
||||
from . import pos_session
|
||||
from . import res_config_settings
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# Copyright 2023 Camptocamp SA (https://www.camptocamp.com).
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PosConfig(models.Model):
|
||||
_inherit = "pos.config"
|
||||
|
||||
iface_product_label = fields.Boolean(
|
||||
string="Print Product Labels",
|
||||
help="Display a button to print Product Labels for ordered products",
|
||||
default=True,
|
||||
)
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# Copyright 2023 Camptocamp SA (https://www.camptocamp.com).
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import Command, models
|
||||
from odoo.tools import plaintext2html
|
||||
|
||||
|
||||
class PosSession(models.Model):
|
||||
_inherit = "pos.session"
|
||||
|
||||
def _prepare_product_label_layout_data(self, data):
|
||||
vals = {
|
||||
"product_ids": [Command.set(data["product_ids"])],
|
||||
"custom_quantity": data["custom_quantity"],
|
||||
"print_format": data["print_format"],
|
||||
"extra_html": (
|
||||
plaintext2html(data["extra_html"]) if data.get("extra_html") else False
|
||||
),
|
||||
}
|
||||
return vals
|
||||
|
||||
def print_product_labels(self, data):
|
||||
"""Print product labels from the POS.
|
||||
|
||||
:param data: dict with the following keys:
|
||||
- pos_quantity: either 'order' or 'custom'
|
||||
- order_quantity_by_product: dict of {product_id: quantity}
|
||||
- product_ids: list of product ids
|
||||
- custom_quantity: int
|
||||
- print_format: str
|
||||
- extra_html: str
|
||||
"""
|
||||
vals = self._prepare_product_label_layout_data(data)
|
||||
wizard = self.env["product.label.layout"].create(vals)
|
||||
if data.get("pos_quantity") == "order":
|
||||
wizard = wizard.with_context(
|
||||
force_label_qty_by_product=data.get("order_quantity_by_product", {})
|
||||
)
|
||||
return wizard.process()
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Copyright 2023 Camptocamp SA (https://www.camptocamp.com).
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = "res.config.settings"
|
||||
|
||||
iface_product_label = fields.Boolean(
|
||||
related="pos_config_id.iface_product_label",
|
||||
readonly=False,
|
||||
)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
* `Camptocamp <https://www.camptocamp.com>`_
|
||||
|
||||
* Iván Todorovich <ivan.todorovich@camptocamp.com>
|
||||
|
||||
* [Trobz](https://www.trobz.com):
|
||||
|
||||
* Tri Doan <tridm@trobz.com>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Adds a "Print Labels" button to print the product labels for the ordered products.
|
||||
The button opens a wizard that allows to configure the label layout and quantities.
|
||||
The behavior is similar to the core "Print Labels" button in Stock Pickings.
|
||||
|
||||
.. image:: ../static/description/preview.png
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#. Add products to the order
|
||||
#. Click on the "Print Labels" button
|
||||
#. Choose the label layout and confirm
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,444 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||
<title>POS Product Label</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="pos-product-label">
|
||||
<h1 class="title">POS Product Label</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:c8f69e5247c8d31cb5ce975c4d0b4af0abccfd4444e96fe0d603ab57cabaad54
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/16.0/pos_product_label"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_product_label"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Adds a “Print Labels” button to print the product labels for the ordered products.
|
||||
The button opens a wizard that allows to configure the label layout and quantities.
|
||||
The behavior is similar to the core “Print Labels” button in Stock Pickings.</p>
|
||||
<img alt="https://raw.githubusercontent.com/OCA/pos/16.0/pos_product_label/static/description/preview.png" src="https://raw.githubusercontent.com/OCA/pos/16.0/pos_product_label/static/description/preview.png" />
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
|
||||
<ol class="arabic simple">
|
||||
<li>Add products to the order</li>
|
||||
<li>Click on the “Print Labels” button</li>
|
||||
<li>Choose the label layout and confirm</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_product_label%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Camptocamp</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li><a class="reference external" href="https://www.camptocamp.com">Camptocamp</a><ul>
|
||||
<li>Iván Todorovich <<a class="reference external" href="mailto:ivan.todorovich@camptocamp.com">ivan.todorovich@camptocamp.com</a>></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[Trobz](<a class="reference external" href="https://www.trobz.com">https://www.trobz.com</a>):<ul>
|
||||
<li>Tri Doan <<a class="reference external" href="mailto:tridm@trobz.com">tridm@trobz.com</a>></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>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.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/ivantodorovich"><img alt="ivantodorovich" src="https://github.com/ivantodorovich.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/16.0/pos_product_label">OCA/pos</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
|
|
@ -0,0 +1,28 @@
|
|||
/* @odoo-module */
|
||||
|
||||
import PosComponent from "point_of_sale.PosComponent";
|
||||
import ProductScreen from "point_of_sale.ProductScreen";
|
||||
import Registries from "point_of_sale.Registries";
|
||||
import {useListener} from "@web/core/utils/hooks";
|
||||
|
||||
export default class PrintLabelButton extends PosComponent {
|
||||
setup() {
|
||||
super.setup();
|
||||
useListener("click", this.onClick);
|
||||
}
|
||||
async onClick() {
|
||||
await this.showPopup("PrintLabelPopup");
|
||||
}
|
||||
}
|
||||
|
||||
PrintLabelButton.template = "PrintLabelButton";
|
||||
|
||||
ProductScreen.addControlButton({
|
||||
component: PrintLabelButton,
|
||||
condition: function () {
|
||||
return this.env.pos.config.iface_product_label;
|
||||
},
|
||||
position: ["after", "SetFiscalPositionButton"],
|
||||
});
|
||||
|
||||
Registries.Component.add(PrintLabelButton);
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PrintLabelButton" owl="1">
|
||||
<div class="control-button">
|
||||
<i
|
||||
class="fa fa-tags"
|
||||
role="img"
|
||||
aria-label="Print Labels"
|
||||
title="Print Labels"
|
||||
/>
|
||||
Print Labels
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/* @odoo-module */
|
||||
|
||||
import AbstractAwaitablePopup from "point_of_sale.AbstractAwaitablePopup";
|
||||
import Registries from "point_of_sale.Registries";
|
||||
const {onWillStart, useState} = owl;
|
||||
|
||||
export default class PrintLabelPopup extends AbstractAwaitablePopup {
|
||||
setup() {
|
||||
super.setup();
|
||||
this.data = useState({
|
||||
quantityToPrint: "order",
|
||||
quantity: 1,
|
||||
format: null,
|
||||
extraContent: null,
|
||||
});
|
||||
onWillStart(async () => {
|
||||
const data = await this.rpc({
|
||||
model: "product.label.layout",
|
||||
method: "fields_get",
|
||||
kwargs: {
|
||||
allfields: ["print_format"],
|
||||
attributes: ["selection"],
|
||||
},
|
||||
});
|
||||
this.printFormatOptions = Object.fromEntries(data.print_format.selection);
|
||||
this.data.format = data.print_format.selection[0][0];
|
||||
});
|
||||
}
|
||||
|
||||
updateFormat(event) {
|
||||
this.data.format = event.target.value;
|
||||
}
|
||||
|
||||
async confirm() {
|
||||
const order = this.env.pos.get_order();
|
||||
const productIds = [
|
||||
...new Set(order.get_orderlines().map((line) => line.product.id)),
|
||||
];
|
||||
const data = {
|
||||
product_ids: productIds,
|
||||
pos_quantity: this.data.quantityToPrint,
|
||||
custom_quantity: this.data.quantity,
|
||||
order_quantity_by_product:
|
||||
this.data.quantityToPrint === "order"
|
||||
? Object.fromEntries(
|
||||
order
|
||||
.get_orderlines()
|
||||
.map((line) => [line.product.id, line.quantity])
|
||||
)
|
||||
: undefined,
|
||||
print_format: this.data.format,
|
||||
extra_html: this.data.extraContent,
|
||||
};
|
||||
const response = await this.rpc({
|
||||
model: "pos.session",
|
||||
method: "print_product_labels",
|
||||
args: [odoo.pos_session_id, data],
|
||||
});
|
||||
this.env.legacyActionManager.do_action(response);
|
||||
return super.confirm();
|
||||
}
|
||||
}
|
||||
|
||||
PrintLabelPopup.template = "PrintLabelPopup";
|
||||
Registries.Component.add(PrintLabelPopup);
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
Copyright 2023 Camptocamp SA (https://www.camptocamp.com).
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
*/
|
||||
|
||||
.pos .popup.product-label-popup {
|
||||
form {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1em;
|
||||
text-align: left;
|
||||
font-size: 1rem;
|
||||
|
||||
@media (min-width: 992px) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
& > section {
|
||||
height: fit-content;
|
||||
display: grid;
|
||||
grid-template-columns: fit-content(150px) 1fr;
|
||||
gap: 1em;
|
||||
padding: 0.5em;
|
||||
|
||||
& > div {
|
||||
display: contents;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
line-height: 1.75em;
|
||||
font-family: inherit;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font-size: 1em;
|
||||
font-family: inherit;
|
||||
border: none;
|
||||
background: white;
|
||||
width: auto;
|
||||
min-height: auto;
|
||||
padding: 0.25em 0.5em;
|
||||
border-radius: 0.2em;
|
||||
box-shadow: 0px 0px 0px 1px gainsboro inset;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
box-shadow: 0px 0px 0px 3px $primary;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
select {
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
display: grid;
|
||||
grid-template-columns: fit-content(2em) auto;
|
||||
row-gap: 0.5em;
|
||||
|
||||
& > label {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
box-shadow: none;
|
||||
margin: 0;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="PrintLabelPopup" owl="1">
|
||||
<div class="popup popup-text popup-med product-label-popup">
|
||||
<header class="title">Choose Labels Layout</header>
|
||||
<main class="body">
|
||||
<form>
|
||||
<section>
|
||||
<div>
|
||||
<label for="quantityToPrint">Quantity to Print</label>
|
||||
<select t-model="data.quantityToPrint" id="quantityToPrint">
|
||||
<option value="order">Order Quantities</option>
|
||||
<option value="custom">Custom</option>
|
||||
</select>
|
||||
</div>
|
||||
<div t-if="data.quantityToPrint == 'custom'">
|
||||
<label for="quantity">Quantity</label>
|
||||
<input
|
||||
type="number"
|
||||
t-model="data.quantity"
|
||||
id="quantity"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="format">Format</label>
|
||||
<fieldset name="format">
|
||||
<t
|
||||
t-foreach="printFormatOptions"
|
||||
t-as="format"
|
||||
t-key="format"
|
||||
>
|
||||
<input
|
||||
type="radio"
|
||||
t-model="data.format"
|
||||
t-att-id="format"
|
||||
t-att-value="format"
|
||||
t-on-change="updateFormat"
|
||||
/>
|
||||
<label
|
||||
t-att-for="format"
|
||||
t-esc="printFormatOptions[format]"
|
||||
/>
|
||||
</t>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div t-if="data.format == '2x7xprice'">
|
||||
<label for="extraContent">Extra Content</label>
|
||||
<textarea
|
||||
rows="4"
|
||||
t-model="data.extraContent"
|
||||
id="extraContent"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<div class="button highlight confirm" t-on-click="confirm">
|
||||
Print
|
||||
</div>
|
||||
<div class="button cancel" t-on-click="cancel">
|
||||
Cancel
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2023 Camptocamp SA (https://www.camptocamp.com).
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="point_of_sale.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div id="pos_inventory_section" position="inside">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="iface_product_label" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="iface_product_label" />
|
||||
<div class="text-muted">
|
||||
Display a button to print Product Labels for ordered products
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import product_label_layout
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# Copyright 2023 Camptocamp SA (https://www.camptocamp.com).
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class ProductLabelLayout(models.TransientModel):
|
||||
_inherit = "product.label.layout"
|
||||
|
||||
def _prepare_report_data(self):
|
||||
xml_id, data = super()._prepare_report_data()
|
||||
if self.env.context.get("force_label_qty_by_product"):
|
||||
data["quantity_by_product"] = self.env.context["force_label_qty_by_product"]
|
||||
return xml_id, data
|
||||
42
odoo-bringout-oca-pos-pos_product_label/pyproject.toml
Normal file
42
odoo-bringout-oca-pos-pos_product_label/pyproject.toml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-pos-pos_product_label"
|
||||
version = "16.0.0"
|
||||
description = "POS Product Label - Print product labels from the POS"
|
||||
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_product_label"]
|
||||
|
||||
[tool.rye]
|
||||
managed = true
|
||||
dev-dependencies = [
|
||||
"pytest>=8.4.1",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue