mirror of
https://github.com/bringout/oca-ocb-l10n_americas.git
synced 2026-04-27 04:12:03 +02:00
Initial commit: L10N_Americas packages
This commit is contained in:
commit
12b27ce151
714 changed files with 79328 additions and 0 deletions
4
odoo-bringout-oca-ocb-l10n_us/l10n_us/__init__.py
Normal file
4
odoo-bringout-oca-ocb-l10n_us/l10n_us/__init__.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import models
|
||||
18
odoo-bringout-oca-ocb-l10n_us/l10n_us/__manifest__.py
Normal file
18
odoo-bringout-oca-ocb-l10n_us/l10n_us/__manifest__.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
{
|
||||
'name': 'United States - Accounting',
|
||||
'version': '1.1',
|
||||
'category': 'Accounting/Localizations/Account Charts',
|
||||
'description': """
|
||||
United States - Chart of accounts.
|
||||
==================================
|
||||
""",
|
||||
'depends': ['l10n_generic_coa'],
|
||||
'data': [
|
||||
'data/res_company_data.xml',
|
||||
'views/res_partner_bank_views.xml'
|
||||
],
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
<record model="res.company" id="base.main_company">
|
||||
<field name="paperformat_id" ref="base.paperformat_us"/>
|
||||
</record>
|
||||
</odoo>
|
||||
4
odoo-bringout-oca-ocb-l10n_us/l10n_us/models/__init__.py
Normal file
4
odoo-bringout-oca-ocb-l10n_us/l10n_us/models/__init__.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import res_partner_bank
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import re
|
||||
from odoo import fields, models, api, _
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class ResPartnerBank(models.Model):
|
||||
_inherit = 'res.partner.bank'
|
||||
|
||||
aba_routing = fields.Char(string="ABA/Routing", help="American Bankers Association Routing Number")
|
||||
|
||||
@api.constrains('aba_routing')
|
||||
def _check_aba_routing(self):
|
||||
for bank in self:
|
||||
if bank.aba_routing and not re.match(r'^\d{1,9}$', bank.aba_routing):
|
||||
raise ValidationError(_('ABA/Routing should only contains numbers (maximum 9 digits).'))
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 30 KiB |
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_partner_bank_form_inherit_l10n_us" model="ir.ui.view">
|
||||
<field name="name">res.partner.bank.form.inherit</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="bank_id" position="after">
|
||||
<field name="aba_routing" attrs='{"invisible": [("acc_type", "=", "iban")]}'/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue