Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,45 @@
# Add dms field for account
Odoo addon: account_dms_field
## Installation
```bash
pip install odoo-bringout-oca-dms-account_dms_field
```
## Dependencies
This addon depends on:
- account
- dms_field
## Manifest Information
- **Name**: Add dms field for account
- **Version**: 16.0.1.0.1
- **Category**: Accounting/Accounting
- **License**: LGPL-3
- **Installable**: True
## Source
Based on [OCA/dms](https://github.com/OCA/dms) branch 16.0, addon `account_dms_field`.
## 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

View file

@ -0,0 +1,101 @@
=========================
Add dms field for account
=========================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b7f18580a215d7c509b59f1e27607ad97ff06df4cc445bd45e838ead8c9e5164
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/licence-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%2Fdms-lightgray.png?logo=github
:target: https://github.com/OCA/dms/tree/16.0/account_dms_field
:alt: OCA/dms
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/dms-16-0/dms-16-0-account_dms_field
: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/dms&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
Add the Documents tab with the files in the account move form view.
**Table of contents**
.. contents::
:local:
Configuration
=============
#. *Go to Documents > Configuration > File templates* and create a new record.
#. Set a storage, a model (account.move) and the access groups you want.
#. Click on the "Documents" tab icon and a folder hierarchy will be created.
#. You can set here the hierarchy of directories, subdirectories and files you need, this hierarchy will be used as a base when creating a new record (res.partner for example).
Usage
=====
#. Go to the form view of an existing account move and click on the "Documents" tab icon, a hierarchy of
folders and files linked to that record will be created.
#. Create a new account.move. A hierarchy of folders and files linked to that record will be created.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/dms/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/dms/issues/new?body=module:%20account_dms_field%0Aversion:%2016.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
~~~~~~~
* Agenterp
Contributors
~~~~~~~~~~~~
* `Agenterp <https://www.agenterp.com/>`_:
* Georg Notter
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.
.. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px
:target: https://github.com/victoralmau
:alt: victoralmau
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-victoralmau|
This module is part of the `OCA/dms <https://github.com/OCA/dms/tree/16.0/account_dms_field>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View file

@ -0,0 +1 @@
from . import models

View file

@ -0,0 +1,12 @@
{
"name": "Add dms field for account",
"version": "16.0.1.0.1",
"category": "Accounting/Accounting",
"website": "https://github.com/OCA/dms",
"author": "Agent ERP GmbH, Odoo Community Association (OCA)",
"depends": ["account", "dms_field"],
"data": ["views/account_move_view.xml"],
"demo": ["demo/account_dms_data.xml"],
"installable": True,
"license": "LGPL-3",
}

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="read_access_account_move_group" model="dms.access.group">
<field name="name">Everyone for Account DMS</field>
<field name="group_ids" eval="[(4, ref('account.group_account_invoice'))]" />
<field name="perm_create" eval="True" />
<field name="perm_write" eval="True" />
<field name="perm_unlink" eval="True" />
</record>
<record id="field_template_account" model="dms.field.template">
<field name="name">Account</field>
<field name="storage_id" ref="dms.storage_demo" />
<field name="model_id" ref="account.model_account_move" />
<field name="user_field_id" ref="account.field_account_move__user_id" />
<field name="group_ids" eval="[(4, ref('read_access_account_move_group'))]" />
</record>
</odoo>

View file

@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_dms_field
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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_dms_field
#: model:ir.model.fields,field_description:account_dms_field.field_account_move__dms_directory_ids
msgid "DMS Directories"
msgstr ""
#. module: account_dms_field
#: model:ir.model,name:account_dms_field.model_dms_field_template
msgid "Dms Field Template"
msgstr ""
#. module: account_dms_field
#: model_terms:ir.ui.view,arch_db:account_dms_field.view_move_form_inherit_account_dms_field
msgid "Documents"
msgstr ""
#. module: account_dms_field
#: model:dms.access.group,name:account_dms_field.read_access_account_move_group
msgid "Everyone for Account DMS"
msgstr ""
#. module: account_dms_field
#: model:ir.model,name:account_dms_field.model_account_move
msgid "Journal Entry"
msgstr ""

View file

@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_dms_field
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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_dms_field
#: model:ir.model.fields,field_description:account_dms_field.field_account_move__dms_directory_ids
msgid "DMS Directories"
msgstr "DMS direktoriji"
#. module: account_dms_field
#: model:ir.model,name:account_dms_field.model_dms_field_template
msgid "Dms Field Template"
msgstr "DMS templejt polja"
#. module: account_dms_field
#: model_terms:ir.ui.view,arch_db:account_dms_field.view_move_form_inherit_account_dms_field
msgid "Documents"
msgstr "Dokumenti"
#. module: account_dms_field
#: model:dms.access.group,name:account_dms_field.read_access_account_move_group
msgid "Everyone for Account DMS"
msgstr "Svi za Account DMS"
#. module: account_dms_field
#: model:ir.model,name:account_dms_field.model_account_move
msgid "Journal Entry"
msgstr "Žurnal"

View file

@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_dms_field
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-10-17 16:06+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.6.2\n"
#. module: account_dms_field
#: model:ir.model.fields,field_description:account_dms_field.field_account_move__dms_directory_ids
msgid "DMS Directories"
msgstr "Cartelle DMS"
#. module: account_dms_field
#: model:ir.model,name:account_dms_field.model_dms_field_template
msgid "Dms Field Template"
msgstr "Modello campo DMS"
#. module: account_dms_field
#: model_terms:ir.ui.view,arch_db:account_dms_field.view_move_form_inherit_account_dms_field
msgid "Documents"
msgstr "Documenti"
#. module: account_dms_field
#: model:dms.access.group,name:account_dms_field.read_access_account_move_group
msgid "Everyone for Account DMS"
msgstr "Tutti per conto DMS"
#. module: account_dms_field
#: model:ir.model,name:account_dms_field.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"

View file

@ -0,0 +1,2 @@
from . import account_move
from . import dms_field_template

View file

@ -0,0 +1,6 @@
from odoo import models
class AccountMove(models.Model):
_name = "account.move"
_inherit = ["account.move", "dms.field.mixin"]

View file

@ -0,0 +1,12 @@
from odoo import models
class DmsFieldTemplate(models.Model):
_inherit = "dms.field.template"
def _prepare_directory_vals(self, directory, record):
vals = super()._prepare_directory_vals(directory, record)
if "/" not in vals["name"]:
return vals
vals["name"] = vals["name"].replace("/", "-")
return vals

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1 @@
from . import test_account_dms_field

View file

@ -0,0 +1,54 @@
from odoo.addons.base.tests.common import BaseCommon
class TestAccountDmsField(BaseCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, test_dms_field=True))
cls.template = cls.env.ref("account_dms_field.field_template_account")
cls.storage = cls.template.storage_id
cls.access_group = cls.template.group_ids
cls.account_model = cls.env["account.move"]
cls.partner = cls.env.ref("base.res_partner_12")
cls.test_directory = cls.env["dms.directory"].create(
{
"name": "Test Directory",
"parent_id": cls.template.dms_directory_ids[0].id,
"storage_id": cls.template.storage_id.id,
}
)
def test_01_account_document_directory(self):
account_move = self.account_model.create(
{
"partner_id": self.partner.id,
}
)
account_move.invalidate_model()
directory = account_move.dms_directory_ids
# Assert that only one directory is created for the account move.
self.assertEqual(len(directory), 1, "Directory length must be 1.")
# Assert that the storage associated with the directory is the same as the
# template's storage.
self.assertEqual(
directory.storage_id,
self.storage,
"Account move directory storage is different from the template storage.",
)
# Assert that the custom access group is present in the directory's group
# list.
self.assertIn(
self.access_group,
directory.group_ids,
"Account move directory groups are different from the template groups.",
)
# Map the names of child directories related to the account move directory.
child_directory_names = directory.mapped("child_directory_ids.name")
# Assert that a specific child directory, "Test Directory", exists.
self.assertIn(
"Test Directory",
child_directory_names,
"Test Directory is not in the child directory of the account move "
"directory.",
)

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_move_form_inherit_account_dms_field" model="ir.ui.view">
<field name="name">view.move.form.inherit.account.dms.field</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page
name="documents"
string="Documents"
attrs="{'invisible': [('id', '=', False)]}"
>
<field name="dms_directory_ids" mode="dms_list" />
</page>
</xpath>
</field>
</record>
</odoo>

View 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 Account_dms_field Module - account_dms_field
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.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for account_dms_field. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,3 @@
# Controllers
This module does not define custom HTTP controllers.

View file

@ -0,0 +1,6 @@
# Dependencies
This addon depends on:
- [account](../../odoo-bringout-oca-ocb-account)
- [dms_field](../../odoo-bringout-oca-dms-dms_field)

View 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 account_dms_field or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-dms-account_dms_field"
# or
uv pip install odoo-bringout-oca-dms-account_dms_field"
```

View file

@ -0,0 +1,13 @@
# Models
Detected core models and extensions in account_dms_field.
```mermaid
classDiagram
class account_move
class dms_field_template
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: account_dms_field. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon account_dms_field
- License: LGPL-3

View file

@ -0,0 +1,3 @@
# Reports
This module does not define custom reports.

View 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

View 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.

View 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 account_dms_field
```

View file

@ -0,0 +1,3 @@
# Wizards
This module does not include UI wizards.

View file

@ -0,0 +1,43 @@
[project]
name = "odoo-bringout-oca-dms-account_dms_field"
version = "16.0.0"
description = "Add dms field for account - Odoo addon"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-account>=16.0.0",
"odoo-bringout-oca-dms-dms_field>=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 = ["account_dms_field"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.4.1",
]