mirror of
https://github.com/bringout/oca-ocb-l10n_europe.git
synced 2026-04-27 08:21:59 +02:00
Initial commit: L10N_Europe packages
This commit is contained in:
commit
9803722600
2377 changed files with 380711 additions and 0 deletions
47
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/README.md
Normal file
47
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/README.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# France - Adding Mandatory Invoice Mentions (Decree no. 2022-1299)
|
||||
|
||||
|
||||
Add new address fields necessary to respect the new 2024-07-01 French law
|
||||
(https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000046383394) to invoices.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-ocb-l10n_fr_invoice_addr
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- l10n_fr
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: France - Adding Mandatory Invoice Mentions (Decree no. 2022-1299)
|
||||
- **Version**: 1.0
|
||||
- **Category**: Accounting/Localizations
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_fr_invoice_addr`.
|
||||
|
||||
## 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
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
|
|
@ -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_fr_invoice_addr Module - l10n_fr_invoice_addr
|
||||
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.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Configuration
|
||||
|
||||
Refer to Odoo settings for l10n_fr_invoice_addr. Configure related models, access rights, and options as needed.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Controllers
|
||||
|
||||
This module does not define custom HTTP controllers.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# Dependencies
|
||||
|
||||
This addon depends on:
|
||||
|
||||
- [l10n_fr](../../odoo-bringout-oca-ocb-l10n_fr)
|
||||
4
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/doc/FAQ.md
Normal file
4
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/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_fr_invoice_addr or install in UI.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Install
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-ocb-l10n_fr_invoice_addr"
|
||||
# or
|
||||
uv pip install odoo-bringout-oca-ocb-l10n_fr_invoice_addr"
|
||||
```
|
||||
12
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/doc/MODELS.md
Normal file
12
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/doc/MODELS.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Models
|
||||
|
||||
Detected core models and extensions in l10n_fr_invoice_addr.
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class account_move
|
||||
```
|
||||
|
||||
Notes
|
||||
- Classes show model technical names; fields omitted for brevity.
|
||||
- Items listed under _inherit are extensions of existing models.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Overview
|
||||
|
||||
Packaged Odoo addon: l10n_fr_invoice_addr. Provides features documented in upstream Odoo 16 under this addon.
|
||||
|
||||
- Source: OCA/OCB 16.0, addon l10n_fr_invoice_addr
|
||||
- License: LGPL-3
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Reports
|
||||
|
||||
This module does not define custom reports.
|
||||
|
|
@ -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
|
||||
|
|
@ -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_fr_invoice_addr/doc/USAGE.md
Normal file
7
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/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_fr_invoice_addr
|
||||
```
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Wizards
|
||||
|
||||
This module does not include UI wizards.
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import models
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
{
|
||||
'name': "France - Adding Mandatory Invoice Mentions (Decree no. 2022-1299)",
|
||||
'version': '1.0',
|
||||
'category': 'Accounting/Localizations',
|
||||
'description': """
|
||||
Add new address fields necessary to respect the new 2024-07-01 French law
|
||||
(https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000046383394) to invoices.
|
||||
""",
|
||||
'depends': [
|
||||
'l10n_fr',
|
||||
],
|
||||
'auto_install': True,
|
||||
'data': [
|
||||
'views/report_invoice.xml',
|
||||
],
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_fr_invoice_addr
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-10-30 09:34+0000\n"
|
||||
"PO-Revision-Date: 2024-10-30 09:34+0000\n"
|
||||
"Last-Translator: Manon Rondou <ronm@odoo.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\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"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "<strong>Customer Address:</strong>"
|
||||
msgstr "<strong>Adresse du client :</strong>"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "<strong>Operation Type:</strong>"
|
||||
msgstr "<strong>Type d'opération :</strong>"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "Goods Delivery"
|
||||
msgstr "Livraison de biens"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model:ir.model,name:l10n_fr_invoice_addr.model_account_move
|
||||
msgid "Journal Entry"
|
||||
msgstr "Pièce comptable"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model:ir.model.fields,field_description:l10n_fr_invoice_addr.field_account_bank_statement_line__l10n_fr_is_company_french
|
||||
#: model:ir.model.fields,field_description:l10n_fr_invoice_addr.field_account_move__l10n_fr_is_company_french
|
||||
#: model:ir.model.fields,field_description:l10n_fr_invoice_addr.field_account_payment__l10n_fr_is_company_french
|
||||
msgid "L10N Fr Is Company French"
|
||||
msgstr "L10N Fr Entreprise est française"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "Mixed Operation"
|
||||
msgstr "Opération mixte"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "Option to pay tax on debits"
|
||||
msgstr "Option pour le paiement de la taxe d'après les débits"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "SIRET:"
|
||||
msgstr "SIRET :"
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "Service Delivery"
|
||||
msgstr "Prestation de services"
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_fr_invoice_addr
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-10-30 09:34+0000\n"
|
||||
"PO-Revision-Date: 2024-10-30 09:34+0000\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: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "<strong>Customer Address:</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "<strong>Operation Type:</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "Goods Delivery"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model:ir.model,name:l10n_fr_invoice_addr.model_account_move
|
||||
msgid "Journal Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model:ir.model.fields,field_description:l10n_fr_invoice_addr.field_account_bank_statement_line__l10n_fr_is_company_french
|
||||
#: model:ir.model.fields,field_description:l10n_fr_invoice_addr.field_account_move__l10n_fr_is_company_french
|
||||
#: model:ir.model.fields,field_description:l10n_fr_invoice_addr.field_account_payment__l10n_fr_is_company_french
|
||||
msgid "L10N Fr Is Company French"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "Mixed Operation"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "Option to pay tax on debits"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "SIRET:"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_fr_invoice_addr
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_fr_invoice_addr.report_invoice_document
|
||||
msgid "Service Delivery"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import account_move
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
_inherit = 'account.move'
|
||||
|
||||
l10n_fr_is_company_french = fields.Boolean(compute='_compute_l10n_fr_is_company_french')
|
||||
|
||||
@api.model
|
||||
def _get_view(self, view_id=None, view_type='form', **options):
|
||||
arch, view = super()._get_view(view_id, view_type, **options)
|
||||
company = self.env.company
|
||||
if view_type == 'form' and company.country_code in company._get_france_country_codes():
|
||||
shipping_field = arch.xpath("//field[@name='partner_shipping_id']")[0]
|
||||
shipping_field.attrib.pop("groups", None)
|
||||
return arch, view
|
||||
|
||||
@api.depends('company_id.country_code')
|
||||
def _compute_l10n_fr_is_company_french(self):
|
||||
for record in self:
|
||||
record.l10n_fr_is_company_french = record.country_code in record.company_id._get_france_country_codes()
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
||||
<xpath expr="(//address)[1]" position="after">
|
||||
<div class="mb-0" t-if="o.l10n_fr_is_company_french and o.partner_id.commercial_partner_id.siret">
|
||||
SIRET: <t t-esc="o.partner_id.commercial_partner_id.siret"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="(//address)[2]" position="after">
|
||||
<div class="mb-0" t-if="o.l10n_fr_is_company_french and o.partner_id.commercial_partner_id.siret">
|
||||
SIRET: <t t-esc="o.partner_id.commercial_partner_id.siret"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="(//address)[3]" position="after">
|
||||
<div class="mb-0" t-if="o.l10n_fr_is_company_french and o.partner_id.commercial_partner_id.siret">
|
||||
SIRET: <t t-esc="o.partner_id.commercial_partner_id.siret"/>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@id='informations']" position="inside">
|
||||
<t t-if="o.l10n_fr_is_company_french and o.partner_id.commercial_partner_id != o.partner_id and o.move_type.startswith('out_')">
|
||||
<t t-set="partner" t-value="o.partner_id.commercial_partner_id"/>
|
||||
<div class="col-auto col-3 mw-100 mb-2" name="customer_address">
|
||||
<strong>Customer Address:</strong>
|
||||
<address t-field="partner.self" class="m-0" t-options="{'widget': 'contact', 'fields': ['address'], 'no_marker': True}"/>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@id='informations']" position="inside">
|
||||
<t t-if="o.l10n_fr_is_company_french and o.move_type.startswith('out_')">
|
||||
<t t-set="tax_scopes" t-value="o.invoice_line_ids.mapped('tax_ids.tax_scope')"/>
|
||||
<t t-set="has_service" t-value="'service' in tax_scopes"/>
|
||||
<t t-set="has_consu" t-value="'consu' in tax_scopes"/>
|
||||
|
||||
<div t-if="has_service or has_consu" class="col-auto col-3 mw-100 mb-2" name="operation_type">
|
||||
<strong>Operation Type:</strong>
|
||||
<p t-if="has_service and has_consu" class="m-0">
|
||||
Mixed Operation
|
||||
</p>
|
||||
<p t-elif="has_service and not has_consu" class="m-0">
|
||||
Service Delivery
|
||||
</p>
|
||||
<p t-else="" class="m-0">
|
||||
Goods Delivery
|
||||
</p>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//p[@name='payment_communication']" position="after">
|
||||
<p t-if="o.l10n_fr_is_company_french and o.move_type.startswith('out_') and 'on_invoice' in o.invoice_line_ids.mapped('tax_ids.tax_exigibility')">
|
||||
Option to pay tax on debits
|
||||
</p>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
42
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/pyproject.toml
Normal file
42
odoo-bringout-oca-ocb-l10n_fr_invoice_addr/pyproject.toml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-l10n_fr_invoice_addr"
|
||||
version = "16.0.0"
|
||||
description = "France - Adding Mandatory Invoice Mentions (Decree no. 2022-1299) - Odoo addon"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-l10n_fr>=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_fr_invoice_addr"]
|
||||
|
||||
[tool.rye]
|
||||
managed = true
|
||||
dev-dependencies = [
|
||||
"pytest>=8.4.1",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue