Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][ADD] account_wallet - NOBUMP #9

Open
wants to merge 60 commits into
base: 14.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d67507b
[14.0][IMP] account_cagnotte => account_wallet
rousseldenis May 21, 2021
bd1950f
[14.0][IMP] account_wallet: Add partner relation
rousseldenis Jun 14, 2021
464c441
[14.0][IMP] account_wallet: Don't create move with a name
rousseldenis Jun 15, 2021
26f24a5
[14.0][IMP] account_wallet: Fix tests
rousseldenis Jun 15, 2021
e4a042b
[14.0][IMP] account_wallet: Improve form
rousseldenis Jun 15, 2021
ba37c18
[14.0][IMP] account_wallet: Add migration scripts
rousseldenis Jul 28, 2021
17b2ae3
[14.0][IMP] account_wallet: Migrate only if former table exist
rousseldenis Jul 29, 2021
e51c481
[14.0][IMP] account_wallet: Add remark for future migrations
rousseldenis Jul 29, 2021
ae817e5
[14.0][IMP] account_wallet: Remove former methods as models have been…
rousseldenis Jul 29, 2021
166131d
[14.0][IMP] account_wallet: tests improvements, use create multi, cor…
rousseldenis Jul 29, 2021
cd74ba1
[14.0][IMP] account_wallet: Add todo for name_search
rousseldenis Jul 30, 2021
d967906
[14.0][IMP] account_wallet: Improve test, set default account
rousseldenis Aug 19, 2021
15707d8
[14.0][FIX] account_wallet: Prepare good value for move
rousseldenis Aug 24, 2021
7c75cd2
Apply pre-commit
sbidoul Oct 7, 2021
6be4432
[14.0][FIX] account_wallet: Demo files will be loaded by code
rousseldenis Oct 8, 2021
c5271f2
[14.0][FIX] account_wallet*: Rely on openupgradelib
rousseldenis Oct 8, 2021
04270e6
[14.0][IMP] account_wallet*: Remove OCA ref
rousseldenis Oct 8, 2021
e921831
[UPD] README.rst
Oct 8, 2021
50465ed
account_wallet 14.0.1.0.1
Oct 8, 2021
891a134
[14.0][IMP] account_wallet: Don't retrieve too much exisisting wallets
rousseldenis Oct 11, 2021
c2fd17b
account_wallet 14.0.1.0.2
Oct 12, 2021
16def44
[14.0][IMP] account_wallet: Remove partner name from wallet display name
rousseldenis Mar 21, 2022
716a96a
pre-commit: fix manifests website
sbidoul May 18, 2022
f55ba3d
[UPD] Update account_wallet.pot
May 18, 2022
f94cedc
[14.0][IMP] account_wallet: Add wallet on payment side
rousseldenis Nov 16, 2021
e01c0cd
[UPD] Update account_wallet.pot
Jun 8, 2022
a1e0d8b
[14.0][FIX] account_wallet
xavier-bouquiaux Oct 26, 2021
02ee640
account_wallet 14.0.1.1.0
Jun 8, 2022
1ae9f16
[FIX] account_wallet : move-> account_wallet_type_id
xavier-bouquiaux Mar 18, 2022
1e4316c
[ADD] wizard to create a refund as wallet
xavier-bouquiaux May 18, 2022
88efe8e
[UPD] Update account_wallet.pot
Jun 14, 2022
97510bc
account_wallet 14.0.1.2.0
Jun 14, 2022
cb9b25f
[UPD] Update account_wallet.pot
Jul 14, 2022
7c4ab74
[ADD] add documentation + reformat + comment
xavier-bouquiaux Jun 14, 2022
a6ff341
[UPD] Update account_wallet.pot
Jul 14, 2022
d69eff8
[IMP] account_wallet: black, isort, prettier
xavier-bouquiaux Jul 18, 2022
9a1c542
[IMP] make account_wallet OCA compliant
xavier-bouquiaux Jul 18, 2022
23cf1c7
[IMP] account_wallet : add no_anonymous feature to force to have only…
legalsylvain Jul 18, 2022
545d9b2
[FIX] account_wallet : Force account_wallet_type to have product_id d…
legalsylvain Jul 18, 2022
32acd33
[IMP] account_wallet : guess income account based on product accounti…
legalsylvain Jul 18, 2022
7b2e714
Merge pull request #2 from legalsylvain/14.0-IMP-account_wallet-produ…
xavier-bouquiaux Jul 25, 2022
b761cc2
Merge pull request #1 from legalsylvain/14.0-IMP-account_wallet-add-n…
xavier-bouquiaux Jul 25, 2022
9582751
[REF] account_wallet : remove useless comment
legalsylvain Jul 25, 2022
73f2bb4
[IMP] account_wallet : add domain on product_id for account_wallet_ty…
legalsylvain Jul 25, 2022
8100b55
[FIX] rename some 'cagnotte' into 'wallet'
legalsylvain Aug 1, 2022
6de4402
[REF] rename wallet_type.xml to fit with OCA convention
legalsylvain Aug 1, 2022
10acc32
[REF] rename wallet_views.xml to fit with OCA convention
legalsylvain Aug 1, 2022
c94432c
[FIX] remove duplicated account.move.line form view, fix incorrect na…
legalsylvain Aug 1, 2022
b49885a
[FIX] remove duplicated account.move form view
legalsylvain Aug 1, 2022
6f6392d
[FIX] remove unnecessary dependency to openupgradelib python librairy
legalsylvain Aug 2, 2022
2887ce5
[REF] refactor test
legalsylvain Aug 2, 2022
6b8c6d7
[FIX] wallet balance should be updated only when related move lines (…
legalsylvain Aug 2, 2022
0d0e392
[REF] rename account.wallet.type 'no_anonymous' field into 'automatic…
legalsylvain Aug 2, 2022
1c69e03
fixup! [FIX] wallet balance should be updated only when related move …
legalsylvain Aug 2, 2022
e8c4fa3
[IMP] new field only_nominative on account.wallet.type model to preve…
legalsylvain Aug 2, 2022
223e7ef
[IMP] allow to select wallet when making payment via the wizard
legalsylvain Aug 5, 2022
f009d90
[FIX] make payment working with refound
legalsylvain Aug 5, 2022
c23d67b
[FIX] make credit_note_product_id configuration working in multi comp…
legalsylvain Aug 5, 2022
f5de492
[IMP] simplify algorigthm
legalsylvain Oct 10, 2022
d8b866d
[DOC] add legalsylvain as contributors
legalsylvain Oct 10, 2022
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
138 changes: 138 additions & 0 deletions account_wallet/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
==============
Account Wallet
==============

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fwallet-lightgray.png?logo=github
:target: https://github.com/OCA/wallet/tree/account_wallet/account_wallet
:alt: OCA/wallet
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/wallet-account_wallet/wallet-account_wallet-account_wallet
:alt: Translate me on Weblate

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

This module allows to manage financial reserves aka Wallets.

**Table of contents**

.. contents::
:local:

Usage
=====

Setup

* Make sure you are in the group_account_manager (for setup at least)
* Make sure you are in the group Show Accounting Features - Readonly (for setup at least)
* Go to Accounting > Wallet -> Wallet Type
* Define first a Wallet type.
* For move lines generation, please:
* Choose a sequence
* Choose an account
* Choose a product
* Choose a journal

.. figure:: https://raw.githubusercontent.com/acsone/acsone-addons/wallet-documentation/account_wallet/static/description/wallet-type.png
:width: 90%
:alt: Wallet Type
:align: center

* On the product, you have to set the same account on the "Income Account"

.. figure:: https://raw.githubusercontent.com/acsone/acsone-addons/wallet-documentation/account_wallet/static/description/wallet-product.png
:width: 90%
:alt: Wallet Product
:align: center

* LIMITATION: The wallet product should not include taxes or
taxes with amount <> 0.

Utilization


* Go to Accounting > Customer -> Invoice
* Create an invoice with the same product as your wallet type
* Save the invoice
* Go to Accounting > Wallet -> Wallet

.. figure:: https://raw.githubusercontent.com/acsone/acsone-addons/wallet-documentation/account_wallet/static/description/wallet-invoice.png
:width: 90%
:alt: Wallet Invoice
:align: center

* A wallet is generated without any link to the customer with the amount as balance
If the customer already have an active wallet, the credit goes on the same wallet
The goal behind the 'anonymous' wallet is to give the opportunity to offer this wallet

.. figure:: https://raw.githubusercontent.com/acsone/acsone-addons/wallet-documentation/account_wallet/static/description/wallet-wallet.png
:width: 90%
:alt: Wallet Wallet
:align: center

* If your business requires you to generate wallet for credit notes
* you can use the wizard :
* Make sure you have are in this group : Show Full Accounting Features

.. figure:: https://raw.githubusercontent.com/acsone/acsone-addons/wallet-documentation/account_wallet/static/description/wallet_refund_1.png
:width: 90%
:alt: Wallet Refund
:align: center
.. figure:: https://raw.githubusercontent.com/acsone/acsone-addons/wallet-documentation/account_wallet/static/description/wallet_refund2.png
:width: 90%
:alt: Wallet Refund
:align: center

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/wallet/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/wallet/issues/new?body=module:%20account_wallet%0Aversion:%20account_wallet%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
~~~~~~~

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~

* Laetitia Gangloff <[email protected]>
* Cedric Pigeon <[email protected]>
* Denis Roussel <[email protected]>
* Xavier Bouquiaux <[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/wallet <https://github.com/OCA/wallet/tree/account_wallet/account_wallet>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_wallet/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from .hooks import post_init_hook
from . import wizards
27 changes: 27 additions & 0 deletions account_wallet/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2015-2021 ACSONE SA/NV (http://www.acsone.eu)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Account Wallet",
"version": "14.0.3.0.0",
"author": "Odoo Community Association (OCA), ACSONE SA/NV",
"category": "Accounting & Finance",
"website": "https://github.com/OCA/wallet",
"depends": [
"account",
],
"data": [
"security/security.xml",
"security/wallet_base_security.xml",
"views/account_wallet.xml",
"views/account_wallet_type.xml",
"views/account_move_line.xml",
"views/account_move.xml",
"views/account_payment.xml",
"views/res_partner.xml",
"wizards/wizard_account_move_credit_notes_wallet.xml",
"wizards/account_payment_register.xml",
],
"license": "AGPL-3",
"post_init_hook": "post_init_hook",
}
19 changes: 19 additions & 0 deletions account_wallet/demo/account_account.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- pylint:disable=file-not-used -->
<!-- Copyright 2021 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<!-- Wallet Accounts - Like prepayment one -->
<record id="account_wallet_type_customer" model="account.account">
<field name="name">Customer Wallet Reserve</field>
<field name="user_type_id" ref="account.data_account_type_prepayments" />
<field name="code">14101</field>
</record>

<record id="account_wallet_credit_note" model="account.account">
<field name="name">Credit note for Wallet</field>
<field name="user_type_id" ref="account.data_account_type_expenses" />
<field name="code">6040</field>
</record>

</odoo>
15 changes: 15 additions & 0 deletions account_wallet/demo/account_journal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<!-- pylint:disable=file-not-used -->
<odoo noupdate="1">
<!-- Wallet Accounts - Like prepayment one -->
<record id="account_journal_wallet_type_customer" model="account.journal">
<field name="name">Customer Wallet Reserves</field>
<field name="code">WAL</field>
<field name="type">cash</field>
<field name="default_account_id" ref="account_wallet_type_customer" />
<field name="payment_debit_account_id" ref="account_wallet_type_customer" />
<field name="payment_credit_account_id" ref="account_wallet_type_customer" />
</record>
</odoo>
15 changes: 15 additions & 0 deletions account_wallet/demo/account_wallet_type.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<!-- pylint:disable=file-not-used -->
<odoo noupdate="1">
<!-- Wallet Type Demo -->
<record model="account.wallet.type" id="wallet_type_customer">
<field name="name">Customer Wallet</field>
<field name="sequence_id" ref="seq_wallet_type_customer" />
<field name="account_id" ref="account_wallet_type_customer" />
<field name="journal_id" ref="account_journal_wallet_type_customer" />
<field name="product_id" ref="product_wallet" />
<field name="credit_note_product_id" ref="product_credit_note_wallet" />
</record>
</odoo>
15 changes: 15 additions & 0 deletions account_wallet/demo/ir_sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<!-- pylint:disable=file-not-used -->
<odoo noupdate="1">
<!-- Wallet Type Sequence Demo -->
<record model="ir.sequence" id="seq_wallet_type_customer">
<field name="name">Customer Wallet Sequence</field>
<field name="code">account.wallet</field>
<field name="padding">5</field>
<field name="prefix">WALC/</field>
<field name="company_id" ref="base.main_company" />
</record>

</odoo>
20 changes: 20 additions & 0 deletions account_wallet/demo/product_product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).-->
<!-- pylint:disable=file-not-used -->
<odoo noupdate="1">
<record model="product.product" id="product_wallet">
<field name="name">Product Wallet</field>
<field name="type">service</field>
<field name="property_account_income_id" ref="account_wallet_type_customer" />
<field name="property_account_expense_id" ref="account_wallet_type_customer" />
</record>

<record model="product.product" id="product_credit_note_wallet">
<field name="name">Product Credit Note Wallet</field>
<field name="type">service</field>
<field name="property_account_income_id" ref="account_wallet_credit_note" />
<field name="property_account_expense_id" ref="account_wallet_credit_note" />
</record>
</odoo>
32 changes: 32 additions & 0 deletions account_wallet/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from odoo import SUPERUSER_ID, api, tools
from odoo.modules.module import get_module_resource


def _load_demo(env):
def load_file(env, module, *args):
tools.convert_file(
env.cr,
"account_wallet",
get_module_resource(module, *args),
{},
"init",
False,
"demo",
)

load_file(env, "account_wallet", "demo", "ir_sequence.xml")
load_file(env, "account_wallet", "demo", "account_account.xml")
load_file(env, "account_wallet", "demo", "account_journal.xml")
load_file(env, "account_wallet", "demo", "product_product.xml")
load_file(env, "account_wallet", "demo", "account_wallet_type.xml")


def post_init_hook(cr, registry):
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
wallet = env["ir.module.module"].search([("name", "=", "account_wallet")])
l10n_generic = env["ir.module.module"].search(
[("name", "=", "l10n_generic_coa"), ("state", "=", "installed")]
)
if l10n_generic and wallet.demo:
_load_demo(env)
Loading