Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const config = [{
},

}, {
files: ["**/*.esm.js", "**/*test.js"],
files: ["**/*.js"],

languageOptions: {
ecmaVersion: 2024,
Expand Down
129 changes: 129 additions & 0 deletions pos_financial_risk/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

============================
Point of Sale Financial Risk
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6849547ab12c33aedfe65b29213299ed41bd7383e89a935d32f6d337c685d6c5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-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/19.0/pos_financial_risk
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-19-0/pos-19-0-pos_financial_risk
: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=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Extends Partner Financial Risk to manage POS orders.

If POS order exceeds partner credit limit POS only non restricted
payment methods will remain available.

Payment method availability can be specified both system wide and for a
particular POS.

If no restrictions are specified for a POS global ones will be applied.

**Table of contents**

.. contents::
:local:

Configuration
=============

To restrict a payment method for all POS:

Go to **Post of Sale**/**Configuration**/**Payment Methods** and select
a payment method.

Enable **Credit Limit Restricted** to restrict usage of this payment
method if credit limit threshold is overrun.

To specify restriction for a selected POS:

Go to **Settings**/**Point of Sale** select a POS and scroll down to the
**Payment** section.

Add payment methods to the **Credit Limit Restricted** field.

Usage
=====

To use this module, you need to:

Go to Customers > Financial Risk

Set limits and choose options to compute in credit limit.

Go to POS -> Open POS and create a new order.

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_financial_risk%0Aversion:%2019.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
-------

* Cetmix

Contributors
------------

- Cetmix <https://cetmix.com/>
- Maksim Shurupov

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-geomer198| image:: https://github.com/geomer198.png?size=40px
:target: https://github.com/geomer198
:alt: geomer198
.. |maintainer-CetmixGitDrone| image:: https://github.com/CetmixGitDrone.png?size=40px
:target: https://github.com/CetmixGitDrone
:alt: CetmixGitDrone

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-geomer198| |maintainer-CetmixGitDrone|

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/19.0/pos_financial_risk>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions pos_financial_risk/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions pos_financial_risk/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Point of Sale Financial Risk",
"version": "19.0.1.0.1",
"category": "Sales/Point of Sale",
"summary": "Point of Sale Fonancial Risk",
"depends": ["point_of_sale", "account_financial_risk"],
"website": "https://github.com/OCA/pos",
"author": "Cetmix,Odoo Community Association (OCA)",
"maintainers": ["geomer198", "CetmixGitDrone"],
"data": [
"views/pos_payment_method_views.xml",
"views/res_config_settings_views.xml",
],
"installable": True,
"assets": {
"point_of_sale._assets_pos": [
"pos_financial_risk/static/src/**/*",
],
},
"license": "AGPL-3",
}
68 changes: 68 additions & 0 deletions pos_financial_risk/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_financial_risk
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-08 22:35+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: pos_financial_risk
#. odoo-javascript
#: code:addons/pos_financial_risk/static/src/xml/PaymentScreen.xml:0
#, python-format
msgid "(remainder"
msgstr "(resto"

#. module: pos_financial_risk
#: model_terms:ir.ui.view,arch_db:pos_financial_risk.res_config_settings_view_form
msgid "<span class=\"o_form_label\">Credit Limit Restricted</span>"
msgstr "<span class=\"o_form_label\">Límite de Crédito Restringido</span>"

#. module: pos_financial_risk
#. odoo-javascript
#: code:addons/pos_financial_risk/static/src/xml/PaymentScreen.xml:0
#, python-format
msgid "Blocked due to credit limit reached"
msgstr "Bloqueado por haber alcanzado el límite de crédito"

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes Config"

#. module: pos_financial_risk
#: model:ir.model.fields,field_description:pos_financial_risk.field_pos_config__payment_credit_limit_restricted_ids
#: model:ir.model.fields,field_description:pos_financial_risk.field_pos_payment_method__credit_limit_restricted
#: model:ir.model.fields,field_description:pos_financial_risk.field_res_config_settings__pos_payment_credit_limit_restricted_ids
msgid "Credit Limit Restricted"
msgstr "Límite de Crédito Restringido"

#. module: pos_financial_risk
#: model_terms:ir.ui.view,arch_db:pos_financial_risk.res_config_settings_view_form
msgid "Payment methods with credit limit restricted"
msgstr "Métodos de pago con límite de crédito restringido"

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Configuración de Punto de Venta"

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr "Métodos de Pago en el Punto de Venta"

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_session
msgid "Point of Sale Session"
msgstr "Sesión del Punto de Venta"
68 changes: 68 additions & 0 deletions pos_financial_risk/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_financial_risk
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-26 15:34+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: pos_financial_risk
#. odoo-javascript
#: code:addons/pos_financial_risk/static/src/xml/PaymentScreen.xml:0
#, python-format
msgid "(remainder"
msgstr "(promemoria"

#. module: pos_financial_risk
#: model_terms:ir.ui.view,arch_db:pos_financial_risk.res_config_settings_view_form
msgid "<span class=\"o_form_label\">Credit Limit Restricted</span>"
msgstr "<span class=\"o_form_label\">Limite credito ridotto</span>"

#. module: pos_financial_risk
#. odoo-javascript
#: code:addons/pos_financial_risk/static/src/xml/PaymentScreen.xml:0
#, python-format
msgid "Blocked due to credit limit reached"
msgstr "Bloccato per limite credito raggiunto"

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_res_config_settings
msgid "Config Settings"
msgstr "Impostazioni configurazione"

#. module: pos_financial_risk
#: model:ir.model.fields,field_description:pos_financial_risk.field_pos_config__payment_credit_limit_restricted_ids
#: model:ir.model.fields,field_description:pos_financial_risk.field_pos_payment_method__credit_limit_restricted
#: model:ir.model.fields,field_description:pos_financial_risk.field_res_config_settings__pos_payment_credit_limit_restricted_ids
msgid "Credit Limit Restricted"
msgstr "Limite credito ridotto"

#. module: pos_financial_risk
#: model_terms:ir.ui.view,arch_db:pos_financial_risk.res_config_settings_view_form
msgid "Payment methods with credit limit restricted"
msgstr "Metodi di pagamento con limite credito ridotto"

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Configurazione punto vendita"

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr "Metodi di pagamento punto vendita"

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_session
msgid "Point of Sale Session"
msgstr "Sessione punto vendita"
65 changes: 65 additions & 0 deletions pos_financial_risk/i18n/pos_financial_risk.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_financial_risk
#
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_financial_risk
#. odoo-javascript
#: code:addons/pos_financial_risk/static/src/xml/PaymentScreen.xml:0
#, python-format
msgid "(remainder"
msgstr ""

#. module: pos_financial_risk
#: model_terms:ir.ui.view,arch_db:pos_financial_risk.res_config_settings_view_form
msgid "<span class=\"o_form_label\">Credit Limit Restricted</span>"
msgstr ""

#. module: pos_financial_risk
#. odoo-javascript
#: code:addons/pos_financial_risk/static/src/xml/PaymentScreen.xml:0
#, python-format
msgid "Blocked due to credit limit reached"
msgstr ""

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: pos_financial_risk
#: model:ir.model.fields,field_description:pos_financial_risk.field_pos_config__payment_credit_limit_restricted_ids
#: model:ir.model.fields,field_description:pos_financial_risk.field_pos_payment_method__credit_limit_restricted
#: model:ir.model.fields,field_description:pos_financial_risk.field_res_config_settings__pos_payment_credit_limit_restricted_ids
msgid "Credit Limit Restricted"
msgstr ""

#. module: pos_financial_risk
#: model_terms:ir.ui.view,arch_db:pos_financial_risk.res_config_settings_view_form
msgid "Payment methods with credit limit restricted"
msgstr ""

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_config
msgid "Point of Sale Configuration"
msgstr ""

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr ""

#. module: pos_financial_risk
#: model:ir.model,name:pos_financial_risk.model_pos_session
msgid "Point of Sale Session"
msgstr ""
4 changes: 4 additions & 0 deletions pos_financial_risk/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import pos_config
from . import pos_payment_method
from . import pos_session
from . import res_config_settings
13 changes: 13 additions & 0 deletions pos_financial_risk/models/pos_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import fields, models


class PosConfig(models.Model):
_inherit = "pos.config"

payment_credit_limit_restricted_ids = fields.Many2many(
comodel_name="pos.payment.method",
relation="pos_config_payment_method_restricted_rel",
column1="config_id",
column2="payment_method_id",
string="Credit Limit Restricted",
)
7 changes: 7 additions & 0 deletions pos_financial_risk/models/pos_payment_method.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from odoo import fields, models


class PosPaymentMethod(models.Model):
_inherit = "pos.payment.method"

credit_limit_restricted = fields.Boolean()
Loading