diff --git a/partner_bank_code/__init__.py b/partner_bank_code/__init__.py new file mode 100644 index 000000000..4b76c7b2d --- /dev/null +++ b/partner_bank_code/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/partner_bank_code/__manifest__.py b/partner_bank_code/__manifest__.py new file mode 100644 index 000000000..0832fe991 --- /dev/null +++ b/partner_bank_code/__manifest__.py @@ -0,0 +1,13 @@ +# Copyright 2021 Ecosoft Co., Ltd. (https://ecosoft.co.th) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Partner Bank Code", + "summary": "Add fields information in banks", + "version": "14.0.1.0.0", + "website": "https://github.com/OCA/partner-contact", + "author": "Ecosoft, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": ["base"], + "data": ["views/res_bank.xml"], +} diff --git a/partner_bank_code/models/__init__.py b/partner_bank_code/models/__init__.py new file mode 100644 index 000000000..084c03bdb --- /dev/null +++ b/partner_bank_code/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import res_bank diff --git a/partner_bank_code/models/res_bank.py b/partner_bank_code/models/res_bank.py new file mode 100644 index 000000000..47a2b8240 --- /dev/null +++ b/partner_bank_code/models/res_bank.py @@ -0,0 +1,19 @@ +# Copyright 2021 Ecosoft Co., Ltd. (https://ecosoft.co.th) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResBank(models.Model): + _inherit = "res.bank" + + bank_code = fields.Char() + bank_branch_code = fields.Char() + + _sql_constraints = [ + ( + "bank_code_unique", + "unique(bank_code, bank_branch_code)", + "Bank and Branch Code should be unique.", + ), + ] diff --git a/partner_bank_code/readme/CONTRIBUTORS.rst b/partner_bank_code/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..cc6b23102 --- /dev/null +++ b/partner_bank_code/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Saran Lim. diff --git a/partner_bank_code/readme/DESCRIPTION.rst b/partner_bank_code/readme/DESCRIPTION.rst new file mode 100644 index 000000000..eedb1620c --- /dev/null +++ b/partner_bank_code/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds a field 'Bank Code' and 'Bank Branch Code' on Banks. diff --git a/partner_bank_code/readme/USAGE.rst b/partner_bank_code/readme/USAGE.rst new file mode 100644 index 000000000..dd8551b82 --- /dev/null +++ b/partner_bank_code/readme/USAGE.rst @@ -0,0 +1,2 @@ +#. Go to Contacts > Configuration > Bank Accounts > Bank +#. Fill Bank Code, Bank Branch Code (if any) diff --git a/partner_bank_code/static/description/icon.png b/partner_bank_code/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/partner_bank_code/static/description/icon.png differ diff --git a/partner_bank_code/static/description/index.html b/partner_bank_code/static/description/index.html new file mode 100644 index 000000000..cb79b6249 --- /dev/null +++ b/partner_bank_code/static/description/index.html @@ -0,0 +1,434 @@ + + + + + + +Personal information page for contacts + + + +
+

Personal information page for contacts

+ + +

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runbot

+

This module extends the contact management functionality.

+

Its only purpose is to serve as a base for other modules that add personal +information fields to contacts that are persons.

+

Table of contents

+ +
+

Usage

+

You can find a new page called Personal Information in the contact’s form.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Nicolas JEUDY
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/partner-contact project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/partner_bank_code/views/res_bank.xml b/partner_bank_code/views/res_bank.xml new file mode 100644 index 000000000..78b4cd538 --- /dev/null +++ b/partner_bank_code/views/res_bank.xml @@ -0,0 +1,25 @@ + + + + res.bank.form + res.bank + + + + + + + + + + res.bank.tree + res.bank + + + + + + + + +