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
104 changes: 104 additions & 0 deletions account_invoice_bank_brand/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==========================
Account Invoice Bank Brand
==========================

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

.. |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%2Fbrand-lightgray.png?logo=github
:target: https://github.com/OCA/brand/tree/19.0/account_invoice_bank_brand
:alt: OCA/brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/brand-19-0/brand-19-0-account_invoice_bank_brand
: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/brand&target_branch=19.0
:alt: Try me on Runboat

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

This module addresses the need to specify different receiving bank
accounts based on brand. When generating invoices, the module
automatically populates the invoice's bank account field with the
configured default, streamlining the payment process and ensuring
invoices specify the correct remittance details based on the brand.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Go to Settings > Users & Companies > Brands

2. Select a brand

3. Define its bank account

4. Create a new invoice

1. Select the brand
2. The bank account is automatically filled with the brand's
specified bank account.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/brand/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/brand/issues/new?body=module:%20account_invoice_bank_brand%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
-------

* ACSONE SA/NV

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

- Quentin Groulard <quentin.groulard@acsone.eu>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

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/brand <https://github.com/OCA/brand/tree/19.0/account_invoice_bank_brand>`_ 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 account_invoice_bank_brand/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions account_invoice_bank_brand/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Account Invoice Bank Brand",
"summary": "Enables the automatic selection of the partner's"
"bank account on invoices based on the brand.",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/brand",
"depends": ["account_brand"],
"data": ["views/res_brand.xml"],
}
49 changes: 49 additions & 0 deletions account_invoice_bank_brand/i18n/account_invoice_bank_brand.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_bank_brand
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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: account_invoice_bank_brand
#: model:ir.model.fields,field_description:account_invoice_bank_brand.field_res_brand__partner_bank_id
msgid "Bank Account"
msgstr ""

#. module: account_invoice_bank_brand
#: model:ir.model.fields,help:account_invoice_bank_brand.field_res_brand__partner_bank_id
msgid ""
"Bank Account Number to which the invoices of this brand will be paid (for "
"Customer Invoice and Vendor Credit Note)"
msgstr ""

#. module: account_invoice_bank_brand
#: model:ir.model,name:account_invoice_bank_brand.model_res_brand
msgid "Brand"
msgstr ""

#. module: account_invoice_bank_brand
#: model_terms:ir.ui.view,arch_db:account_invoice_bank_brand.res_brand_form_view
msgid "Invoices"
msgstr ""

#. module: account_invoice_bank_brand
#: model:ir.model,name:account_invoice_bank_brand.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: account_invoice_bank_brand
#. odoo-python
#: code:addons/account_invoice_bank_brand/models/res_brand.py:0
msgid ""
"The account selected for invoices payment does not belong to the same "
"partner as this brand."
msgstr ""
56 changes: 56 additions & 0 deletions account_invoice_bank_brand/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_bank_brand
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-07-30 12:05+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: account_invoice_bank_brand
#: model:ir.model.fields,field_description:account_invoice_bank_brand.field_res_brand__partner_bank_id
msgid "Bank Account"
msgstr "Conto bancario"

#. module: account_invoice_bank_brand
#: model:ir.model.fields,help:account_invoice_bank_brand.field_res_brand__partner_bank_id
msgid ""
"Bank Account Number to which the invoices of this brand will be paid (for "
"Customer Invoice and Vendor Credit Note)"
msgstr ""
"Numero del conto bancario su cui verranno pagate le fatture di questa marca ("
"per fattura cliente e note di credito fornitore)"

#. module: account_invoice_bank_brand
#: model:ir.model,name:account_invoice_bank_brand.model_res_brand
msgid "Brand"
msgstr "Marca"

#. module: account_invoice_bank_brand
#: model_terms:ir.ui.view,arch_db:account_invoice_bank_brand.res_brand_form_view
msgid "Invoices"
msgstr "Fatture"

#. module: account_invoice_bank_brand
#: model:ir.model,name:account_invoice_bank_brand.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"

#. module: account_invoice_bank_brand
#. odoo-python
#: code:addons/account_invoice_bank_brand/models/res_brand.py:0
msgid ""
"The account selected for invoices payment does not belong to the same "
"partner as this brand."
msgstr ""
"Il conto selezionato per il pagamento delle fatture non appartiene allo "
"stesso partner della marca."
56 changes: 56 additions & 0 deletions account_invoice_bank_brand/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_bank_brand
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-08-09 15:25+0000\n"
"Last-Translator: Bosd <c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>\n"
"Language-Team: none\n"
"Language: nl\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: account_invoice_bank_brand
#: model:ir.model.fields,field_description:account_invoice_bank_brand.field_res_brand__partner_bank_id
msgid "Bank Account"
msgstr "Bankrekening"

#. module: account_invoice_bank_brand
#: model:ir.model.fields,help:account_invoice_bank_brand.field_res_brand__partner_bank_id
msgid ""
"Bank Account Number to which the invoices of this brand will be paid (for "
"Customer Invoice and Vendor Credit Note)"
msgstr ""
"Bankrekeningnummer waarop de facturen van dit merk betaald zullen worden ("
"voor Klantfactuur en Leverancierscreditnota)"

#. module: account_invoice_bank_brand
#: model:ir.model,name:account_invoice_bank_brand.model_res_brand
msgid "Brand"
msgstr "Merk"

#. module: account_invoice_bank_brand
#: model_terms:ir.ui.view,arch_db:account_invoice_bank_brand.res_brand_form_view
msgid "Invoices"
msgstr "Facturen"

#. module: account_invoice_bank_brand
#: model:ir.model,name:account_invoice_bank_brand.model_account_move
msgid "Journal Entry"
msgstr "Journaalpost"

#. module: account_invoice_bank_brand
#. odoo-python
#: code:addons/account_invoice_bank_brand/models/res_brand.py:0
msgid ""
"The account selected for invoices payment does not belong to the same "
"partner as this brand."
msgstr ""
"De geselecteerde rekening voor factuurbetaling behoort niet toe aan dezelfde "
"partner als dit merk."
2 changes: 2 additions & 0 deletions account_invoice_bank_brand/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import account_move
from . import res_brand
20 changes: 20 additions & 0 deletions account_invoice_bank_brand/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class AccountMove(models.Model):
_inherit = "account.move"

@api.depends("brand_id")
def _compute_partner_bank_id(self):
res = super()._compute_partner_bank_id()
for move in self:
if (
move.move_type in ("out_invoice", "in_refund")
and move.brand_id
and move.brand_id.partner_bank_id
):
move.partner_bank_id = move.brand_id.partner_bank_id
return res
31 changes: 31 additions & 0 deletions account_invoice_bank_brand/models/res_brand.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models
from odoo.exceptions import ValidationError


class ResBrand(models.Model):
_inherit = "res.brand"

partner_bank_id = fields.Many2one(
comodel_name="res.partner.bank",
domain="[('partner_id', '=', partner_id)]",
string="Bank Account",
help="Bank Account Number to which the invoices of this "
"brand will be paid (for Customer Invoice and Vendor Credit Note)",
)

@api.constrains("partner_id", "partner_bank_id")
def validate_partner_bank_id(self):
for record in self:
if (
record.partner_bank_id
and record.partner_id != record.partner_bank_id.partner_id
):
raise ValidationError(
self.env._(
"The account selected for invoices payment does not "
"belong to the same partner as this brand."
)
)
3 changes: 3 additions & 0 deletions account_invoice_bank_brand/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions account_invoice_bank_brand/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Quentin Groulard \<<quentin.groulard@acsone.eu>\>
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
- Bhavesh Heliconia
2 changes: 2 additions & 0 deletions account_invoice_bank_brand/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module addresses the need to specify different receiving bank accounts based on brand.
When generating invoices, the module automatically populates the invoice's bank account field with the configured default, streamlining the payment process and ensuring invoices specify the correct remittance details based on the brand.
11 changes: 11 additions & 0 deletions account_invoice_bank_brand/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To use this module, you need to:

1. Go to Settings \> Users & Companies \> Brands

2. Select a brand

3. Define its bank account

4. Create a new invoice
1. Select the brand
2. The bank account is automatically filled with the brand's specified bank account.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading