Browse Source

[ADD] Module which allow to deactivate partner bank accounts

pull/737/head
Benjamin Willig 7 years ago
committed by Thomas Binsfeld
parent
commit
febdbfdbb6
  1. 67
      partner_bank_active/README.rst
  2. 1
      partner_bank_active/__init__.py
  3. 18
      partner_bank_active/__manifest__.py
  4. 1
      partner_bank_active/models/__init__.py
  5. 12
      partner_bank_active/models/res_partner_bank.py
  6. BIN
      partner_bank_active/static/description/icon.png
  7. 34
      partner_bank_active/views/res_partner_bank.xml

67
partner_bank_active/README.rst

@ -0,0 +1,67 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
===================
Partner Bank Active
===================
Allow to deactivate a partner bank account
Usage
=====
To use this module, you need to:
#. Go on a partner bank account form view
#. Edit the bank account
#. Set it as active/inactive
Please note that there is no action window for partner banks in Odoo base.
But for example, you can install 'sale' and then you will be able to access
partner banks in sale configuration menu.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/134/10.0
Known issues / Roadmap
======================
. If you deactivate a company bank account, linked journals will still be active.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/partner-contact/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Benjamin Willig <benjamin.willig@acsone.eu>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
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.
To contribute to this module, please visit https://odoo-community.org.

1
partner_bank_active/__init__.py

@ -0,0 +1 @@
from . import models

18
partner_bank_active/__manifest__.py

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Partner Bank Active',
'summary': "Allow to deactivate a partner bank account",
'version': '10.0.1.0.0',
'license': 'AGPL-3',
'author': 'ACSONE SA/NV, Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/partner-contact',
'depends': [
'base',
],
'data': [
'views/res_partner_bank.xml',
],
}

1
partner_bank_active/models/__init__.py

@ -0,0 +1 @@
from . import res_partner_bank

12
partner_bank_active/models/res_partner_bank.py

@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResPartnerBank(models.Model):
_inherit = 'res.partner.bank'
active = fields.Boolean(default=True)

BIN
partner_bank_active/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

34
partner_bank_active/views/res_partner_bank.xml

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record model="ir.ui.view" id="res_partner_bank_form_view">
<field name="name">res.partner.bank.form (in partner_bank_active)</field>
<field name="model">res.partner.bank</field>
<field name="inherit_id" ref="base.view_partner_bank_form"/>
<field name="arch" type="xml">
<field name="company_id" position="after">
<field name="active"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="res_partner_bank_search_view">
<field name="name">res.partner.bank.search (in (partner_bank_active)</field>
<field name="model">res.partner.bank</field>
<field name="inherit_id" ref="base.view_partner_bank_search"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<separator/>
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
</field>
</field>
</record>
</odoo>
Loading…
Cancel
Save