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
99 changes: 99 additions & 0 deletions pos_transfer_account/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
================================
Point of Sale - Transfer Account
================================

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

.. |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_transfer_account
: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_transfer_account
: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 was written to extend the functionality of odoo Point Of
Sale about suspense account.

This module is usefull only in a multi Point of Sale context of multi
company context.

With this module, it is now allowed to define for each PoS config a
suspense account.

If this account is set, it will be used when user realizes "Cash In" or
Cash Out" operation, instead of the default one set in 'Invoicing' /
'Configuration' / 'Journals'. ("Suspense Account" field)

**Table of contents**

.. contents::
:local:

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

- Go to 'Point of Sale' / 'Configuration' / 'Point of Sale'
- Edit your PoS Config and add a suspense account

|Suspense account|

.. |Suspense account| image:: https://raw.githubusercontent.com/OCA/pos/18.0/pos_transfer_account/static/description/pos_config.png

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_transfer_account%0Aversion:%2018.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
-------

* La Louve

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

- `Trobz <https://trobz.com>`__

- Phan Hong Phuc <[email protected]>

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/18.0/pos_transfer_account>`_ 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_transfer_account/__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_transfer_account/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Point of Sale - Transfer Account",
"version": "18.0.1.0.0",
"category": "Point Of Sale",
"author": "La Louve, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/pos",
"depends": [
"point_of_sale",
],
"data": ["views/view_pos_config.xml", "views/res_config_settings_view.xml"],
"demo": [
"demo/account_account.xml",
"demo/pos_config.xml",
],
"installable": True,
}
9 changes: 9 additions & 0 deletions pos_transfer_account/demo/account_account.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="pos_suspense_account" model="account.account">
<field name="name">Demo PoS Liquidity Suspense Account</field>
<field name="code">101710</field>
<field name="account_type">asset_current</field>
<field name="company_ids" eval="[Command.link(ref('base.main_company'))]" />
</record>
</odoo>
8 changes: 8 additions & 0 deletions pos_transfer_account/demo/pos_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="pos_config_specific_suspense_account" model="pos.config">
<field name="name">Point Of Sale with Specific Transfer Account</field>
<field name="suspense_account_id" ref="pos_suspense_account" />
<field name="company_id" ref="base.main_company" />
</record>
</odoo>
43 changes: 43 additions & 0 deletions pos_transfer_account/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_transfer_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-19 08:37+0000\n"
"PO-Revision-Date: 2025-11-19 08:37+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_transfer_account
#: model:ir.model,name:pos_transfer_account.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de configuration"

#. module: pos_transfer_account
#: model:account.account,name:pos_transfer_account.account_pos_transfer_account
msgid "Demo PoS Liquidity Transfers"
msgstr "Démo : Transferts de liquidités PoS"

#. module: pos_transfer_account
#: model:ir.model,name:pos_transfer_account.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Configuration du point de vente"

#. module: pos_transfer_account
#: model:ir.model,name:pos_transfer_account.model_pos_session
msgid "Point of Sale Session"
msgstr "Session du point de vente"

#. module: pos_transfer_account
#: model:ir.model.fields,field_description:pos_transfer_account.field_pos_config__transfer_account_id
#: model:ir.model.fields,field_description:pos_transfer_account.field_res_config_settings__pos_transfer_account_id
#: model_terms:ir.ui.view,arch_db:pos_transfer_account.pos_config_view_form
msgid "Transfer Account"
msgstr "Compte de transferts"
43 changes: 43 additions & 0 deletions pos_transfer_account/i18n/pos_transfer_account.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_transfer_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-19 08:39+0000\n"
"PO-Revision-Date: 2025-11-19 08:39+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_transfer_account
#: model:ir.model,name:pos_transfer_account.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: pos_transfer_account
#: model:account.account,name:pos_transfer_account.account_pos_transfer_account
msgid "Demo PoS Liquidity Transfers"
msgstr ""

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

#. module: pos_transfer_account
#: model:ir.model,name:pos_transfer_account.model_pos_session
msgid "Point of Sale Session"
msgstr ""

#. module: pos_transfer_account
#: model:ir.model.fields,field_description:pos_transfer_account.field_pos_config__transfer_account_id
#: model:ir.model.fields,field_description:pos_transfer_account.field_res_config_settings__pos_transfer_account_id
#: model_terms:ir.ui.view,arch_db:pos_transfer_account.pos_config_view_form
msgid "Transfer Account"
msgstr ""
3 changes: 3 additions & 0 deletions pos_transfer_account/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import pos_config
from . import pos_session
from . import res_config_settings
12 changes: 12 additions & 0 deletions pos_transfer_account/models/pos_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).


from odoo import fields, models


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

suspense_account_id = fields.Many2one(comodel_name="account.account")
21 changes: 21 additions & 0 deletions pos_transfer_account/models/pos_session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from odoo import models


class PosSession(models.Model):
_inherit = "pos.session"

def try_cash_in_out(self, _type, amount, reason, extras):
if self.config_id.suspense_account_id:
extras = extras or {}
extras["counterpart_account_id"] = self.config_id.suspense_account_id.id
return super().try_cash_in_out(_type, amount, reason, extras)

def _prepare_account_bank_statement_line_vals(
self, session, sign, amount, reason, extras
):
res = super()._prepare_account_bank_statement_line_vals(
session, sign, amount, reason, extras
)
if extras.get("counterpart_account_id"):
res["counterpart_account_id"] = extras["counterpart_account_id"]
return res
11 changes: 11 additions & 0 deletions pos_transfer_account/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from odoo import fields, models


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

pos_suspense_account_id = fields.Many2one(
"account.account",
related="pos_config_id.suspense_account_id",
readonly=False,
)
3 changes: 3 additions & 0 deletions pos_transfer_account/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions pos_transfer_account/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* Go to 'Point of Sale' / 'Configuration' / 'Point of Sale'
* Edit your PoS Config and add a suspense account

![Suspense account](./static/description/pos_config.png)
2 changes: 2 additions & 0 deletions pos_transfer_account/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Trobz](https://trobz.com)
- Phan Hong Phuc \<<[email protected]>\>
12 changes: 12 additions & 0 deletions pos_transfer_account/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
This module was written to extend the functionality of odoo Point Of Sale about
suspense account.

This module is usefull only in a multi Point of Sale context of multi company
context.

With this module, it is now allowed to define for each PoS config a suspense
account.

If this account is set, it will be used when user realizes "Cash In" or
Cash Out" operation, instead of the default one set in 'Invoicing' /
'Configuration' / 'Journals'. ("Suspense Account" field)
Binary file added pos_transfer_account/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading