diff --git a/.copier-answers.yml b/.copier-answers.yml index 4d3980ad3c..9c7d3ea0c3 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,8 +1,7 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.29 +_commit: v1.40 _src_path: git+https://github.com/OCA/oca-addons-repo-template additional_ruff_rules: [] -ci: GitHub convert_readme_fragments_to_markdown: true enable_checklog_odoo: true generate_requirements_txt: true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..e0d56685a9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +test-requirements.txt merge=union diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 5eb021ef15..1291da527b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -17,6 +17,8 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.11" + cache: 'pip' + cache-dependency-path: '.pre-commit-config.yaml' - name: Get python version run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - uses: actions/cache@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a06488079f..97ed5dfd4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: makepot: "true" services: postgres: - image: postgres:12.0 + image: postgres:12 env: POSTGRES_USER: odoo POSTGRES_PASSWORD: odoo @@ -65,6 +65,13 @@ jobs: run: oca_init_test_database - name: Run tests run: oca_run_tests + - name: Upload screenshots from JS tests + uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: Screenshots of failed JS tests - ${{ matrix.name }}${{ join(matrix.include) }} + path: /tmp/odoo_tests/${{ env.PGDATABASE }} + if-no-files-found: ignore - uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f68985c64..82fa2c0083 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,12 +38,17 @@ repos: entry: found a en.po file language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' + - id: obsolete dotfiles + name: obsolete dotfiles + entry: found obsolete files; remove them + files: '^(\.travis\.yml|\.t2d\.yml|CONTRIBUTING\.md|\.prettierrc\.yml|\.eslintrc\.yml)$' + language: fail - repo: https://github.com/sbidoul/whool - rev: v1.2 + rev: v1.3 hooks: - id: whool-init - repo: https://github.com/oca/maintainer-tools - rev: bf9ecb9938b6a5deca0ff3d870fbd3f33341fded + rev: b89f767503be6ab2b11e4f50a7557cb20066e667 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -95,6 +100,7 @@ repos: additional_dependencies: - "eslint@9.12.0" - "eslint-plugin-jsdoc@50.3.1" + - "globals@16.0.0" - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: diff --git a/.pylintrc b/.pylintrc index 7c62b6d2ed..197cb67370 100644 --- a/.pylintrc +++ b/.pylintrc @@ -25,19 +25,25 @@ disable=all enable=anomalous-backslash-in-string, api-one-deprecated, api-one-multi-together, - assignment-from-none, - attribute-deprecated, class-camelcase, - dangerous-default-value, dangerous-view-replace-wo-priority, - development-status-allowed, duplicate-id-csv, - duplicate-key, duplicate-xml-fields, duplicate-xml-record-id, eval-referenced, - eval-used, incoherent-interpreter-exec-perm, + openerp-exception-warning, + redundant-modulename-xml, + relative-import, + rst-syntax-error, + wrong-tabs-instead-of-spaces, + xml-syntax-error, + assignment-from-none, + attribute-deprecated, + dangerous-default-value, + development-status-allowed, + duplicate-key, + eval-used, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -48,73 +54,68 @@ enable=anomalous-backslash-in-string, method-inverse, method-required-super, method-search, - openerp-exception-warning, pointless-statement, pointless-string-statement, print-used, redundant-keyword-arg, - redundant-modulename-xml, reimported, - relative-import, return-in-init, - rst-syntax-error, sql-injection, too-few-format-args, translation-field, translation-required, unreachable, use-vim-comment, - wrong-tabs-instead-of-spaces, - xml-syntax-error, - attribute-string-redundant, character-not-valid-in-resource-link, - consider-merging-classes-inherited, - context-overridden, create-user-wo-reset-password, dangerous-filter-wo-user, dangerous-qweb-replace-wo-priority, deprecated-data-xml-node, deprecated-openerp-xml-node, duplicate-po-message-definition, - except-pass, file-not-used, + missing-newline-extrafiles, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + str-format-used, + unnecessary-utf8-coding-comment, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + attribute-string-redundant, + consider-merging-classes-inherited, + context-overridden, + except-pass, invalid-commit, manifest-maintainers-list, - missing-newline-extrafiles, missing-readme, missing-return, odoo-addons-relative-import, - old-api7-method-defined, - po-msgstr-variables, - po-syntax-error, renamed-field-parameter, resource-not-exist, - str-format-used, test-folder-imported, translation-contains-variable, translation-positional-used, - unnecessary-utf8-coding-comment, website-manifest-key-not-valid-uri, - xml-attribute-translatable, - xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute, external-request-timeout, - # messages that do not cause the lint step to fail - consider-merging-classes-inherited, + missing-manifest-dependency, + too-complex,, create-user-wo-reset-password, dangerous-filter-wo-user, - deprecated-module, file-not-used, - invalid-commit, - missing-manifest-dependency, missing-newline-extrafiles, - missing-readme, no-utf8-coding-comment, - odoo-addons-relative-import, old-api7-method-defined, + unnecessary-utf8-coding-comment, + # messages that do not cause the lint step to fail + consider-merging-classes-inherited, + deprecated-module, + invalid-commit, + missing-readme, + odoo-addons-relative-import, redefined-builtin, - too-complex, - unnecessary-utf8-coding-comment + manifest-external-assets [REPORTS] diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 018fd61cdd..73674c04d4 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -17,19 +17,25 @@ disable=all enable=anomalous-backslash-in-string, api-one-deprecated, api-one-multi-together, - assignment-from-none, - attribute-deprecated, class-camelcase, - dangerous-default-value, dangerous-view-replace-wo-priority, - development-status-allowed, duplicate-id-csv, - duplicate-key, duplicate-xml-fields, duplicate-xml-record-id, eval-referenced, - eval-used, incoherent-interpreter-exec-perm, + openerp-exception-warning, + redundant-modulename-xml, + relative-import, + rst-syntax-error, + wrong-tabs-instead-of-spaces, + xml-syntax-error, + assignment-from-none, + attribute-deprecated, + dangerous-default-value, + development-status-allowed, + duplicate-key, + eval-used, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -40,56 +46,50 @@ enable=anomalous-backslash-in-string, method-inverse, method-required-super, method-search, - openerp-exception-warning, pointless-statement, pointless-string-statement, print-used, redundant-keyword-arg, - redundant-modulename-xml, reimported, - relative-import, return-in-init, - rst-syntax-error, sql-injection, too-few-format-args, translation-field, translation-required, unreachable, use-vim-comment, - wrong-tabs-instead-of-spaces, - xml-syntax-error, - attribute-string-redundant, character-not-valid-in-resource-link, - consider-merging-classes-inherited, - context-overridden, create-user-wo-reset-password, dangerous-filter-wo-user, dangerous-qweb-replace-wo-priority, deprecated-data-xml-node, deprecated-openerp-xml-node, duplicate-po-message-definition, - except-pass, file-not-used, + missing-newline-extrafiles, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + str-format-used, + unnecessary-utf8-coding-comment, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + attribute-string-redundant, + consider-merging-classes-inherited, + context-overridden, + except-pass, invalid-commit, manifest-maintainers-list, - missing-newline-extrafiles, missing-readme, missing-return, odoo-addons-relative-import, - old-api7-method-defined, - po-msgstr-variables, - po-syntax-error, renamed-field-parameter, resource-not-exist, - str-format-used, test-folder-imported, translation-contains-variable, translation-positional-used, - unnecessary-utf8-coding-comment, website-manifest-key-not-valid-uri, - xml-attribute-translatable, - xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute, external-request-timeout [REPORTS] diff --git a/README.md b/README.md index 593de361ab..3342e0fa19 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ +[![Support the OCA](https://odoo-community.org/readme-banner-image)](https://odoo-community.org/get-involved?utm_source=repo-readme) + +# pos [![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=18.0) [![Pre-commit Status](https://github.com/OCA/pos/actions/workflows/pre-commit.yml/badge.svg?branch=18.0)](https://github.com/OCA/pos/actions/workflows/pre-commit.yml?query=branch%3A18.0) [![Build Status](https://github.com/OCA/pos/actions/workflows/test.yml/badge.svg?branch=18.0)](https://github.com/OCA/pos/actions/workflows/test.yml?query=branch%3A18.0) @@ -7,8 +10,6 @@ -# pos - pos @@ -31,9 +32,9 @@ addon | version | maintainers | summary [pos_lot_barcode](pos_lot_barcode/) | 18.0.1.0.1 | | Scan barcode to enter lot/serial numbers [pos_margin](pos_margin/) | 18.0.1.0.0 | legalsylvain | Margin on PoS Order [pos_order_remove_line](pos_order_remove_line/) | 18.0.1.0.0 | robyf70 | Add button to remove POS order line. -[pos_order_to_sale_order](pos_order_to_sale_order/) | 18.0.1.0.0 | legalsylvain | PoS Order To Sale Order +[pos_order_to_sale_order](pos_order_to_sale_order/) | 18.0.1.1.0 | legalsylvain | PoS Order To Sale Order [pos_payment_method_cashdro](pos_payment_method_cashdro/) | 18.0.1.0.1 | | Allows to pay with CashDro Terminals on the Point of Sale -[pos_product_display_default_code](pos_product_display_default_code/) | 18.0.1.0.0 | | pos: display product default code before product name +[pos_product_display_default_code](pos_product_display_default_code/) | 18.0.1.0.1 | | pos: display product default code before product name [pos_product_multi_barcode](pos_product_multi_barcode/) | 18.0.1.0.0 | | Make product multi barcodes usable in the point of sale [pos_report_session_summary](pos_report_session_summary/) | 18.0.1.0.0 | | Adds a Session Summary PDF report on the POS session [pos_sale_picking_keep](pos_sale_picking_keep/) | 18.0.1.0.1 | pedrobaeza | Keep sale pickings from PoS diff --git a/checklog-odoo.cfg b/checklog-odoo.cfg index 0b55b7bf66..58d43aa666 100644 --- a/checklog-odoo.cfg +++ b/checklog-odoo.cfg @@ -1,3 +1,5 @@ [checklog-odoo] ignore= WARNING.* 0 failed, 0 error\(s\).* + WARNING .* Killing chrome descendants-or-self .* + WARNING.* Missing widget: res_partner_many2one for field of type many2one.* diff --git a/eslint.config.cjs b/eslint.config.cjs index 0d5731f89a..dd0cbe0aef 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -1,3 +1,4 @@ +var globals = require('globals'); jsdoc = require("eslint-plugin-jsdoc"); const config = [{ @@ -16,6 +17,8 @@ const config = [{ openerp: "readonly", owl: "readonly", luxon: "readonly", + QUnit: "readonly", + ...globals.browser, }, ecmaVersion: 2024, @@ -191,7 +194,7 @@ const config = [{ }, }, { - files: ["**/*.esm.js"], + files: ["**/*.esm.js", "**/*test.js"], languageOptions: { ecmaVersion: 2024, diff --git a/pos_order_to_sale_order/README.rst b/pos_order_to_sale_order/README.rst index 01d685681d..bc96dc2fe2 100644 --- a/pos_order_to_sale_order/README.rst +++ b/pos_order_to_sale_order/README.rst @@ -11,7 +11,7 @@ PoS Order To Sale Order !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:ba21448582b7688cef7ddff23c1b0d0b5e70654f169bd61f173907b5285299f8 + !! source digest: sha256:267f1f8226f90a572e102969bf5c443975160b713c861111ed12040591b3840f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png @@ -59,7 +59,7 @@ Configuration - Check the box 'Create Sale Orders' - Select the desired default behaviour -|image_setting| +New feature: **Print Sale Order PDF after creation** |image_setting| .. |image_setting| image:: https://raw.githubusercontent.com/OCA/pos/18.0/pos_order_to_sale_order/static/description/res_config_settings_form.png diff --git a/pos_order_to_sale_order/__manifest__.py b/pos_order_to_sale_order/__manifest__.py index 618202888a..666b4a33e1 100644 --- a/pos_order_to_sale_order/__manifest__.py +++ b/pos_order_to_sale_order/__manifest__.py @@ -4,7 +4,7 @@ { "name": "PoS Order To Sale Order", - "version": "18.0.1.0.0", + "version": "18.0.1.1.0", "author": "GRAP,Odoo Community Association (OCA)", "category": "Point Of Sale", "license": "AGPL-3", diff --git a/pos_order_to_sale_order/i18n/ca.po b/pos_order_to_sale_order/i18n/ca.po index a1b4b5d22a..9e63486dec 100644 --- a/pos_order_to_sale_order/i18n/ca.po +++ b/pos_order_to_sale_order/i18n/ca.po @@ -23,8 +23,7 @@ msgstr "Ajustos de configuració" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Confirmed Sale Order" msgstr "Crear comanda de venda confirmada" @@ -37,8 +36,7 @@ msgstr "Crear comandes de venda confirmades" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Delivered Sale Order" msgstr "Crear comanda de venda entregada" @@ -51,8 +49,7 @@ msgstr "Crear comandes de venda entregades" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Draft Sale Order" msgstr "Crear esborrany de comandes de venda" @@ -65,8 +62,7 @@ msgstr "Crear esborrany de comandes de venda" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Invoiced Sale Order" msgstr "Crear comanda de venda facturada" @@ -79,17 +75,13 @@ msgstr "Crear comandes de venda facturades" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderButton.xml:0 -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderButton.xml:0 -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderButton.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_button/create_order_button.xml:0 msgid "Create Order" msgstr "Crear comanda de venda" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Sale Order" msgstr "Crear comanda de venda" @@ -98,19 +90,12 @@ msgstr "Crear comanda de venda" msgid "Create Sale Orders" msgstr "Crear comandes de venda" -#. module: pos_order_to_sale_order -#. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format -msgid "Discard" -msgstr "Descartar" - #. module: pos_order_to_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_create_confirmed_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_create_confirmed_sale_order msgid "" -"If checked, the cashier will have the possibility to create a confirmed Sale" -" Order, based on the current draft PoS Order." +"If checked, the cashier will have the possibility to create a confirmed Sale " +"Order, based on the current draft PoS Order." msgstr "" "Si es clica, el caixer tindrà la possibilitat de crear una comanda de venda " "confirmada, basada en l'esborrany actual de la comanda del TPV." @@ -119,7 +104,8 @@ msgstr "" #: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_create_invoiced_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_create_invoiced_sale_order msgid "" -"If checked, the cashier will have the possibility to create a confirmed sale Order, based on the current draft PoS Order.\n" +"If checked, the cashier will have the possibility to create a confirmed sale " +"Order, based on the current draft PoS Order.\n" " the according picking will be marked as delivered.\n" " The Invoice will be generated and confirm.\n" " Only invoice payment process will be possible." @@ -134,8 +120,10 @@ msgstr "" #: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_create_delivered_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_create_delivered_sale_order msgid "" -"If checked, the cashier will have the possibility to create a confirmed sale Order, based on the current draft PoS Order.\n" -" the according picking will be marked as delivered. Only invoices process will be possible." +"If checked, the cashier will have the possibility to create a confirmed sale " +"Order, based on the current draft PoS Order.\n" +" the according picking will be marked as delivered. Only invoices process " +"will be possible." msgstr "" "Si es clica, el caixer tindrà la possibilitat de crear una comanda de venda " "confirmada, basada en l'esborrany actual de la comanda del TPV.\n" @@ -152,10 +140,17 @@ msgstr "" "Si es clica, el caixer tindrà la possibilitat de crear una comanda de venda " "confirmada, basada en l'esborrany actual de la comanda del TPV." +#. module: pos_order_to_sale_order +#: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +msgid "" +"If checked, the cashier will print the Sale Order PDF after creating a Sale " +"Order from the current draft PoS Order." +msgstr "" + #. module: pos_order_to_sale_order #. odoo-python #: code:addons/pos_order_to_sale_order/models/sale_order.py:0 -#, python-format msgid "Point of Sale %s" msgstr "Punt de venda %s" @@ -164,6 +159,18 @@ msgstr "Punt de venda %s" msgid "Point of Sale Configuration" msgstr "Configuració del punt de venda" +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_sale_order__pos_session_id +msgid "Pos Session" +msgstr "" + +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +#: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form +msgid "Print Sale Order PDF after creation" +msgstr "" + #. module: pos_order_to_sale_order #: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form msgid "Sale Order Creation" @@ -178,3 +185,7 @@ msgstr "Comandes de venda" #: model:ir.model,name:pos_order_to_sale_order.model_sale_order_line msgid "Sales Order Line" msgstr "Línia de la comanda de venda" + +#, python-format +#~ msgid "Discard" +#~ msgstr "Descartar" diff --git a/pos_order_to_sale_order/i18n/es.po b/pos_order_to_sale_order/i18n/es.po index a6f0e30620..6075834a68 100644 --- a/pos_order_to_sale_order/i18n/es.po +++ b/pos_order_to_sale_order/i18n/es.po @@ -23,8 +23,7 @@ msgstr "Ajustes de configuración" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Confirmed Sale Order" msgstr "Crear pedido de venta confirmado" @@ -37,8 +36,7 @@ msgstr "Crear pedidos de venta confirmados" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Delivered Sale Order" msgstr "Crear pedido de venta entregado" @@ -51,8 +49,7 @@ msgstr "Crear pedidos de venta entregados" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Draft Sale Order" msgstr "Crear borrador de orden de venta" @@ -65,8 +62,7 @@ msgstr "Crear borradores de pedidos de venta" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Invoiced Sale Order" msgstr "Crear pedido de venta facturado" @@ -79,15 +75,13 @@ msgstr "Crear órdenes de venta facturadas" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderButton.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_button/create_order_button.xml:0 msgid "Create Order" msgstr "Crear pedido de venta" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Sale Order" msgstr "Crear pedido de venta" @@ -96,13 +90,6 @@ msgstr "Crear pedido de venta" msgid "Create Sale Orders" msgstr "Crear pedidos de venta" -#. module: pos_order_to_sale_order -#. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format -msgid "Discard" -msgstr "Descartar" - #. module: pos_order_to_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_create_confirmed_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_create_confirmed_sale_order @@ -153,10 +140,17 @@ msgstr "" "Si se marca, el cajero tendrá la posibilidad de crear un borrador de un " "pedido de venta, basado en el borrador actual de la orden de compra." +#. module: pos_order_to_sale_order +#: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +msgid "" +"If checked, the cashier will print the Sale Order PDF after creating a Sale " +"Order from the current draft PoS Order." +msgstr "" + #. module: pos_order_to_sale_order #. odoo-python #: code:addons/pos_order_to_sale_order/models/sale_order.py:0 -#, python-format msgid "Point of Sale %s" msgstr "Punto de venta %s" @@ -165,6 +159,18 @@ msgstr "Punto de venta %s" msgid "Point of Sale Configuration" msgstr "Configuración del punto de venta" +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_sale_order__pos_session_id +msgid "Pos Session" +msgstr "" + +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +#: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form +msgid "Print Sale Order PDF after creation" +msgstr "" + #. module: pos_order_to_sale_order #: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form msgid "Sale Order Creation" @@ -180,6 +186,10 @@ msgstr "Órdenes de venta" msgid "Sales Order Line" msgstr "Línea de pedido de venta" +#, python-format +#~ msgid "Discard" +#~ msgstr "Descartar" + #, python-format #~ msgid "Back" #~ msgstr "Volver" diff --git a/pos_order_to_sale_order/i18n/fr.po b/pos_order_to_sale_order/i18n/fr.po index cf147a26a7..c29876117e 100644 --- a/pos_order_to_sale_order/i18n/fr.po +++ b/pos_order_to_sale_order/i18n/fr.po @@ -23,8 +23,7 @@ msgstr "Paramètres de config" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Confirmed Sale Order" msgstr "Créer une vente confirmée" @@ -37,8 +36,7 @@ msgstr "Créer des ventes confirmées" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Delivered Sale Order" msgstr "Créer une vente livrée" @@ -51,8 +49,7 @@ msgstr "Créer des ventes livrées" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Draft Sale Order" msgstr "Créer un devis en brouillon" @@ -65,8 +62,7 @@ msgstr "Créer des devis" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Invoiced Sale Order" msgstr "Créer une vente facturée" @@ -79,15 +75,13 @@ msgstr "Créer des ventes facturées" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderButton.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_button/create_order_button.xml:0 msgid "Create Order" msgstr "Créer une vente" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Sale Order" msgstr "" @@ -96,13 +90,6 @@ msgstr "" msgid "Create Sale Orders" msgstr "Créer des ventes" -#. module: pos_order_to_sale_order -#. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format -msgid "Discard" -msgstr "Annuler" - #. module: pos_order_to_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_create_confirmed_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_create_confirmed_sale_order @@ -148,10 +135,17 @@ msgstr "" "En cochant la case, le caissier aura la possibilité de créer une vente en " "brouillon, à partir du ticket de caisse en cours." +#. module: pos_order_to_sale_order +#: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +msgid "" +"If checked, the cashier will print the Sale Order PDF after creating a Sale " +"Order from the current draft PoS Order." +msgstr "" + #. module: pos_order_to_sale_order #. odoo-python #: code:addons/pos_order_to_sale_order/models/sale_order.py:0 -#, python-format msgid "Point of Sale %s" msgstr "Point de vente %s" @@ -160,6 +154,18 @@ msgstr "Point de vente %s" msgid "Point of Sale Configuration" msgstr "Paramétrage du point de vente" +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_sale_order__pos_session_id +msgid "Pos Session" +msgstr "" + +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +#: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form +msgid "Print Sale Order PDF after creation" +msgstr "" + #. module: pos_order_to_sale_order #: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form msgid "Sale Order Creation" @@ -174,3 +180,7 @@ msgstr "Bon de commande" #: model:ir.model,name:pos_order_to_sale_order.model_sale_order_line msgid "Sales Order Line" msgstr "Ligne de bons de commande" + +#, python-format +#~ msgid "Discard" +#~ msgstr "Annuler" diff --git a/pos_order_to_sale_order/i18n/it.po b/pos_order_to_sale_order/i18n/it.po index 784bc2fa9f..43282561ca 100644 --- a/pos_order_to_sale_order/i18n/it.po +++ b/pos_order_to_sale_order/i18n/it.po @@ -23,8 +23,7 @@ msgstr "Impostazioni configurazione" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Confirmed Sale Order" msgstr "Crea ordine di vendita confermato" @@ -37,8 +36,7 @@ msgstr "Crea ordini di vendita confermati" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Delivered Sale Order" msgstr "Crea ordine vendita consegnato" @@ -51,8 +49,7 @@ msgstr "Crea ordini di vendita consegnati" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Draft Sale Order" msgstr "Crea bozza ordine di vendita" @@ -65,8 +62,7 @@ msgstr "Crea bozze ordini di vendita" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Invoiced Sale Order" msgstr "Crea ordine di vendita fatturato" @@ -79,15 +75,13 @@ msgstr "Crea ordini di vendita fatturati" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderButton.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_button/create_order_button.xml:0 msgid "Create Order" msgstr "Crea ordine" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Sale Order" msgstr "Crea ordine di vendita" @@ -96,13 +90,6 @@ msgstr "Crea ordine di vendita" msgid "Create Sale Orders" msgstr "Crea ordini di vendita" -#. module: pos_order_to_sale_order -#. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format -msgid "Discard" -msgstr "Abbandona" - #. module: pos_order_to_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_create_confirmed_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_create_confirmed_sale_order @@ -153,10 +140,17 @@ msgstr "" "Se impostato, il cassiere avrà la possibilità di creare una bozza di ordine " "di vendita, in base alla bozza attuale di ordine PoS." +#. module: pos_order_to_sale_order +#: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +msgid "" +"If checked, the cashier will print the Sale Order PDF after creating a Sale " +"Order from the current draft PoS Order." +msgstr "" + #. module: pos_order_to_sale_order #. odoo-python #: code:addons/pos_order_to_sale_order/models/sale_order.py:0 -#, python-format msgid "Point of Sale %s" msgstr "Punto vendita %s" @@ -165,6 +159,18 @@ msgstr "Punto vendita %s" msgid "Point of Sale Configuration" msgstr "Configurazione punto vendita" +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_sale_order__pos_session_id +msgid "Pos Session" +msgstr "" + +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +#: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form +msgid "Print Sale Order PDF after creation" +msgstr "" + #. module: pos_order_to_sale_order #: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form msgid "Sale Order Creation" @@ -179,3 +185,7 @@ msgstr "Ordine di vendita" #: model:ir.model,name:pos_order_to_sale_order.model_sale_order_line msgid "Sales Order Line" msgstr "Riga ordine di vendita" + +#, python-format +#~ msgid "Discard" +#~ msgstr "Abbandona" diff --git a/pos_order_to_sale_order/i18n/pos_order_to_sale_order.pot b/pos_order_to_sale_order/i18n/pos_order_to_sale_order.pot index e4dc3e160e..8ecaf92ad9 100644 --- a/pos_order_to_sale_order/i18n/pos_order_to_sale_order.pot +++ b/pos_order_to_sale_order/i18n/pos_order_to_sale_order.pot @@ -121,6 +121,14 @@ msgid "" "Order, based on the current draft PoS Order." msgstr "" +#. module: pos_order_to_sale_order +#: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +msgid "" +"If checked, the cashier will print the Sale Order PDF after creating a Sale " +"Order from the current draft PoS Order." +msgstr "" + #. module: pos_order_to_sale_order #. odoo-python #: code:addons/pos_order_to_sale_order/models/sale_order.py:0 @@ -137,6 +145,13 @@ msgstr "" msgid "Pos Session" msgstr "" +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +#: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form +msgid "Print Sale Order PDF after creation" +msgstr "" + #. module: pos_order_to_sale_order #: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form msgid "Sale Order Creation" diff --git a/pos_order_to_sale_order/i18n/pt_BR.po b/pos_order_to_sale_order/i18n/pt_BR.po index 54bcd3c6bc..c99a32f9a4 100644 --- a/pos_order_to_sale_order/i18n/pt_BR.po +++ b/pos_order_to_sale_order/i18n/pt_BR.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2024-05-23 01:18+0000\n" -"Last-Translator: Rodrigo Macedo \n" +"Last-Translator: Rodrigo Macedo " +"\n" "Language-Team: none\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" @@ -24,8 +24,7 @@ msgstr "Configurações" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Confirmed Sale Order" msgstr "Criar ordem de venda confirmada" @@ -38,8 +37,7 @@ msgstr "Criar Ordem de Venda confirmada" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Delivered Sale Order" msgstr "Criar Ordem de Venda Entregue" @@ -52,8 +50,7 @@ msgstr "Criar Ordem de Venda entregue" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Draft Sale Order" msgstr "Criar Cotação" @@ -66,8 +63,7 @@ msgstr "Criar Cotação" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Invoiced Sale Order" msgstr "Criar pedido de venda com fatura" @@ -80,15 +76,13 @@ msgstr "Criar pedidos de vendas com fatura" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderButton.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_button/create_order_button.xml:0 msgid "Create Order" msgstr "Criar pedido" #. module: pos_order_to_sale_order #. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format +#: code:addons/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.xml:0 msgid "Create Sale Order" msgstr "Criar Ordem de Venda" @@ -97,13 +91,6 @@ msgstr "Criar Ordem de Venda" msgid "Create Sale Orders" msgstr "Criar Ordem de Venda" -#. module: pos_order_to_sale_order -#. odoo-javascript -#: code:addons/pos_order_to_sale_order/static/src/xml/CreateOrderPopup.xml:0 -#, python-format -msgid "Discard" -msgstr "Descartar" - #. module: pos_order_to_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_create_confirmed_sale_order #: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_create_confirmed_sale_order @@ -154,10 +141,17 @@ msgstr "" "Se marcado, o caixa terá a possibilidade de criar um rascunho de pedido de " "venda, com base no rascunho atual de pedido de PDV." +#. module: pos_order_to_sale_order +#: model:ir.model.fields,help:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,help:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +msgid "" +"If checked, the cashier will print the Sale Order PDF after creating a Sale " +"Order from the current draft PoS Order." +msgstr "" + #. module: pos_order_to_sale_order #. odoo-python #: code:addons/pos_order_to_sale_order/models/sale_order.py:0 -#, python-format msgid "Point of Sale %s" msgstr "Ponto de Venda %s" @@ -166,6 +160,18 @@ msgstr "Ponto de Venda %s" msgid "Point of Sale Configuration" msgstr "Configuração de Ponto de Venda" +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_sale_order__pos_session_id +msgid "Pos Session" +msgstr "" + +#. module: pos_order_to_sale_order +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_pos_config__iface_print_sale_order_pdf +#: model:ir.model.fields,field_description:pos_order_to_sale_order.field_res_config_settings__pos_iface_print_sale_order_pdf +#: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form +msgid "Print Sale Order PDF after creation" +msgstr "" + #. module: pos_order_to_sale_order #: model_terms:ir.ui.view,arch_db:pos_order_to_sale_order.view_res_config_settings_form msgid "Sale Order Creation" @@ -181,6 +187,10 @@ msgstr "Pedidos de Vendas" msgid "Sales Order Line" msgstr "Linha da Ordem de Venda" +#, python-format +#~ msgid "Discard" +#~ msgstr "Descartar" + #, python-format #~ msgid "Back" #~ msgstr "Voltar" diff --git a/pos_order_to_sale_order/models/pos_config.py b/pos_order_to_sale_order/models/pos_config.py index 4550447489..39e8794352 100644 --- a/pos_order_to_sale_order/models/pos_config.py +++ b/pos_order_to_sale_order/models/pos_config.py @@ -47,6 +47,13 @@ class PosConfig(models.Model): " Only invoice payment process will be possible.", ) + iface_print_sale_order_pdf = fields.Boolean( + string="Print Sale Order PDF after creation", + default=False, + help="If checked, the cashier will print the Sale Order PDF" + " after creating a Sale Order from the current draft PoS Order.", + ) + @api.depends( "iface_create_draft_sale_order", "iface_create_confirmed_sale_order", diff --git a/pos_order_to_sale_order/models/res_config_settings.py b/pos_order_to_sale_order/models/res_config_settings.py index e2c50a278f..615de0087e 100644 --- a/pos_order_to_sale_order/models/res_config_settings.py +++ b/pos_order_to_sale_order/models/res_config_settings.py @@ -23,3 +23,7 @@ class ResConfigSettings(models.TransientModel): pos_iface_create_invoiced_sale_order = fields.Boolean( related="pos_config_id.iface_create_invoiced_sale_order", readonly=False ) + + pos_iface_print_sale_order_pdf = fields.Boolean( + related="pos_config_id.iface_print_sale_order_pdf", readonly=False + ) diff --git a/pos_order_to_sale_order/readme/CONFIGURE.md b/pos_order_to_sale_order/readme/CONFIGURE.md index ab058b1e3c..db4e9a6ce7 100644 --- a/pos_order_to_sale_order/readme/CONFIGURE.md +++ b/pos_order_to_sale_order/readme/CONFIGURE.md @@ -2,4 +2,5 @@ - Check the box 'Create Sale Orders' - Select the desired default behaviour +New feature: **Print Sale Order PDF after creation** ![image_setting](../static/description/res_config_settings_form.png) diff --git a/pos_order_to_sale_order/static/description/index.html b/pos_order_to_sale_order/static/description/index.html index 37f7219bc3..58f6c70b90 100644 --- a/pos_order_to_sale_order/static/description/index.html +++ b/pos_order_to_sale_order/static/description/index.html @@ -372,7 +372,7 @@

PoS Order To Sale Order

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:ba21448582b7688cef7ddff23c1b0d0b5e70654f169bd61f173907b5285299f8 +!! source digest: sha256:267f1f8226f90a572e102969bf5c443975160b713c861111ed12040591b3840f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module extends the functionality of point of sale to allow sale @@ -410,7 +410,7 @@

Configuration

  • Check the box ‘Create Sale Orders’
  • Select the desired default behaviour
  • -

    image_setting

    +

    New feature: Print Sale Order PDF after creation image_setting

    Usage

    diff --git a/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.esm.js b/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.esm.js index b155593f14..aea504f48d 100644 --- a/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.esm.js +++ b/pos_order_to_sale_order/static/src/components/create_order_popup/create_order_popup.esm.js @@ -1,8 +1,7 @@ -import {useService} from "@web/core/utils/hooks"; - +import {Component} from "@odoo/owl"; import {Dialog} from "@web/core/dialog/dialog"; import {usePos} from "@point_of_sale/app/store/pos_hook"; -import {Component} from "@odoo/owl"; +import {useService} from "@web/core/utils/hooks"; export class CreateOrderPopup extends Component { static template = "pos_order_to_sale_order.CreateOrderPopup"; @@ -14,6 +13,7 @@ export class CreateOrderPopup extends Component { this.pos = usePos(); this.ui = useService("ui"); this.orm = useService("orm"); + this.action = useService("action"); } async createDraftSaleOrder() { @@ -34,7 +34,10 @@ export class CreateOrderPopup extends Component { async _actionCreateSaleOrder(order_state) { // Create Sale Order - await this._createSaleOrder(order_state); + const sale_order = await this._createSaleOrder(order_state); + if (this.pos.config.iface_print_sale_order_pdf) { + await this._printSaleOrder(sale_order.sale_order_id); + } // Delete current order const current_order = this.pos.get_order(); @@ -61,4 +64,17 @@ export class CreateOrderPopup extends Component { this.ui.unblock(); }); } + + async _printSaleOrder(sale_order_id) { + const url = await this.orm.call("sale.order", "get_portal_url", [ + sale_order_id, + null, + "pdf", + true, + ]); + return await this.action.doAction({ + type: "ir.actions.act_url", + url: url, + }); + } } diff --git a/pos_order_to_sale_order/views/view_res_config_settings.xml b/pos_order_to_sale_order/views/view_res_config_settings.xml index 5d02a4c36c..56497a1b4d 100644 --- a/pos_order_to_sale_order/views/view_res_config_settings.xml +++ b/pos_order_to_sale_order/views/view_res_config_settings.xml @@ -21,6 +21,10 @@ + + + + diff --git a/pos_payment_terminal/README.rst b/pos_payment_terminal/README.rst new file mode 100644 index 0000000000..ab5987d57f --- /dev/null +++ b/pos_payment_terminal/README.rst @@ -0,0 +1,129 @@ +==================== +POS Payment Terminal +==================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:90c98f4f7f6b65736ec4de9619ac22856ba9e32c5c63cb5444c4b63c381bab13 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/18.0/pos_payment_terminal + :alt: OCA/pos +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/pos-18-0/pos-18-0-pos_payment_terminal + :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=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds support for credit card reader and checks printer in +the Point of Sale. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +This module is designed to be installed on the *main Odoo server*. On +the *POSbox/IoTbox*, you should install the module *hw_x* depending on +the protocol implemented in your device. + +Ingenico +<`http://en.wikipedia.org/wiki/Ingenico\\> >`__ +card readers for France support the Telium protocol implemented in the +*hw_telium_payment_terminal* module for the POSbox/IoTBox. + +You can also consider `pywebdriver +project `__ as an alternative +to the POSbox/IoTbox. + +Configuration +============= + +- Go to *Point of Sale > Configuration > Payment Methods*, edit the + payment method corresponding to the card reader and set the field *Use + a payment terminal* to *OCA Payment Terminal*. A new field *Payment + Mode* will appear, that has *Card* as defaut value. If the payment + method is for Checks and you have a check printer, select *Check* + instead. + +|image1| + +.. |image1| image:: https://raw.githubusercontent.com/OCA/pos/18.0/pos_payment_terminal/static/description/pos_payment_method_form.png + +Usage +===== + +- In the frontend of the POS, when you select a payment method that has + a payment mode with *Use a Payment Terminal* set to *OCA Payment + Terminal*, you will have an additionnal *Send* button: if you click on + that button, the amount, the currency and the payment mode will be + sent to the POSbox/IoTBox/pywebdriver. +- To enable the proxy when use *OCA Payment Termail*, you can go to + ``Point of Sale > Settings > Connected Devices``, then enable IoT Box, + enter IP Address and enable ``OCA Payment Terminal``. When the OCA + Payment Terminal is enable, you can block the return to the basket + from the payment screen by enabling the *Hide Back Button* option. + +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 +------- + +* Aurélien DUMAINE +* GRAP +* Akretion +* ACSONE SA/NV + +Contributors +------------ + +- Aurelien Dumaine +- Alexis de Lattre +- Sylvain LE GAL (https://twitter.com/legalsylvain) +- `Trobz `__ + + - Phan Hong Phuc + +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/pos_payment_terminal/__init__.py b/pos_payment_terminal/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/pos_payment_terminal/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/pos_payment_terminal/__manifest__.py b/pos_payment_terminal/__manifest__.py new file mode 100644 index 0000000000..e238308b56 --- /dev/null +++ b/pos_payment_terminal/__manifest__.py @@ -0,0 +1,32 @@ +# Copyright 2014-2020 Aurélien DUMAINE +# Copyrght 2015-2020 Akretion (http://www.akretion.com/) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "POS Payment Terminal", + "version": "18.0.1.0.0", + "category": "Point Of Sale", + "summary": "Point of sale: support generic payment terminal", + "author": ( + "Aurélien DUMAINE," + "GRAP," + "Akretion," + "ACSONE SA/NV," + "Odoo Community Association (OCA)" + ), + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": ["point_of_sale"], + "data": [ + "views/pos_payment_method.xml", + "views/res_config_settings_views.xml", + ], + "assets": { + "point_of_sale._assets_pos": [ + "pos_payment_terminal/static/src/app/*", + "pos_payment_terminal/static/src/overrides/**/*", + ], + }, + "installable": True, +} diff --git a/pos_payment_terminal/i18n/es.po b/pos_payment_terminal/i18n/es.po new file mode 100644 index 0000000000..a8bc2bf36e --- /dev/null +++ b/pos_payment_terminal/i18n/es.po @@ -0,0 +1,87 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_terminal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-23 02:51+0000\n" +"PO-Revision-Date: 2025-12-23 02:51+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Cannot process transactions with negative amount." +msgstr "No se pueden procesar transacciones con un importe negativo." + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__card +msgid "Card" +msgstr "Tarjeta" + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__check +msgid "Check" +msgstr "Talón" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Connecting to the payment terminal failed" +msgstr "No se pudo conectar con el terminal de pago." + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Failed to send the amount to pay to the payment terminal.Press the red " +"button on the payment terminal and try again." +msgstr "" +"No se pudo enviar el importe a pagar al terminal de pago. " +"Presione el botón rojo en el terminal de pago e inténtelo de nuevo." + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_mode +msgid "Payment Mode" +msgstr "Forma de pago" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Payment Terminal Error" +msgstr "Error de terminal de pago" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Please press the red button on the payment terminal to cancel the " +"transaction." +msgstr "" +"Pulse el botón rojo del terminal de pago para cancelar la transacción." + +#. module: pos_payment_terminal +#: model:ir.model,name:pos_payment_terminal.model_pos_payment_method +msgid "Point of Sale Payment Methods" +msgstr "Métodos de pago en el punto de venta " + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "Terminal Identifier" +msgstr "Identificador de Terminal" + +#. module: pos_payment_terminal +#: model:ir.model.fields,help:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "" +"The identifier of the terminal as known by the hardware proxy. Leave empty " +"if the proxy has only one terminal connected." +msgstr "" +"El identificador del terminal tal y como lo conoce el proxy de hardware. " +"Dejar vacío si el proxy sólo tiene un terminal conectado." diff --git a/pos_payment_terminal/i18n/fr.po b/pos_payment_terminal/i18n/fr.po new file mode 100644 index 0000000000..3a526ff729 --- /dev/null +++ b/pos_payment_terminal/i18n/fr.po @@ -0,0 +1,87 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_terminal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-23 02:54+0000\n" +"PO-Revision-Date: 2025-12-23 02:54+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Cannot process transactions with negative amount." +msgstr "Impossible d'envoyer des montants négatifs au lecteur CB" + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__card +msgid "Card" +msgstr "Carte" + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__check +msgid "Check" +msgstr "Chèque" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Connecting to the payment terminal failed" +msgstr "La connexion au terminal de paiement a échoué" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Failed to send the amount to pay to the payment terminal.Press the red " +"button on the payment terminal and try again." +msgstr "" +"Échec de l’envoi du montant à payer au terminal de paiement. " +"Appuyez sur le bouton rouge du terminal de paiement et réessayez." + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_mode +msgid "Payment Mode" +msgstr "Mode de paiement" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Payment Terminal Error" +msgstr "Erreur - Lecteur CB" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Please press the red button on the payment terminal to cancel the " +"transaction." +msgstr "" +"Appuyez sur le bouton rouge du terminal de paiement et réessayez." + +#. module: pos_payment_terminal +#: model:ir.model,name:pos_payment_terminal.model_pos_payment_method +msgid "Point of Sale Payment Methods" +msgstr "Modes de paiement du point de vente" + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "Terminal Identifier" +msgstr "Identifiant du terminal" + +#. module: pos_payment_terminal +#: model:ir.model.fields,help:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "" +"The identifier of the terminal as known by the hardware proxy. Leave empty " +"if the proxy has only one terminal connected." +msgstr "" +"L’identifiant du terminal tel qu’il est connu par le proxy matériel. " +"Laissez ce champ vide si le proxy n’a qu’un seul terminal connecté." diff --git a/pos_payment_terminal/i18n/hr.po b/pos_payment_terminal/i18n/hr.po new file mode 100644 index 0000000000..0838c148af --- /dev/null +++ b/pos_payment_terminal/i18n/hr.po @@ -0,0 +1,88 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_terminal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-23 02:53+0000\n" +"PO-Revision-Date: 2025-12-23 02:53+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Cannot process transactions with negative amount." +msgstr "Nije moguće obraditi transakcije s negativnim iznosom." + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__card +msgid "Card" +msgstr "Kartica" + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__check +msgid "Check" +msgstr "Ček" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Connecting to the payment terminal failed" +msgstr "Povezivanje s terminalom za plaćanje nije uspjelo." + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Failed to send the amount to pay to the payment terminal.Press the red " +"button on the payment terminal and try again." +msgstr "" +"Slanje iznosa za plaćanje na terminal za plaćanje nije uspjelo. " +"Pritisnite crvenu tipku na terminalu za plaćanje i pokušajte ponovno." + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_mode +msgid "Payment Mode" +msgstr "Način Plaćanja" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Payment Terminal Error" +msgstr "Greška Terminala Za Plaćanje" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Please press the red button on the payment terminal to cancel the " +"transaction." +msgstr "" +"Molimo pritisnite crvenu tipku na terminalu za plaćanje kako biste otkazali " +"transakciju." + +#. module: pos_payment_terminal +#: model:ir.model,name:pos_payment_terminal.model_pos_payment_method +msgid "Point of Sale Payment Methods" +msgstr "Načini plaćanja na prodajnom mjestu" + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "Terminal Identifier" +msgstr "Identifikator Terminala" + +#. module: pos_payment_terminal +#: model:ir.model.fields,help:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "" +"The identifier of the terminal as known by the hardware proxy. Leave empty " +"if the proxy has only one terminal connected." +msgstr "" +"Identifikator terminala kako ga prepoznaje hardverski proxy. " +"Ostavite prazno ako je na proxy povezan samo jedan terminal." diff --git a/pos_payment_terminal/i18n/it.po b/pos_payment_terminal/i18n/it.po new file mode 100644 index 0000000000..a532b76eda --- /dev/null +++ b/pos_payment_terminal/i18n/it.po @@ -0,0 +1,88 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_terminal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-23 02:52+0000\n" +"PO-Revision-Date: 2025-12-23 02:52+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Cannot process transactions with negative amount." +msgstr "Impossibile elaborare transazioni con importo negativo." + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__card +msgid "Card" +msgstr "Carta" + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__check +msgid "Check" +msgstr "Conto" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Connecting to the payment terminal failed" +msgstr "Connessione al terminale di pagamento non riuscita." + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Failed to send the amount to pay to the payment terminal.Press the red " +"button on the payment terminal and try again." +msgstr "" +"Invio dell’importo da pagare al terminale di pagamento non riuscito. " +"Premere il pulsante rosso sul terminale di pagamento e riprovare." + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_mode +msgid "Payment Mode" +msgstr "Metodo di pagamento" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Payment Terminal Error" +msgstr "Errore terminale pagamento" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Please press the red button on the payment terminal to cancel the " +"transaction." +msgstr "" +"Fare clic sul pulsante rosso sul terminale pagamento per annullare la " +"transizione." + +#. module: pos_payment_terminal +#: model:ir.model,name:pos_payment_terminal.model_pos_payment_method +msgid "Point of Sale Payment Methods" +msgstr "Metodi di pagamento punto vendita" + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "Terminal Identifier" +msgstr "Identificatore terminale" + +#. module: pos_payment_terminal +#: model:ir.model.fields,help:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "" +"The identifier of the terminal as known by the hardware proxy. Leave empty " +"if the proxy has only one terminal connected." +msgstr "" +"L'identificativo del terminale come conosciuto dal dispositivo proxy. " +"Lasciare vuoto se il proxy ha solo un terminale collegato." diff --git a/pos_payment_terminal/i18n/nl.po b/pos_payment_terminal/i18n/nl.po new file mode 100644 index 0000000000..53ccd636d9 --- /dev/null +++ b/pos_payment_terminal/i18n/nl.po @@ -0,0 +1,87 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_terminal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-23 02:55+0000\n" +"PO-Revision-Date: 2025-12-23 02:55+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Cannot process transactions with negative amount." +msgstr "Het is niet mogelijk transacties met een negatief bedrag te verwerken." + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__card +msgid "Card" +msgstr "Kaart" + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__check +msgid "Check" +msgstr "Cheque" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Connecting to the payment terminal failed" +msgstr "Verbinding met de betalingsterminal mislukt." + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Failed to send the amount to pay to the payment terminal.Press the red " +"button on the payment terminal and try again." +msgstr "" +"Het verzenden van het te betalen bedrag naar de betalingsterminal is mislukt. " +"Druk op de rode knop op de betalingsterminal en probeer het opnieuw." + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_mode +msgid "Payment Mode" +msgstr "Betaalmodus" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Payment Terminal Error" +msgstr "Fout van de betalingsterminal" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Please press the red button on the payment terminal to cancel the " +"transaction." +msgstr "" +"Druk alstublieft op de rode knop op de betalingsterminal om de transactie te annuleren." + +#. module: pos_payment_terminal +#: model:ir.model,name:pos_payment_terminal.model_pos_payment_method +msgid "Point of Sale Payment Methods" +msgstr "Kassa betaalmethodes" + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "Terminal Identifier" +msgstr "Terminalidentificatie" + +#. module: pos_payment_terminal +#: model:ir.model.fields,help:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "" +"The identifier of the terminal as known by the hardware proxy. Leave empty " +"if the proxy has only one terminal connected." +msgstr "" +"De identificatie van de terminal zoals bekend bij de hardware-proxy. " +"Laat leeg als de proxy slechts één terminal heeft aangesloten." diff --git a/pos_payment_terminal/i18n/pos_payment_terminal.pot b/pos_payment_terminal/i18n/pos_payment_terminal.pot new file mode 100644 index 0000000000..a92f080609 --- /dev/null +++ b/pos_payment_terminal/i18n/pos_payment_terminal.pot @@ -0,0 +1,82 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_terminal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-23 02:51+0000\n" +"PO-Revision-Date: 2025-12-23 02:51+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Cannot process transactions with negative amount." +msgstr "" + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__card +msgid "Card" +msgstr "" + +#. module: pos_payment_terminal +#: model:ir.model.fields.selection,name:pos_payment_terminal.selection__pos_payment_method__oca_payment_terminal_mode__check +msgid "Check" +msgstr "" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Connecting to the payment terminal failed" +msgstr "" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Failed to send the amount to pay to the payment terminal.Press the red " +"button on the payment terminal and try again." +msgstr "" + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_mode +msgid "Payment Mode" +msgstr "" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "Payment Terminal Error" +msgstr "" + +#. module: pos_payment_terminal +#. odoo-javascript +#: code:addons/pos_payment_terminal/static/src/js/payment_terminal.esm.js:0 +msgid "" +"Please press the red button on the payment terminal to cancel the " +"transaction." +msgstr "" + +#. module: pos_payment_terminal +#: model:ir.model,name:pos_payment_terminal.model_pos_payment_method +msgid "Point of Sale Payment Methods" +msgstr "" + +#. module: pos_payment_terminal +#: model:ir.model.fields,field_description:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "Terminal Identifier" +msgstr "" + +#. module: pos_payment_terminal +#: model:ir.model.fields,help:pos_payment_terminal.field_pos_payment_method__oca_payment_terminal_id +msgid "" +"The identifier of the terminal as known by the hardware proxy. Leave empty " +"if the proxy has only one terminal connected." +msgstr "" diff --git a/pos_payment_terminal/models/__init__.py b/pos_payment_terminal/models/__init__.py new file mode 100644 index 0000000000..fb2fc8ab3e --- /dev/null +++ b/pos_payment_terminal/models/__init__.py @@ -0,0 +1,3 @@ +from . import pos_payment_method +from . import pos_config +from . import res_config_settings diff --git a/pos_payment_terminal/models/pos_config.py b/pos_payment_terminal/models/pos_config.py new file mode 100644 index 0000000000..b6eb4b3e94 --- /dev/null +++ b/pos_payment_terminal/models/pos_config.py @@ -0,0 +1,16 @@ +from odoo import fields, models + + +class PosConfig(models.Model): + _inherit = "pos.config" + + iface_payment_terminal = fields.Boolean( + string="OCA Payment Terminal", + help="A payment terminal is available on the Proxy", + ) + payment_terminal_hide_back_btn = fields.Boolean( + string="Hide Back Button", + help="Prevent from returning to basket from payment " + "screen as soon as a payment line exists", + default=True, + ) diff --git a/pos_payment_terminal/models/pos_payment_method.py b/pos_payment_terminal/models/pos_payment_method.py new file mode 100644 index 0000000000..423de3b613 --- /dev/null +++ b/pos_payment_terminal/models/pos_payment_method.py @@ -0,0 +1,38 @@ +# Copyrght 2020 Akretion France (http://www.akretion.com/) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class PosPaymentMethod(models.Model): + _inherit = "pos.payment.method" + + def _get_payment_terminal_selection(self): + res = super()._get_payment_terminal_selection() + res.append(("oca_payment_terminal", "OCA Payment Terminal")) + return res + + oca_payment_terminal_mode = fields.Selection( + [("card", "Card"), ("check", "Check")], string="Payment Mode", default="card" + ) + oca_payment_terminal_id = fields.Char( + string="Terminal Identifier", + help=("The identifier of the terminal as known by the hardware proxy. "), + ) + oca_fast_payment = fields.Boolean( + string="Fast Payment", + default=True, + ) + + @api.model + def _load_pos_data_fields(self, config_id): + fields = super()._load_pos_data_fields(config_id) + fields.extend( + [ + "oca_payment_terminal_mode", + "oca_payment_terminal_id", + "oca_fast_payment", + ] + ) + return fields diff --git a/pos_payment_terminal/models/res_config_settings.py b/pos_payment_terminal/models/res_config_settings.py new file mode 100644 index 0000000000..5c8a5262f0 --- /dev/null +++ b/pos_payment_terminal/models/res_config_settings.py @@ -0,0 +1,14 @@ +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + pos_iface_payment_terminal = fields.Boolean( + related="pos_config_id.iface_payment_terminal", + readonly=False, + ) + pos_payment_terminal_hide_back_btn = fields.Boolean( + related="pos_config_id.payment_terminal_hide_back_btn", + readonly=False, + ) diff --git a/pos_payment_terminal/pyproject.toml b/pos_payment_terminal/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/pos_payment_terminal/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/pos_payment_terminal/readme/CONFIGURE.md b/pos_payment_terminal/readme/CONFIGURE.md new file mode 100644 index 0000000000..9385c023c2 --- /dev/null +++ b/pos_payment_terminal/readme/CONFIGURE.md @@ -0,0 +1,8 @@ +- Go to *Point of Sale \> Configuration \> Payment Methods*, edit the + payment method corresponding to the card reader and set the field *Use + a payment terminal* to *OCA Payment Terminal*. A new field *Payment + Mode* will appear, that has *Card* as defaut value. If the payment + method is for Checks and you have a check printer, select *Check* + instead. + +![](../static/description/pos_payment_method_form.png) diff --git a/pos_payment_terminal/readme/CONTRIBUTORS.md b/pos_payment_terminal/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..916e2d03a4 --- /dev/null +++ b/pos_payment_terminal/readme/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +- Aurelien Dumaine +- Alexis de Lattre \ +- Sylvain LE GAL () +- [Trobz](https://www.trobz.com) + - Phan Hong Phuc \ diff --git a/pos_payment_terminal/readme/DESCRIPTION.md b/pos_payment_terminal/readme/DESCRIPTION.md new file mode 100644 index 0000000000..93ce34d40e --- /dev/null +++ b/pos_payment_terminal/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module adds support for credit card reader and checks printer in +the Point of Sale. diff --git a/pos_payment_terminal/readme/INSTALL.md b/pos_payment_terminal/readme/INSTALL.md new file mode 100644 index 0000000000..4a356ad0bd --- /dev/null +++ b/pos_payment_terminal/readme/INSTALL.md @@ -0,0 +1,11 @@ +This module is designed to be installed on the *main Odoo server*. On +the *POSbox/IoTbox*, you should install the module *hw_x* depending on +the protocol implemented in your device. + +Ingenico \ card readers for +France support the Telium protocol implemented in the +*hw_telium_payment_terminal* module for the POSbox/IoTBox. + +You can also consider [pywebdriver +project](https://github.com/akretion/pywebdriver) as an alternative to +the POSbox/IoTbox. diff --git a/pos_payment_terminal/readme/USAGE.md b/pos_payment_terminal/readme/USAGE.md new file mode 100644 index 0000000000..5f0ff45df7 --- /dev/null +++ b/pos_payment_terminal/readme/USAGE.md @@ -0,0 +1,11 @@ +- In the frontend of the POS, when you select a payment method that has a +payment mode with *Use a Payment Terminal* set to *OCA Payment +Terminal*, you will have an additionnal *Send* button: if you click on +that button, the amount, the currency and the payment mode will be sent +to the POSbox/IoTBox/pywebdriver. +- To enable the proxy when use *OCA Payment Termail*, you can go to +`Point of Sale > Settings > Connected Devices`, then enable IoT Box, +enter IP Address and enable `OCA Payment Terminal`. +When the OCA Payment Terminal is enable, +you can block the return to the basket from the payment screen +by enabling the *Hide Back Button* option. diff --git a/pos_payment_terminal/static/description/icon.png b/pos_payment_terminal/static/description/icon.png new file mode 100644 index 0000000000..1dcc49c24f Binary files /dev/null and b/pos_payment_terminal/static/description/icon.png differ diff --git a/pos_payment_terminal/static/description/index.html b/pos_payment_terminal/static/description/index.html new file mode 100644 index 0000000000..26ece7d0f8 --- /dev/null +++ b/pos_payment_terminal/static/description/index.html @@ -0,0 +1,476 @@ + + + + + +POS Payment Terminal + + + +
    +

    POS Payment Terminal

    + + +

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

    +

    This module adds support for credit card reader and checks printer in +the Point of Sale.

    +

    Table of contents

    + +
    +

    Installation

    +

    This module is designed to be installed on the main Odoo server. On +the POSbox/IoTbox, you should install the module hw_x depending on +the protocol implemented in your device.

    +

    Ingenico +<http://en.wikipedia.org/wiki/Ingenico\> +card readers for France support the Telium protocol implemented in the +hw_telium_payment_terminal module for the POSbox/IoTBox.

    +

    You can also consider pywebdriver +project as an alternative +to the POSbox/IoTbox.

    +
    +
    +

    Configuration

    +
      +
    • Go to Point of Sale > Configuration > Payment Methods, edit the +payment method corresponding to the card reader and set the field Use +a payment terminal to OCA Payment Terminal. A new field Payment +Mode will appear, that has Card as defaut value. If the payment +method is for Checks and you have a check printer, select Check +instead.
    • +
    +

    image1

    +
    +
    +

    Usage

    +
      +
    • In the frontend of the POS, when you select a payment method that has +a payment mode with Use a Payment Terminal set to OCA Payment +Terminal, you will have an additionnal Send button: if you click on +that button, the amount, the currency and the payment mode will be +sent to the POSbox/IoTBox/pywebdriver.
    • +
    • To enable the proxy when use OCA Payment Termail, you can go to +Point of Sale > Settings > Connected Devices, then enable IoT Box, +enter IP Address and enable OCA Payment Terminal. When the OCA +Payment Terminal is enable, you can block the return to the basket +from the payment screen by enabling the Hide Back Button option.
    • +
    +
    +
    +

    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

    +
      +
    • Aurélien DUMAINE
    • +
    • GRAP
    • +
    • Akretion
    • +
    • ACSONE SA/NV
    • +
    +
    +
    +

    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/pos_payment_terminal/static/description/pos_payment_method_form.png b/pos_payment_terminal/static/description/pos_payment_method_form.png new file mode 100644 index 0000000000..7fabf982df Binary files /dev/null and b/pos_payment_terminal/static/description/pos_payment_method_form.png differ diff --git a/pos_payment_terminal/static/src/app/payment_terminal.esm.js b/pos_payment_terminal/static/src/app/payment_terminal.esm.js new file mode 100644 index 0000000000..6ed86b997c --- /dev/null +++ b/pos_payment_terminal/static/src/app/payment_terminal.esm.js @@ -0,0 +1,179 @@ +/* globals setInterval, clearInterval, console*/ + +import {AlertDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; +import {PaymentInterface} from "@point_of_sale/app/payment/payment_interface"; +import {_t} from "@web/core/l10n/translation"; +import {register_payment_method} from "@point_of_sale/app/store/pos_store"; + +export class OCAPaymentTerminal extends PaymentInterface { + get fast_payments() { + const order = this.pos.get_order(); + const paymentLine = order.get_selected_paymentline(); + return ( + paymentLine && + paymentLine.payment_method_id.use_payment_terminal === + "oca_payment_terminal" && + paymentLine.payment_method_id.oca_fast_payment + ); + } + + async send_payment_request(uuid) { + await super.send_payment_request(uuid); + return this._ocaPaymentTerminalPay(uuid); + } + + send_payment_cancel(order, uuid) { + super.send_payment_cancel(order, uuid); + return this._ocaPaymentTerminalCancel(); + } + + pendingOCAPaymentLine() { + return this.pos.getPendingPaymentLine("oca_payment_terminal"); + } + + _ocaPaymentTerminalGetData(uuid) { + const order = this.pos.get_order(); + const line = order.get_selected_paymentline(); + const transactionId = order.name + .replace(" ", "") + .replaceAll("-", "") + .toUpperCase(); + const currency = this.pos.currency; + return { + amount: line.amount, + currency_iso: currency.name, + currency_decimals: currency.decimals, + payment_mode: this.payment_method_id.oca_payment_terminal_mode, + payment_id: uuid, + order_id: transactionId, + }; + } + + _ocaPaymentTerminalPay(uuid) { + const order = this.pos.get_order(); + if (order.get_selected_paymentline().amount <= 0) { + this._showError(_t("Cannot process transactions with negative amount.")); + return Promise.resolve(false); + } + const data = this._ocaPaymentTerminalGetData(uuid); + if (this.payment_method_id.oca_payment_terminal_id) { + data.terminal_id = this.payment_method_id.oca_payment_terminal_id; + } + return this._callOCAPaymentTerminal(data).then((response) => { + return this._handleOCAPaymentTerminalResponse(response); + }); + } + + _handleOCAPaymentTerminalResponse(response) { + const line = this.pendingOCAPaymentLine(); + if (!response) { + this._showError( + _t( + "Failed to send the amount to pay to the payment terminal." + + "Press the red button on the payment terminal and try again." + ) + ); + // There was an error, let the user retry. + return Promise.resolve(false); + } else if (response instanceof Object && "transaction_id" in response) { + line.set_payment_status("waitingCard"); + this._setTransactionStatus(line, response); + return new Promise((resolve, reject) => { + this._ocaPollForTransactionStatus(line, resolve, reject); + }); + } else if (response === true) { + return Promise.resolve(true); + } + return Promise.resolve(false); + } + + _ocaPollForTransactionStatus(paymentLine, resolve, reject) { + const timerId = setInterval(() => { + // Query the driver status more frequently than the regular POS + // proxy, to get faster feedback when the transaction is + // complete on the terminal. + const status_params = {}; + if (this.payment_method_id.oca_payment_terminal_id) { + status_params.terminal_id = + this.payment_method_id.oca_payment_terminal_id; + } + this.pos.hardwareProxy + .message("status_json", status_params) + .then((drivers) => { + for (const driver_name in drivers) { + // Look for a driver that is a payment terminal and has transactions. + const driver = drivers[driver_name]; + if (!driver.is_terminal || !("transactions" in driver)) { + continue; + } + for (const transaction_id in driver.transactions) { + const transaction = driver.transactions[transaction_id]; + if ( + transaction.transaction_id === + paymentLine.terminal_transaction_id + ) { + // Look for the transaction corresponding to + // the payment line. + this._setTransactionStatus(paymentLine, transaction); + if (paymentLine.terminal_transaction_success !== null) { + resolve(paymentLine.terminal_transaction_success); + // Stop the loop + clearInterval(timerId); + } + } + } + } + }) + .catch(() => { + console.error("Error querying terminal driver status"); + // We could not query the transaction status so we + // won't know the transaction result: we let the user + // enter the outcome manually. This is done by + // rejecting the promise as explained in the + // send_payment_request() documentation. + paymentLine.set_payment_status("force_done"); + reject(); + // Stop the loop + clearInterval(timerId); + }); + }, 1000); + } + + _setTransactionStatus(paymentLine, transaction) { + paymentLine.terminal_transaction_id = transaction.transaction_id; + paymentLine.terminal_transaction_success = transaction.success; + paymentLine.terminal_transaction_status = transaction.status; + paymentLine.terminal_transaction_status_details = transaction.status_details; + // Payment transaction reference, for accounting reconciliation purposes. + paymentLine.transaction_id = transaction.transaction_id; + } + + _callOCAPaymentTerminal(data) { + return this.pos.hardwareProxy + .message("payment_terminal_transaction_start", { + payment_info: JSON.stringify(data), + }) + .then((response) => { + return response; + }) + .catch(() => { + console.error("Error starting payment transaction"); + return false; + }); + } + + _ocaPaymentTerminalCancel() { + const line = this.pendingOCAPaymentLine(); + line.set_payment_status("retry"); + return true; + } + + _showError(msg, title) { + this.env.services.dialog.add(AlertDialog, { + title: title || _t("Payment Terminal Error"), + body: msg, + }); + } +} + +register_payment_method("oca_payment_terminal", OCAPaymentTerminal); diff --git a/pos_payment_terminal/static/src/app/pos_store.esm.js b/pos_payment_terminal/static/src/app/pos_store.esm.js new file mode 100644 index 0000000000..0c8b4b7ab3 --- /dev/null +++ b/pos_payment_terminal/static/src/app/pos_store.esm.js @@ -0,0 +1,12 @@ +import {PosStore} from "@point_of_sale/app/store/pos_store"; +import {patch} from "@web/core/utils/patch"; + +patch(PosStore.prototype, { + // @Override + useProxy() { + return ( + (this.config.is_posbox && this.config.iface_payment_terminal) || + super.useProxy() + ); + }, +}); diff --git a/pos_payment_terminal/static/src/overrides/components/payment_screen/payment_screen.xml b/pos_payment_terminal/static/src/overrides/components/payment_screen/payment_screen.xml new file mode 100644 index 0000000000..bbe9cd409f --- /dev/null +++ b/pos_payment_terminal/static/src/overrides/components/payment_screen/payment_screen.xml @@ -0,0 +1,19 @@ + + + + + + currentOrder.shouldHideReturnToBasketButton() + + + + + + + diff --git a/pos_payment_terminal/static/src/overrides/models/pos_order.esm.js b/pos_payment_terminal/static/src/overrides/models/pos_order.esm.js new file mode 100644 index 0000000000..da10b6e82a --- /dev/null +++ b/pos_payment_terminal/static/src/overrides/models/pos_order.esm.js @@ -0,0 +1,19 @@ +import {PosOrder} from "@point_of_sale/app/models/pos_order"; +import {patch} from "@web/core/utils/patch"; + +patch(PosOrder.prototype, { + shouldHideReturnToBasketButton() { + if (this.payment_ids.length > 0) { + for (const line of this.payment_ids) { + if ( + line.payment_method_id.use_payment_terminal === + "oca_payment_terminal" && + this.config.payment_terminal_hide_back_btn + ) { + return true; + } + } + } + return false; + }, +}); diff --git a/pos_payment_terminal/views/pos_payment_method.xml b/pos_payment_terminal/views/pos_payment_method.xml new file mode 100644 index 0000000000..7139cb315c --- /dev/null +++ b/pos_payment_terminal/views/pos_payment_method.xml @@ -0,0 +1,23 @@ + + + + pos.payment.method + + + + + + + + + + diff --git a/pos_payment_terminal/views/res_config_settings_views.xml b/pos_payment_terminal/views/res_config_settings_views.xml new file mode 100644 index 0000000000..021a322c1d --- /dev/null +++ b/pos_payment_terminal/views/res_config_settings_views.xml @@ -0,0 +1,29 @@ + + + + res.config.settings.view.form.inherit + res.config.settings + + + + +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/pos_product_display_default_code/README.rst b/pos_product_display_default_code/README.rst index 97c566630d..f820e1846d 100644 --- a/pos_product_display_default_code/README.rst +++ b/pos_product_display_default_code/README.rst @@ -11,7 +11,7 @@ PoS Product Display Default Code !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:3a794299f4809f57b39b212a1aec97d2dfc307e08e685035978e1934c127a4e4 + !! source digest: sha256:1ad717dfbd45ebbc7f1819902d6740233d0c6415d1e7ca0b5411523a84215bab !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/pos_product_display_default_code/__manifest__.py b/pos_product_display_default_code/__manifest__.py index 3424dde30f..f7dcf19d50 100644 --- a/pos_product_display_default_code/__manifest__.py +++ b/pos_product_display_default_code/__manifest__.py @@ -1,7 +1,7 @@ { "name": "PoS Product Display Default Code", "summary": "pos: display product default code before product name", - "version": "18.0.1.0.0", + "version": "18.0.1.0.1", "category": "Point of Sale", "website": "https://github.com/OCA/pos", "author": "Odoo Community Association (OCA), Akretion, FactorLibre", diff --git a/pos_product_display_default_code/static/description/index.html b/pos_product_display_default_code/static/description/index.html index 631de4c94f..4a1dba8b0e 100644 --- a/pos_product_display_default_code/static/description/index.html +++ b/pos_product_display_default_code/static/description/index.html @@ -372,7 +372,7 @@

    PoS Product Display Default Code

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:3a794299f4809f57b39b212a1aec97d2dfc307e08e685035978e1934c127a4e4 +!! source digest: sha256:1ad717dfbd45ebbc7f1819902d6740233d0c6415d1e7ca0b5411523a84215bab !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

    This module makes Odoo show the internal reference of the product in the diff --git a/pos_product_display_default_code/static/tests/tours/product_screen_tour.esm.js b/pos_product_display_default_code/static/tests/tours/product_screen_tour.esm.js index 3fa3f21597..8a5f4eb0fa 100644 --- a/pos_product_display_default_code/static/tests/tours/product_screen_tour.esm.js +++ b/pos_product_display_default_code/static/tests/tours/product_screen_tour.esm.js @@ -1,5 +1,4 @@ import * as Chrome from "@point_of_sale/../tests/tours/utils/chrome_util"; -import * as Dialog from "@point_of_sale/../tests/tours/utils/dialog_util"; import * as ProductScreen from "@point_of_sale/../tests/tours/utils/product_screen_util"; import {registry} from "@web/core/registry"; @@ -7,7 +6,6 @@ registry.category("web_tour.tours").add("SearchProductByDefaultCode", { steps: () => [ Chrome.startPoS(), - Dialog.confirm("Open Register"), ProductScreen.searchProduct("chair"), ProductScreen.clickDisplayedProduct("[CHAIR_01] Test sofa"), Chrome.endTour(), diff --git a/pos_product_display_default_code/tests/test_frontend.py b/pos_product_display_default_code/tests/test_frontend.py index 0fc6985ade..c57281173f 100644 --- a/pos_product_display_default_code/tests/test_frontend.py +++ b/pos_product_display_default_code/tests/test_frontend.py @@ -15,6 +15,7 @@ def test_product_search_by_default_code(self): ) self.main_pos_config.display_default_code = True self.main_pos_config.with_user(self.pos_user).open_ui() + self.main_pos_config.current_session_id.set_opening_control(0, "") self.start_tour( "/pos/ui?config_id=%d" % self.main_pos_config.id, "SearchProductByDefaultCode",