mirror of
https://github.com/bringout/oca-ocb-l10n_americas.git
synced 2026-04-26 02:31:58 +02:00
Initial commit: L10N_Americas packages
This commit is contained in:
commit
12b27ce151
714 changed files with 79328 additions and 0 deletions
49
odoo-bringout-oca-ocb-l10n_us/README.md
Normal file
49
odoo-bringout-oca-ocb-l10n_us/README.md
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# United States - Accounting
|
||||
|
||||
|
||||
United States - Chart of accounts.
|
||||
==================================
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-ocb-l10n_us
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- l10n_generic_coa
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: United States - Accounting
|
||||
- **Version**: 1.1
|
||||
- **Category**: Accounting/Localizations/Account Charts
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_us`.
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Reports: doc/REPORTS.md
|
||||
- Security: doc/SECURITY.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
32
odoo-bringout-oca-ocb-l10n_us/doc/ARCHITECTURE.md
Normal file
32
odoo-bringout-oca-ocb-l10n_us/doc/ARCHITECTURE.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Architecture
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
U[Users] -->|HTTP| V[Views and QWeb Templates]
|
||||
V --> C[Controllers]
|
||||
V --> W[Wizards – Transient Models]
|
||||
C --> M[Models and ORM]
|
||||
W --> M
|
||||
M --> R[Reports]
|
||||
DX[Data XML] --> M
|
||||
S[Security – ACLs and Groups] -. enforces .-> M
|
||||
|
||||
subgraph L10n_us Module - l10n_us
|
||||
direction LR
|
||||
M:::layer
|
||||
W:::layer
|
||||
C:::layer
|
||||
V:::layer
|
||||
R:::layer
|
||||
S:::layer
|
||||
DX:::layer
|
||||
end
|
||||
|
||||
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
|
||||
```
|
||||
|
||||
Notes
|
||||
- Views include tree/form/kanban templates and report templates.
|
||||
- Controllers provide website/portal routes when present.
|
||||
- Wizards are UI flows implemented with `models.TransientModel`.
|
||||
- Data XML loads data/demo records; Security defines groups and access.
|
||||
3
odoo-bringout-oca-ocb-l10n_us/doc/CONFIGURATION.md
Normal file
3
odoo-bringout-oca-ocb-l10n_us/doc/CONFIGURATION.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Configuration
|
||||
|
||||
Refer to Odoo settings for l10n_us. Configure related models, access rights, and options as needed.
|
||||
3
odoo-bringout-oca-ocb-l10n_us/doc/CONTROLLERS.md
Normal file
3
odoo-bringout-oca-ocb-l10n_us/doc/CONTROLLERS.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Controllers
|
||||
|
||||
This module does not define custom HTTP controllers.
|
||||
5
odoo-bringout-oca-ocb-l10n_us/doc/DEPENDENCIES.md
Normal file
5
odoo-bringout-oca-ocb-l10n_us/doc/DEPENDENCIES.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Dependencies
|
||||
|
||||
This addon depends on:
|
||||
|
||||
- [l10n_generic_coa](../../odoo-bringout-oca-ocb-l10n_generic_coa)
|
||||
4
odoo-bringout-oca-ocb-l10n_us/doc/FAQ.md
Normal file
4
odoo-bringout-oca-ocb-l10n_us/doc/FAQ.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# FAQ
|
||||
|
||||
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
|
||||
- Q: How to enable? A: Start server with --addon l10n_us or install in UI.
|
||||
7
odoo-bringout-oca-ocb-l10n_us/doc/INSTALL.md
Normal file
7
odoo-bringout-oca-ocb-l10n_us/doc/INSTALL.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Install
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-ocb-l10n_us"
|
||||
# or
|
||||
uv pip install odoo-bringout-oca-ocb-l10n_us"
|
||||
```
|
||||
12
odoo-bringout-oca-ocb-l10n_us/doc/MODELS.md
Normal file
12
odoo-bringout-oca-ocb-l10n_us/doc/MODELS.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Models
|
||||
|
||||
Detected core models and extensions in l10n_us.
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class res_partner_bank
|
||||
```
|
||||
|
||||
Notes
|
||||
- Classes show model technical names; fields omitted for brevity.
|
||||
- Items listed under _inherit are extensions of existing models.
|
||||
6
odoo-bringout-oca-ocb-l10n_us/doc/OVERVIEW.md
Normal file
6
odoo-bringout-oca-ocb-l10n_us/doc/OVERVIEW.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Overview
|
||||
|
||||
Packaged Odoo addon: l10n_us. Provides features documented in upstream Odoo 16 under this addon.
|
||||
|
||||
- Source: OCA/OCB 16.0, addon l10n_us
|
||||
- License: LGPL-3
|
||||
3
odoo-bringout-oca-ocb-l10n_us/doc/REPORTS.md
Normal file
3
odoo-bringout-oca-ocb-l10n_us/doc/REPORTS.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Reports
|
||||
|
||||
This module does not define custom reports.
|
||||
8
odoo-bringout-oca-ocb-l10n_us/doc/SECURITY.md
Normal file
8
odoo-bringout-oca-ocb-l10n_us/doc/SECURITY.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Security
|
||||
|
||||
This module does not define custom security rules or access controls beyond Odoo defaults.
|
||||
|
||||
Default Odoo security applies:
|
||||
- Base user access through standard groups
|
||||
- Model access inherited from dependencies
|
||||
- No custom row-level security rules
|
||||
5
odoo-bringout-oca-ocb-l10n_us/doc/TROUBLESHOOTING.md
Normal file
5
odoo-bringout-oca-ocb-l10n_us/doc/TROUBLESHOOTING.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Troubleshooting
|
||||
|
||||
- Ensure Python and Odoo environment matches repo guidance.
|
||||
- Check database connectivity and logs if startup fails.
|
||||
- Validate that dependent addons listed in DEPENDENCIES.md are installed.
|
||||
7
odoo-bringout-oca-ocb-l10n_us/doc/USAGE.md
Normal file
7
odoo-bringout-oca-ocb-l10n_us/doc/USAGE.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Usage
|
||||
|
||||
Start Odoo including this addon (from repo root):
|
||||
|
||||
```bash
|
||||
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon l10n_us
|
||||
```
|
||||
3
odoo-bringout-oca-ocb-l10n_us/doc/WIZARDS.md
Normal file
3
odoo-bringout-oca-ocb-l10n_us/doc/WIZARDS.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Wizards
|
||||
|
||||
This module does not include UI wizards.
|
||||
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>
|
||||
42
odoo-bringout-oca-ocb-l10n_us/pyproject.toml
Normal file
42
odoo-bringout-oca-ocb-l10n_us/pyproject.toml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-l10n_us"
|
||||
version = "16.0.0"
|
||||
description = "United States - Accounting - Odoo addon"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-l10n_generic_coa>=16.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">= 3.11"
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://github.com/bringout/0"
|
||||
repository = "https://github.com/bringout/0"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.metadata]
|
||||
allow-direct-references = true
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["l10n_us"]
|
||||
|
||||
[tool.rye]
|
||||
managed = true
|
||||
dev-dependencies = [
|
||||
"pytest>=8.4.1",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue