mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-19 19:12:00 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
47
odoo-bringout-oca-pos-pos_session_pay_invoice/README.md
Normal file
47
odoo-bringout-oca-pos-pos_session_pay_invoice/README.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# POS Session Pay invoice
|
||||
|
||||
Odoo addon: pos_session_pay_invoice
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-pos-pos_session_pay_invoice
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- point_of_sale
|
||||
- account_cash_invoice
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: POS Session Pay invoice
|
||||
- **Version**: 16.0.1.0.3
|
||||
- **Category**: Point Of Sale
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/pos](https://github.com/OCA/pos) branch 16.0, addon `pos_session_pay_invoice`.
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Reports: doc/REPORTS.md
|
||||
- Security: doc/SECURITY.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
# Architecture
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
U[Users] -->|HTTP| V[Views and QWeb Templates]
|
||||
V --> C[Controllers]
|
||||
V --> W[Wizards – Transient Models]
|
||||
C --> M[Models and ORM]
|
||||
W --> M
|
||||
M --> R[Reports]
|
||||
DX[Data XML] --> M
|
||||
S[Security – ACLs and Groups] -. enforces .-> M
|
||||
|
||||
subgraph Pos_session_pay_invoice Module - pos_session_pay_invoice
|
||||
direction LR
|
||||
M:::layer
|
||||
W:::layer
|
||||
C:::layer
|
||||
V:::layer
|
||||
R:::layer
|
||||
S:::layer
|
||||
DX:::layer
|
||||
end
|
||||
|
||||
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
|
||||
```
|
||||
|
||||
Notes
|
||||
- Views include tree/form/kanban templates and report templates.
|
||||
- Controllers provide website/portal routes when present.
|
||||
- Wizards are UI flows implemented with `models.TransientModel`.
|
||||
- Data XML loads data/demo records; Security defines groups and access.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Configuration
|
||||
|
||||
Refer to Odoo settings for pos_session_pay_invoice. Configure related models, access rights, and options as needed.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Controllers
|
||||
|
||||
This module does not define custom HTTP controllers.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Dependencies
|
||||
|
||||
This addon depends on:
|
||||
|
||||
- [point_of_sale](../../odoo-bringout-oca-ocb-point_of_sale)
|
||||
- account_cash_invoice
|
||||
4
odoo-bringout-oca-pos-pos_session_pay_invoice/doc/FAQ.md
Normal file
4
odoo-bringout-oca-pos-pos_session_pay_invoice/doc/FAQ.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# FAQ
|
||||
|
||||
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
|
||||
- Q: How to enable? A: Start server with --addon pos_session_pay_invoice or install in UI.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Install
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-pos-pos_session_pay_invoice"
|
||||
# or
|
||||
uv pip install odoo-bringout-oca-pos-pos_session_pay_invoice"
|
||||
```
|
||||
13
odoo-bringout-oca-pos-pos_session_pay_invoice/doc/MODELS.md
Normal file
13
odoo-bringout-oca-pos-pos_session_pay_invoice/doc/MODELS.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Models
|
||||
|
||||
Detected core models and extensions in pos_session_pay_invoice.
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class pos_order
|
||||
class pos_session
|
||||
```
|
||||
|
||||
Notes
|
||||
- Classes show model technical names; fields omitted for brevity.
|
||||
- Items listed under _inherit are extensions of existing models.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Overview
|
||||
|
||||
Packaged Odoo addon: pos_session_pay_invoice. Provides features documented in upstream Odoo 16 under this addon.
|
||||
|
||||
- Source: OCA/OCB 16.0, addon pos_session_pay_invoice
|
||||
- License: LGPL-3
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Reports
|
||||
|
||||
This module does not define custom reports.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# Security
|
||||
|
||||
This module does not define custom security rules or access controls beyond Odoo defaults.
|
||||
|
||||
Default Odoo security applies:
|
||||
- Base user access through standard groups
|
||||
- Model access inherited from dependencies
|
||||
- No custom row-level security rules
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# Troubleshooting
|
||||
|
||||
- Ensure Python and Odoo environment matches repo guidance.
|
||||
- Check database connectivity and logs if startup fails.
|
||||
- Validate that dependent addons listed in DEPENDENCIES.md are installed.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Usage
|
||||
|
||||
Start Odoo including this addon (from repo root):
|
||||
|
||||
```bash
|
||||
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_session_pay_invoice
|
||||
```
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# Wizards
|
||||
|
||||
Transient models exposed as UI wizards in pos_session_pay_invoice.
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class CashPayInvoice
|
||||
```
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
.. image:: https://odoo-community.org/readme-banner-image
|
||||
:target: https://odoo-community.org/get-involved?utm_source=readme
|
||||
:alt: Odoo Community Association
|
||||
|
||||
=======================
|
||||
POS Session Pay invoice
|
||||
=======================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:e6d561100de18a2e7b98d9cfd2eb83c14d8115a723dbcb653563b82efd986ae6
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |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/license-LGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
|
||||
:alt: License: LGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice
|
||||
:alt: OCA/pos
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This modules allows to pay an existing Supplier Invoice / Customer Refund, or
|
||||
to collect payment for an existing Customer Invoice, from within a POS Session.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
#. Go to *Point of Sale / Configuration / Payment Methods*
|
||||
and ensure that at least one payment method with a journal type "cash"
|
||||
is created (or create one if it does not exist).
|
||||
|
||||
#. Go to *Point of Sale / Configuration / Settings*
|
||||
Select a Point of Sale and ensure than in the payment methods section,
|
||||
at least one payment method has a journal type "cash"
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
#. Go to *Point of Sale / Dashboard* and create and open or access to an
|
||||
already open POS Session.
|
||||
#. Open the POS Session form view on the Backend.
|
||||
#. Press the button **Pay Supplier** to pay a Supplier Invoice or **Pay Refund** for a Customer
|
||||
Refund. It will be paid using Cash.
|
||||
#. Select **Get Payment from Invoice** to receive a payment of an
|
||||
existing Customer Invoice or a Supplier Refund. You will need to select
|
||||
a Journal if the POS Config has defined multiple Payment Methods.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
* Cannot pay invoices in a different currency than that defined in the journal
|
||||
associated to the payment method used to pay/collect payment.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_session_pay_invoice%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
* Creu Blanca
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Enric Tobella <etobella@creublanca.es>
|
||||
* Jordi Ballester <jordi.ballester@eficent.com>
|
||||
* Tecnativa (https://www.tecnativa.com):
|
||||
|
||||
* Carlos Lopez
|
||||
|
||||
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 <https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Copyright (C) 2017 Creu Blanca
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
{
|
||||
"name": "POS Session Pay invoice",
|
||||
"version": "16.0.1.0.3",
|
||||
"category": "Point Of Sale",
|
||||
"author": "Creu Blanca, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/pos",
|
||||
"summary": "Pay and receive invoices from PoS Session",
|
||||
"license": "LGPL-3",
|
||||
"depends": ["point_of_sale", "account_cash_invoice"],
|
||||
"data": [
|
||||
"wizard/cash_pay_invoice.xml",
|
||||
"views/pos_session.xml",
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_session_pay_invoice
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Get Payment</span>\n"
|
||||
" <span class=\"o_stat_text\">from Invoice</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay Supplier</span>\n"
|
||||
" <span class=\"o_stat_text\">Invoice</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay</span>\n"
|
||||
" <span class=\"o_stat_text\">Refund</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_cash_pay_invoice
|
||||
msgid "Cash Pay invoice from bank statement"
|
||||
msgstr "Cash Pay Račun from bank statement"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.actions.act_window,name:pos_session_pay_invoice.action_pos_invoice_in_control
|
||||
msgid "Pay invoice"
|
||||
msgstr "Pay Račun"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_id
|
||||
msgid "Payment Method"
|
||||
msgstr "Metoda plaćanja"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_order
|
||||
msgid "Point of Sale Orders"
|
||||
msgstr "Narudžbe POS-a"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr "Sesija POS-a"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_domain
|
||||
msgid "Pos Payment Method Domain"
|
||||
msgstr "Pos Plaćanje Method Domen"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_session_id
|
||||
msgid "Pos Session"
|
||||
msgstr "Pos sesija"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_config_kanban
|
||||
msgid "Summary"
|
||||
msgstr "Sažetak"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#. odoo-python
|
||||
#: code:addons/pos_session_pay_invoice/models/pos_session.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can only pay invoices in an opened session. Please refresh the window "
|
||||
"and try again."
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,185 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_session_pay_invoice
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-03-23 00:46+0000\n"
|
||||
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.17\n"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Get Payment</span>\n"
|
||||
" <span class=\"o_stat_text\">from Invoice</span>"
|
||||
msgstr ""
|
||||
"<span class=\"o_stat_text\">Obtener pago</span>\n"
|
||||
" <span class=\"o_stat_text\">desde factura</span>"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay Supplier</span>\n"
|
||||
" <span class=\"o_stat_text\">Invoice</span>"
|
||||
msgstr ""
|
||||
"<span class=\"o_stat_text\">Pagar factura</span>\n"
|
||||
" <span class=\"o_stat_text\">de proveedor</span>"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay</span>\n"
|
||||
" <span class=\"o_stat_text\">Refund</span>"
|
||||
msgstr ""
|
||||
"<span class=\"o_stat_text\">Pagar</span>\n"
|
||||
" <span class=\"o_stat_text\">Rectificativa</span>"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_cash_pay_invoice
|
||||
msgid "Cash Pay invoice from bank statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.actions.act_window,name:pos_session_pay_invoice.action_pos_invoice_in_control
|
||||
msgid "Pay invoice"
|
||||
msgstr "Factura de pago"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_id
|
||||
msgid "Payment Method"
|
||||
msgstr "Modo de pago"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_order
|
||||
msgid "Point of Sale Orders"
|
||||
msgstr "Pedidos del punto de venta"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_domain
|
||||
msgid "Pos Payment Method Domain"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_session_id
|
||||
msgid "Pos Session"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_config_kanban
|
||||
msgid "Summary"
|
||||
msgstr "Resumen"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#. odoo-python
|
||||
#: code:addons/pos_session_pay_invoice/models/pos_session.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can only pay invoices in an opened session. Please refresh the window "
|
||||
"and try again."
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Amount"
|
||||
#~ msgstr "Importe"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Bank Statement was not found"
|
||||
#~ msgstr "No se encontró el extracto bancario"
|
||||
|
||||
#~ msgid "Cancel"
|
||||
#~ msgstr "Cancelar"
|
||||
|
||||
#~ msgid "Cash invoice in"
|
||||
#~ msgstr "Factura al contado en"
|
||||
|
||||
#~ msgid "Collect Payment from Invoice"
|
||||
#~ msgstr "Cobrar el pago de la factura"
|
||||
|
||||
#~ msgid "Company"
|
||||
#~ msgstr "Compañía"
|
||||
|
||||
#~ msgid "Created by"
|
||||
#~ msgstr "Creado por"
|
||||
|
||||
#~ msgid "Created on"
|
||||
#~ msgstr "Creado en"
|
||||
|
||||
#~ msgid "Currency"
|
||||
#~ msgstr "Moneda"
|
||||
|
||||
#~ msgid "Display Name"
|
||||
#~ msgstr "Nombre mostrado"
|
||||
|
||||
#~ msgid "ID"
|
||||
#~ msgstr "ID"
|
||||
|
||||
#~ msgid "Invoice"
|
||||
#~ msgstr "Factura"
|
||||
|
||||
#~ msgid "Last Modified on"
|
||||
#~ msgstr "Última modificación en"
|
||||
|
||||
#~ msgid "Last Updated by"
|
||||
#~ msgstr "Última actualización por"
|
||||
|
||||
#~ msgid "Last Updated on"
|
||||
#~ msgstr "Última actualización en"
|
||||
|
||||
#~ msgid "Payment Method Count"
|
||||
#~ msgstr "Método de Pago Recuento"
|
||||
|
||||
#~ msgid "Payment methods"
|
||||
#~ msgstr "Modos de pago"
|
||||
|
||||
#~ msgid "Reason"
|
||||
#~ msgstr "Razón"
|
||||
|
||||
#~ msgid "Register"
|
||||
#~ msgstr "Registrar"
|
||||
|
||||
#~ msgid "Session"
|
||||
#~ msgstr "Sesión"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "There is no cash register for this Pos session"
|
||||
#~ msgstr "No hay caja registradora para esta sesión de TPV"
|
||||
|
||||
#~ msgid "pos box cash invoice in"
|
||||
#~ msgstr "factura de caja en efectivo en"
|
||||
|
||||
#~ msgid "pos box cash invoice out"
|
||||
#~ msgstr "caja pdv factura en efectivo"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "<span class=\"o_stat_text\">Collect Payment</span>\n"
|
||||
#~ " <span class=\"o_stat_text\">from Invoice</span>"
|
||||
#~ msgstr ""
|
||||
#~ "<span class = \"o_stat_text\"> Cobrar pago </span>\n"
|
||||
#~ " <span class = \"o_stat_text\"> de la factura </"
|
||||
#~ "span>"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "<span class=\"o_stat_text\">Pay</span>\n"
|
||||
#~ " <span class=\"o_stat_text\">Invoice</span>"
|
||||
#~ msgstr ""
|
||||
#~ "<span class=\"o_stat_text\">Pagado</span>\n"
|
||||
#~ " <span class=\"o_stat_text\">Factura</span>"
|
||||
|
||||
#~ msgid "cash.invoice.in"
|
||||
#~ msgstr "cash.invoice.in"
|
||||
|
||||
#~ msgid "cash.invoice.out"
|
||||
#~ msgstr "cash.invoice.out"
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_session_pay_invoice
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2020-12-10 15:36+0000\n"
|
||||
"Last-Translator: Julien Guenat <julien.guenat@geckoescalade.ch>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 3.10\n"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Get Payment</span>\n"
|
||||
" <span class=\"o_stat_text\">from Invoice</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay Supplier</span>\n"
|
||||
" <span class=\"o_stat_text\">Invoice</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay</span>\n"
|
||||
" <span class=\"o_stat_text\">Refund</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_cash_pay_invoice
|
||||
msgid "Cash Pay invoice from bank statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.actions.act_window,name:pos_session_pay_invoice.action_pos_invoice_in_control
|
||||
msgid "Pay invoice"
|
||||
msgstr "Payer une facture (cash)"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_id
|
||||
msgid "Payment Method"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_order
|
||||
msgid "Point of Sale Orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_domain
|
||||
msgid "Pos Payment Method Domain"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_session_id
|
||||
msgid "Pos Session"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_config_kanban
|
||||
msgid "Summary"
|
||||
msgstr "Résumé"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#. odoo-python
|
||||
#: code:addons/pos_session_pay_invoice/models/pos_session.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can only pay invoices in an opened session. Please refresh the window "
|
||||
"and try again."
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Bank Statement was not found"
|
||||
#~ msgstr "Relevé bancaire introuvable"
|
||||
|
||||
#~ msgid "Collect Payment from Invoice"
|
||||
#~ msgstr "Encaisser une facture"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "There is no cash register for this Pos session"
|
||||
#~ msgstr "Il n'y a pas de caisse enregistreuse pour cette session"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "<span class=\"o_stat_text\">Collect Payment</span>\n"
|
||||
#~ " <span class=\"o_stat_text\">from Invoice</span>"
|
||||
#~ msgstr ""
|
||||
#~ "<span class=\"o_stat_text\">Encaisser une</span>\n"
|
||||
#~ " <span class=\"o_stat_text\">facture</span>"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "<span class=\"o_stat_text\">Pay</span>\n"
|
||||
#~ " <span class=\"o_stat_text\">Invoice</span>"
|
||||
#~ msgstr ""
|
||||
#~ "<span class=\"o_stat_text\">Payer une</span>\n"
|
||||
#~ " <span class=\"o_stat_text\">facture fournisseur</"
|
||||
#~ "span>"
|
||||
|
||||
#~ msgid "cash.invoice.in"
|
||||
#~ msgstr "cash.invoice.in"
|
||||
|
||||
#~ msgid "cash.invoice.out"
|
||||
#~ msgstr "cash.invoice.out"
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_session_pay_invoice
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2025-08-08 14:26+0000\n"
|
||||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.10.4\n"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Get Payment</span>\n"
|
||||
" <span class=\"o_stat_text\">from Invoice</span>"
|
||||
msgstr ""
|
||||
"<span class=\"o_stat_text\">Ottieni pagamento</span>\n"
|
||||
" <span class=\"o_stat_text\">dalla fattura</span>"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay Supplier</span>\n"
|
||||
" <span class=\"o_stat_text\">Invoice</span>"
|
||||
msgstr ""
|
||||
"<span class=\"o_stat_text\">Pagamento fattura</span>\n"
|
||||
" <span class=\"o_stat_text\">fornitore</span>"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay</span>\n"
|
||||
" <span class=\"o_stat_text\">Refund</span>"
|
||||
msgstr ""
|
||||
"<span class=\"o_stat_text\">Pagamento</span>\n"
|
||||
" <span class=\"o_stat_text\">rimborso</span>"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_cash_pay_invoice
|
||||
msgid "Cash Pay invoice from bank statement"
|
||||
msgstr "Fattura pagamento contanti da estratto conto bancario"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.actions.act_window,name:pos_session_pay_invoice.action_pos_invoice_in_control
|
||||
msgid "Pay invoice"
|
||||
msgstr "Paga la fattura"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_id
|
||||
msgid "Payment Method"
|
||||
msgstr "Metodo di pagamento"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_order
|
||||
msgid "Point of Sale Orders"
|
||||
msgstr "Ordini punto vendita"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr "Sessione punto vendita"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_domain
|
||||
msgid "Pos Payment Method Domain"
|
||||
msgstr "Dominio metodo pagamento POS"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_session_id
|
||||
msgid "Pos Session"
|
||||
msgstr "Sessione POS"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_config_kanban
|
||||
msgid "Summary"
|
||||
msgstr "Riepilogo"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#. odoo-python
|
||||
#: code:addons/pos_session_pay_invoice/models/pos_session.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can only pay invoices in an opened session. Please refresh the window "
|
||||
"and try again."
|
||||
msgstr ""
|
||||
"Si possono pagare solo fatture in una sessione aperta. Ricaricare la pagina "
|
||||
"e riprovare."
|
||||
|
||||
#~ msgid "Amount"
|
||||
#~ msgstr "Valore"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Bank Statement was not found"
|
||||
#~ msgstr "Non è stato trovato il rendiconto bancario"
|
||||
|
||||
#~ msgid "Cancel"
|
||||
#~ msgstr "Annulla"
|
||||
|
||||
#~ msgid "Cash invoice in"
|
||||
#~ msgstr "Contanti fattura passiva"
|
||||
|
||||
#~ msgid "Collect Payment from Invoice"
|
||||
#~ msgstr "Riscuoti pagamento da fattura"
|
||||
|
||||
#~ msgid "Company"
|
||||
#~ msgstr "Azienda"
|
||||
|
||||
#~ msgid "Created by"
|
||||
#~ msgstr "Creato da"
|
||||
|
||||
#~ msgid "Created on"
|
||||
#~ msgstr "Creato il"
|
||||
|
||||
#~ msgid "Currency"
|
||||
#~ msgstr "Valuta"
|
||||
|
||||
#~ msgid "Display Name"
|
||||
#~ msgstr "Nome visualizzato"
|
||||
|
||||
#~ msgid "ID"
|
||||
#~ msgstr "ID"
|
||||
|
||||
#~ msgid "Invoice"
|
||||
#~ msgstr "Fattura"
|
||||
|
||||
#~ msgid "Last Modified on"
|
||||
#~ msgstr "Ultima modifica il"
|
||||
|
||||
#~ msgid "Last Updated by"
|
||||
#~ msgstr "Ultimo aggiornamento di"
|
||||
|
||||
#~ msgid "Last Updated on"
|
||||
#~ msgstr "Ultimo aggiornamento il"
|
||||
|
||||
#~ msgid "Payment Method Count"
|
||||
#~ msgstr "Conteggio metodo di pagamento"
|
||||
|
||||
#~ msgid "Payment methods"
|
||||
#~ msgstr "Metodi di pagamento"
|
||||
|
||||
#~ msgid "Reason"
|
||||
#~ msgstr "Motivo"
|
||||
|
||||
#~ msgid "Register"
|
||||
#~ msgstr "Registra"
|
||||
|
||||
#~ msgid "Session"
|
||||
#~ msgstr "Sessione"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "There is no cash register for this Pos session"
|
||||
#~ msgstr "Non è presente il registratore di cassa per questa sessione POS"
|
||||
|
||||
#~ msgid "pos box cash invoice in"
|
||||
#~ msgstr "POS BOX contanti fattura passiva"
|
||||
|
||||
#~ msgid "pos box cash invoice out"
|
||||
#~ msgstr "POS BOX fattura attiva contanti"
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_session_pay_invoice
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Get Payment</span>\n"
|
||||
" <span class=\"o_stat_text\">from Invoice</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay Supplier</span>\n"
|
||||
" <span class=\"o_stat_text\">Invoice</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_session_form
|
||||
msgid ""
|
||||
"<span class=\"o_stat_text\">Pay</span>\n"
|
||||
" <span class=\"o_stat_text\">Refund</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_cash_pay_invoice
|
||||
msgid "Cash Pay invoice from bank statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.actions.act_window,name:pos_session_pay_invoice.action_pos_invoice_in_control
|
||||
msgid "Pay invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_id
|
||||
msgid "Payment Method"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_order
|
||||
msgid "Point of Sale Orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model,name:pos_session_pay_invoice.model_pos_session
|
||||
msgid "Point of Sale Session"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_payment_method_domain
|
||||
msgid "Pos Payment Method Domain"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model:ir.model.fields,field_description:pos_session_pay_invoice.field_cash_pay_invoice__pos_session_id
|
||||
msgid "Pos Session"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#: model_terms:ir.ui.view,arch_db:pos_session_pay_invoice.view_pos_config_kanban
|
||||
msgid "Summary"
|
||||
msgstr ""
|
||||
|
||||
#. module: pos_session_pay_invoice
|
||||
#. odoo-python
|
||||
#: code:addons/pos_session_pay_invoice/models/pos_session.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can only pay invoices in an opened session. Please refresh the window "
|
||||
"and try again."
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
from . import pos_order
|
||||
from . import pos_session
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# Copyright 2023 Jose Zambudio - Aures Tic <jose@aurestic.es>
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
|
||||
|
||||
from odoo import api, models
|
||||
from odoo.osv.expression import AND
|
||||
|
||||
|
||||
class PosOrder(models.Model):
|
||||
_inherit = "pos.order"
|
||||
|
||||
@api.model
|
||||
def search_paid_order_ids(self, config_id, domain, limit, offset):
|
||||
"""Orders paid without reference are filtered so that there is no
|
||||
error when exporting them.
|
||||
(odoo/odoo/blob/16.0/addons/point_of_sale/models/pos_order.py#L1107)"""
|
||||
with_ref_domain = [("pos_reference", "!=", False)]
|
||||
new_domain = AND([domain, with_ref_domain])
|
||||
return super().search_paid_order_ids(
|
||||
config_id,
|
||||
new_domain,
|
||||
limit,
|
||||
offset,
|
||||
)
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from odoo import _, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class PosSession(models.Model):
|
||||
_inherit = "pos.session"
|
||||
|
||||
def button_show_wizard_pay_in_invoice(self):
|
||||
action = self._get_action_wizard_pay_invoice()
|
||||
action["context"]["pos_pay_invoice_type"] = "vendor"
|
||||
action["context"]["pos_pay_invoice_domain"] = "in_invoice"
|
||||
return action
|
||||
|
||||
def button_show_wizard_pay_out_refund(self):
|
||||
action = self._get_action_wizard_pay_invoice()
|
||||
action["context"]["pos_pay_invoice_type"] = "vendor"
|
||||
action["context"]["pos_pay_invoice_domain"] = "out_refund"
|
||||
return action
|
||||
|
||||
def button_show_wizard_pay_out_invoice(self):
|
||||
action = self._get_action_wizard_pay_invoice()
|
||||
action["context"]["pos_pay_invoice_type"] = "customer"
|
||||
action["context"]["pos_pay_invoice_domain"] = "out_invoice"
|
||||
return action
|
||||
|
||||
def _get_action_wizard_pay_invoice(self):
|
||||
if self.state != "opened":
|
||||
raise UserError(
|
||||
_(
|
||||
"You can only pay invoices in an opened session. "
|
||||
"Please refresh the window and try again."
|
||||
)
|
||||
)
|
||||
cash_journal = self.cash_journal_id
|
||||
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||
"pos_session_pay_invoice.action_pos_invoice_in_control"
|
||||
)
|
||||
action["context"] = {
|
||||
"active_ids": cash_journal.ids,
|
||||
"active_name": cash_journal._name,
|
||||
"default_pos_session_id": self.id,
|
||||
}
|
||||
return action
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#. Go to *Point of Sale / Configuration / Payment Methods*
|
||||
and ensure that at least one payment method with a journal type "cash"
|
||||
is created (or create one if it does not exist).
|
||||
|
||||
#. Go to *Point of Sale / Configuration / Settings*
|
||||
Select a Point of Sale and ensure than in the payment methods section,
|
||||
at least one payment method has a journal type "cash"
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
* Enric Tobella <etobella@creublanca.es>
|
||||
* Jordi Ballester <jordi.ballester@eficent.com>
|
||||
* Tecnativa (https://www.tecnativa.com):
|
||||
|
||||
* Carlos Lopez
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
This modules allows to pay an existing Supplier Invoice / Customer Refund, or
|
||||
to collect payment for an existing Customer Invoice, from within a POS Session.
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
* Cannot pay invoices in a different currency than that defined in the journal
|
||||
associated to the payment method used to pay/collect payment.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#. Go to *Point of Sale / Dashboard* and create and open or access to an
|
||||
already open POS Session.
|
||||
#. Open the POS Session form view on the Backend.
|
||||
#. Press the button **Pay Supplier** to pay a Supplier Invoice or **Pay Refund** for a Customer
|
||||
Refund. It will be paid using Cash.
|
||||
#. Select **Get Payment from Invoice** to receive a payment of an
|
||||
existing Customer Invoice or a Supplier Refund. You will need to select
|
||||
a Journal if the POS Config has defined multiple Payment Methods.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,469 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||
<title>README.rst</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document">
|
||||
|
||||
|
||||
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
||||
</a>
|
||||
<div class="section" id="pos-session-pay-invoice">
|
||||
<h1>POS Session Pay invoice</h1>
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:e6d561100de18a2e7b98d9cfd2eb83c14d8115a723dbcb653563b82efd986ae6
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_session_pay_invoice"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This modules allows to pay an existing Supplier Invoice / Customer Refund, or
|
||||
to collect payment for an existing Customer Invoice, from within a POS Session.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
||||
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-3">Known issues / Roadmap</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Point of Sale / Configuration / Payment Methods</em>
|
||||
and ensure that at least one payment method with a journal type “cash”
|
||||
is created (or create one if it does not exist).</li>
|
||||
<li>Go to <em>Point of Sale / Configuration / Settings</em>
|
||||
Select a Point of Sale and ensure than in the payment methods section,
|
||||
at least one payment method has a journal type “cash”</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
|
||||
<ol class="arabic simple">
|
||||
<li>Go to <em>Point of Sale / Dashboard</em> and create and open or access to an
|
||||
already open POS Session.</li>
|
||||
<li>Open the POS Session form view on the Backend.</li>
|
||||
<li>Press the button <strong>Pay Supplier</strong> to pay a Supplier Invoice or <strong>Pay Refund</strong> for a Customer
|
||||
Refund. It will be paid using Cash.</li>
|
||||
<li>Select <strong>Get Payment from Invoice</strong> to receive a payment of an
|
||||
existing Customer Invoice or a Supplier Refund. You will need to select
|
||||
a Journal if the POS Config has defined multiple Payment Methods.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="known-issues-roadmap">
|
||||
<h2><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Cannot pay invoices in a different currency than that defined in the journal
|
||||
associated to the payment method used to pay/collect payment.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_session_pay_invoice%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
|
||||
<div class="section" id="authors">
|
||||
<h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
|
||||
<ul class="simple">
|
||||
<li>Creu Blanca</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
|
||||
<ul class="simple">
|
||||
<li>Enric Tobella <<a class="reference external" href="mailto:etobella@creublanca.es">etobella@creublanca.es</a>></li>
|
||||
<li>Jordi Ballester <<a class="reference external" href="mailto:jordi.ballester@eficent.com">jordi.ballester@eficent.com</a>></li>
|
||||
<li>Tecnativa (<a class="reference external" href="https://www.tecnativa.com">https://www.tecnativa.com</a>):<ul>
|
||||
<li>Carlos Lopez</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h3><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h3>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/16.0/pos_session_pay_invoice">OCA/pos</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from . import test_pay_invoice
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
# Copyright 2017 Creu Blanca <https://creublanca.es/>
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
import odoo
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tests import Form
|
||||
|
||||
from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT
|
||||
from odoo.addons.point_of_sale.tests.common import TestPointOfSaleCommon
|
||||
|
||||
WIZARD_PAY_INVOICE_VIEW = "pos_session_pay_invoice.view_cash_pay_invoice_form"
|
||||
|
||||
|
||||
@odoo.tests.tagged("post_install", "-at_install")
|
||||
class TestSessionPayInvoice(TestPointOfSaleCommon):
|
||||
@classmethod
|
||||
def setUpClass(cls, chart_template_ref=None):
|
||||
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
|
||||
cls.pos_config.cash_control = True
|
||||
cls.new_journal = cls.env["account.journal"].create(
|
||||
{
|
||||
"type": "cash",
|
||||
"name": "New Cash",
|
||||
"code": "NEWCASH",
|
||||
"company_id": cls.env.company.id,
|
||||
}
|
||||
)
|
||||
cls.invoice_out = cls.env["account.move"].create(
|
||||
{
|
||||
"company_id": cls.company.id,
|
||||
"partner_id": cls.partner1.id,
|
||||
"date": "2016-03-12",
|
||||
"invoice_date": "2016-03-12",
|
||||
"move_type": "out_invoice",
|
||||
"invoice_line_ids": [
|
||||
odoo.Command.create(
|
||||
{
|
||||
"product_id": cls.product3.id,
|
||||
"name": "Producto de prueba",
|
||||
"quantity": 1.0,
|
||||
"price_unit": 100.0,
|
||||
"tax_ids": [],
|
||||
},
|
||||
)
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.invoice_out.action_post()
|
||||
cls.invoice_in = cls.env["account.move"].create(
|
||||
{
|
||||
"partner_id": cls.partner4.id,
|
||||
"company_id": cls.company.id,
|
||||
"move_type": "in_invoice",
|
||||
"date": "2016-03-12",
|
||||
"invoice_date": "2016-03-12",
|
||||
"invoice_line_ids": [
|
||||
odoo.Command.create(
|
||||
{
|
||||
"product_id": cls.product3.id,
|
||||
"name": "Producto de prueba",
|
||||
"quantity": 1.0,
|
||||
"price_unit": 100.0,
|
||||
"tax_ids": [],
|
||||
},
|
||||
)
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.invoice_in.action_post()
|
||||
refund_wizard = (
|
||||
cls.env["account.move.reversal"]
|
||||
.with_context(
|
||||
active_ids=cls.invoice_out.ids,
|
||||
active_id=cls.invoice_out.id,
|
||||
active_model=cls.invoice_out._name,
|
||||
)
|
||||
.create({"journal_id": cls.invoice_out.journal_id.id})
|
||||
.reverse_moves()
|
||||
)
|
||||
cls.refund = cls.env[refund_wizard["res_model"]].browse(refund_wizard["res_id"])
|
||||
cls.refund.action_post()
|
||||
|
||||
def test_pos_in_invoice(self):
|
||||
self.assertEqual(self.invoice_in.amount_residual, 100.0)
|
||||
self.pos_config._action_to_open_ui()
|
||||
session = self.pos_config.current_session_id
|
||||
self.assertTrue(session.cash_control)
|
||||
self.assertTrue(session.cash_journal_id)
|
||||
session.set_cashbox_pos(0, notes="Initial cash")
|
||||
wizard_context = session.button_show_wizard_pay_in_invoice()["context"]
|
||||
cash_in = self.env["cash.pay.invoice"].with_context(**wizard_context)
|
||||
with Form(cash_in, view=WIZARD_PAY_INVOICE_VIEW) as form:
|
||||
form.pos_payment_method_id = self.cash_payment_method
|
||||
form.invoice_id = self.invoice_in
|
||||
self.assertEqual(form.amount, -100)
|
||||
payment_methods = form.pos_payment_method_domain[0][2]
|
||||
self.assertNotIn(self.credit_payment_method.id, payment_methods)
|
||||
self.assertNotIn(self.bank_payment_method.id, payment_methods)
|
||||
self.assertIn(self.cash_payment_method.id, payment_methods)
|
||||
cash_in.browse(form.id).action_pay_invoice()
|
||||
session.action_pos_session_closing_control()
|
||||
session.invalidate_recordset()
|
||||
self.invoice_in.invalidate_recordset()
|
||||
self.invoice_in._compute_amount()
|
||||
self.assertEqual(self.invoice_in.amount_residual, 0.0)
|
||||
with self.assertRaisesRegex(
|
||||
UserError, "You can only pay invoices in an opened session"
|
||||
):
|
||||
session.button_show_wizard_pay_in_invoice()
|
||||
|
||||
def test_pos_out_invoice(self):
|
||||
self.assertEqual(self.invoice_out.amount_residual, 100.0)
|
||||
self.pos_config._action_to_open_ui()
|
||||
session = self.pos_config.current_session_id
|
||||
session.set_cashbox_pos(0, notes="Initial cash")
|
||||
wizard_context = session.button_show_wizard_pay_out_invoice()["context"]
|
||||
cash_out = self.env["cash.pay.invoice"].with_context(**wizard_context)
|
||||
with Form(cash_out, view=WIZARD_PAY_INVOICE_VIEW) as form:
|
||||
form.pos_payment_method_id = self.cash_payment_method
|
||||
form.invoice_id = self.invoice_out
|
||||
self.assertEqual(form.amount, 100)
|
||||
form.amount = 75
|
||||
payment_methods = form.pos_payment_method_domain[0][2]
|
||||
self.assertNotIn(self.credit_payment_method.id, payment_methods)
|
||||
self.assertIn(self.bank_payment_method.id, payment_methods)
|
||||
self.assertIn(self.cash_payment_method.id, payment_methods)
|
||||
cash_out.browse(form.id).action_pay_invoice()
|
||||
session.action_pos_session_closing_control()
|
||||
session.invalidate_recordset()
|
||||
self.invoice_out.invalidate_recordset()
|
||||
self.invoice_out._compute_amount()
|
||||
self.assertEqual(self.invoice_out.amount_residual, 25.0)
|
||||
|
||||
def test_pos_invoice_refund(self):
|
||||
self.assertEqual(self.refund.amount_residual, 100.0)
|
||||
self.pos_config._action_to_open_ui()
|
||||
session = self.pos_config.current_session_id
|
||||
session.set_cashbox_pos(0, notes="Initial cash")
|
||||
wizard_context = session.button_show_wizard_pay_out_refund()["context"]
|
||||
cash_out = self.env["cash.pay.invoice"].with_context(**wizard_context)
|
||||
with Form(cash_out, view=WIZARD_PAY_INVOICE_VIEW) as form:
|
||||
form.pos_payment_method_id = self.cash_payment_method
|
||||
form.invoice_id = self.refund
|
||||
self.assertEqual(form.amount, -100)
|
||||
payment_methods = form.pos_payment_method_domain[0][2]
|
||||
self.assertNotIn(self.credit_payment_method.id, payment_methods)
|
||||
self.assertIn(self.bank_payment_method.id, payment_methods)
|
||||
self.assertIn(self.cash_payment_method.id, payment_methods)
|
||||
cash_out.browse(form.id).action_pay_invoice()
|
||||
session.action_pos_session_closing_control()
|
||||
session.invalidate_recordset()
|
||||
self.invoice_out.invalidate_recordset()
|
||||
self.refund.invalidate_recordset()
|
||||
self.assertEqual(self.refund.amount_residual, 0.0)
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_pos_config_kanban" model="ir.ui.view">
|
||||
<field name="name">pos.config.kanban.view</field>
|
||||
<field name="model">pos.config</field>
|
||||
<field name="inherit_id" ref="point_of_sale.view_pos_config_kanban" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="open_ui" position="after">
|
||||
<button
|
||||
t-if="record.current_session_state.raw_value === 'opened'"
|
||||
class="btn btn-info"
|
||||
name="open_existing_session_cb"
|
||||
type="object"
|
||||
>Summary</button>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_pos_session_form" model="ir.ui.view">
|
||||
<field name="name">pos.session.form.view</field>
|
||||
<field name="model">pos.session</field>
|
||||
<field name="inherit_id" ref="point_of_sale.view_pos_session_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
name="button_show_wizard_pay_out_refund"
|
||||
type="object"
|
||||
icon="fa-level-up"
|
||||
attrs="{'invisible':['|',('cash_control', '=', False), ('state', 'not in', ['opened', 'closing_control'])]}"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Pay</span>
|
||||
<span class="o_stat_text">Refund</span>
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
name="button_show_wizard_pay_in_invoice"
|
||||
type="object"
|
||||
icon="fa-level-up"
|
||||
attrs="{'invisible':['|',('cash_control', '=', False), ('state', 'not in', ['opened', 'closing_control'])]}"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Pay Supplier</span>
|
||||
<span class="o_stat_text">Invoice</span>
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
name="button_show_wizard_pay_out_invoice"
|
||||
type="object"
|
||||
icon="fa-level-down"
|
||||
attrs="{'invisible':['|',('cash_control', '=', False), ('state', 'not in', ['opened', 'closing_control'])]}"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Get Payment</span>
|
||||
<span class="o_stat_text">from Invoice</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
from . import cash_pay_invoice
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
# Copyright (C) 2017 Creu Blanca
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class CashPayInvoice(models.TransientModel):
|
||||
_inherit = "cash.pay.invoice"
|
||||
|
||||
pos_payment_method_id = fields.Many2one(
|
||||
"pos.payment.method", string="Payment Method"
|
||||
)
|
||||
pos_session_id = fields.Many2one("pos.session")
|
||||
pos_payment_method_domain = fields.Binary(
|
||||
compute="_compute_pos_payment_method_domain"
|
||||
)
|
||||
|
||||
@api.depends("pos_session_id")
|
||||
@api.depends_context("pos_pay_invoice_domain")
|
||||
def _compute_pos_payment_method_domain(self):
|
||||
for wizard in self:
|
||||
payment_method_available = (
|
||||
wizard.pos_session_id.payment_method_ids.filtered(
|
||||
lambda pm: pm.journal_id.type == "cash"
|
||||
if self.env.context.get("pos_pay_invoice_domain") == "in_invoice"
|
||||
else pm.journal_id.type in ["bank", "cash"]
|
||||
)
|
||||
)
|
||||
wizard.pos_payment_method_domain = [
|
||||
("id", "in", payment_method_available.ids)
|
||||
]
|
||||
|
||||
@api.onchange("pos_payment_method_id")
|
||||
def _onchange_pos_payment_method_id(self):
|
||||
if self.pos_payment_method_id:
|
||||
self.journal_id = self.pos_payment_method_id.journal_id
|
||||
|
||||
def _compute_invoice_domain(self):
|
||||
res = super()._compute_invoice_domain()
|
||||
# Only allow the payment of invoices of the same expected type.
|
||||
# By default, in the module account_cash_invoice, the allowed types are:
|
||||
# - Customer: out_invoice, in_refund
|
||||
# - Vendor: in_invoice, out_refund
|
||||
# In this module, we will allow the payment of invoices of the same type
|
||||
# according to the context pos_pay_invoice_domain:
|
||||
# - Customer: out_invoice
|
||||
# - Vendor: in_invoice
|
||||
# - Refund: out_refund
|
||||
pos_pay_invoice_domain = self.env.context.get("pos_pay_invoice_domain")
|
||||
if pos_pay_invoice_domain:
|
||||
for wizard in self:
|
||||
new_domain = []
|
||||
for domain in wizard.invoice_domain:
|
||||
if domain[0] == "move_type":
|
||||
new_domain.append(("move_type", "=", pos_pay_invoice_domain))
|
||||
else:
|
||||
new_domain.append(domain)
|
||||
wizard.invoice_domain = new_domain
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def default_get(self, fields_list):
|
||||
values = super().default_get(fields_list)
|
||||
if "invoice_type" in fields_list and self.env.context.get(
|
||||
"pos_pay_invoice_type"
|
||||
):
|
||||
values["invoice_type"] = self.env.context.get("pos_pay_invoice_type")
|
||||
return values
|
||||
|
||||
def _prepare_statement_line_vals(self):
|
||||
vals = super()._prepare_statement_line_vals()
|
||||
if self.pos_session_id:
|
||||
vals["pos_session_id"] = self.pos_session_id.id
|
||||
return vals
|
||||
|
||||
def action_pay_invoice(self):
|
||||
# When it is a vendor invoice, use the standard method
|
||||
# and generate a statement line to reconcile the invoice correctly,
|
||||
# because the POS only works with receivable accounts.
|
||||
if not self.pos_session_id or self.invoice_id.move_type == "in_invoice":
|
||||
return super().action_pay_invoice()
|
||||
# If we are in a POS session, we need to create a pos.order
|
||||
# and a pos.payment to pay the invoice.
|
||||
# This way, when the user closes the session
|
||||
# and checks the cash control, the payments are correctly displayed.
|
||||
# Otherwise, all payments are shown in Cash regardless of the journal type.
|
||||
PosOrder = self.env["pos.order"]
|
||||
pos_order = PosOrder.create(self._prepare_pos_order_vals())
|
||||
pos_order.write({"name": pos_order._compute_order_name()})
|
||||
pos_order.add_payment(self._prepare_pos_payment_vals(pos_order))
|
||||
pos_order._apply_invoice_payments()
|
||||
|
||||
def _prepare_pos_order_vals(self):
|
||||
return {
|
||||
"amount_total": self.amount,
|
||||
"partner_id": self.invoice_id.partner_id.id,
|
||||
"account_move": self.invoice_id.id,
|
||||
"state": "invoiced",
|
||||
"to_invoice": False,
|
||||
"session_id": self.pos_session_id.id,
|
||||
"amount_tax": 0,
|
||||
"amount_paid": self.amount,
|
||||
"amount_return": 0,
|
||||
}
|
||||
|
||||
def _prepare_pos_payment_vals(self, pos_order):
|
||||
return {
|
||||
"pos_order_id": pos_order.id,
|
||||
"amount": pos_order._get_rounded_amount(self.amount),
|
||||
"name": self.invoice_id.name,
|
||||
"payment_method_id": self.pos_payment_method_id.id,
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_cash_pay_invoice_form" model="ir.ui.view">
|
||||
<field name="model">cash.pay.invoice</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_cash_invoice.view_cash_pay_invoice_form"
|
||||
/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="priority" eval="100" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='invoice_type']" position="attributes">
|
||||
<attribute name="readonly">1</attribute>
|
||||
<attribute name="force_save">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='journal_id']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='journal_id']" position="after">
|
||||
<field name="pos_session_id" invisible="1" />
|
||||
<field name="pos_payment_method_domain" invisible="1" />
|
||||
<field
|
||||
name="pos_payment_method_id"
|
||||
required="1"
|
||||
domain="pos_payment_method_domain"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_pos_invoice_in_control" model="ir.actions.act_window">
|
||||
<field name="name">Pay invoice</field>
|
||||
<field name="res_model">cash.pay.invoice</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field
|
||||
name="view_id"
|
||||
ref="pos_session_pay_invoice.view_cash_pay_invoice_form"
|
||||
/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</odoo>
|
||||
43
odoo-bringout-oca-pos-pos_session_pay_invoice/pyproject.toml
Normal file
43
odoo-bringout-oca-pos-pos_session_pay_invoice/pyproject.toml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-pos-pos_session_pay_invoice"
|
||||
version = "16.0.0"
|
||||
description = "POS Session Pay invoice - Pay and receive invoices from PoS Session"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-point_of_sale>=16.0.0",
|
||||
"odoo-bringout-oca-pos-account_cash_invoice>=16.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">= 3.11"
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://github.com/bringout/0"
|
||||
repository = "https://github.com/bringout/0"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.metadata]
|
||||
allow-direct-references = true
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["pos_session_pay_invoice"]
|
||||
|
||||
[tool.rye]
|
||||
managed = true
|
||||
dev-dependencies = [
|
||||
"pytest>=8.4.1",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue