Initial commit: Core packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:45 +02:00
commit 12c29a983b
9512 changed files with 8379910 additions and 0 deletions

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 Base_setup Module - base_setup
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 base_setup. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,17 @@
# Controllers
HTTP routes provided by this module.
```mermaid
sequenceDiagram
participant U as User/Client
participant C as Module Controllers
participant O as ORM/Views
U->>C: HTTP GET/POST (routes)
C->>O: ORM operations, render templates
O-->>U: HTML/JSON/PDF
```
Notes
- See files in controllers/ for route definitions.

View file

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

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

View file

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

View file

@ -0,0 +1,14 @@
# Models
Detected core models and extensions in base_setup.
```mermaid
classDiagram
class ir_http
class res_config_settings
class res_users
```
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: base_setup. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon base_setup
- License: LGPL-3

View file

@ -0,0 +1,170 @@
# Patch: Fix Bosnian Translation File Errors
## Module: base_setup
### Description
This patch fixes critical syntax and structural errors in the Bosnian (bs) translation file that were causing Odoo view parsing errors. The issues involved msgid/msgstr mismatches where the translation content didn't match the structure of the source English text.
### Files Modified
- `base_setup/i18n/bs.po`
### Issues Fixed
#### 1. Company/Companies Entry Mismatch
**Location**: Lines 346-347
**Problem**: The msgid contained HTML spans with `attrs` attributes for Company/Companies, but the msgstr contained completely different HTML content about building icons.
**Before**:
```po
msgid "<span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&gt;', '1')]}\">\n Company\n </span>\n <span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&lt;=', '1')]}\">\n Companies\n </span>\n <br/>"
msgstr "<i class=\"fa fa-lg fa-building-o\"/>\n <span class=\"Tekst-muted\">\n the creation of documents between your companies\n </span>"
```
**After**:
```po
msgid "<span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&gt;', '1')]}\">\n Company\n </span>\n <span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&lt;=', '1')]}\">\n Companies\n </span>\n <br/>"
msgstr "<span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&gt;', '1')]}\">\n Kompanija\n </span>\n <span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&lt;=', '1')]}\">\n Kompanije\n </span>\n <br/>"
```
#### 2. "About" Entry Mismatch
**Location**: Lines 358-359
**Problem**: Simple text msgid "About" had HTML content in msgstr instead of simple translation.
**Before**:
```po
msgid "About"
msgstr "<span class=\"o_form_label\">Format</span>\n <span class=\"fa fa-lg fa-building-o\" title=\"Vrednosti postavljene ovde su specifične za kompaniju.\" aria-label=\"Vrednosti postavljene ovde su specifične za kompaniju.\" groups=\"base.group_multi_company\" role=\"img\"/>"
```
**After**:
```po
msgid "About"
msgstr "O programu"
```
#### 3. "Save" Instruction Mismatch
**Location**: Lines 28-29
**Problem**: HTML instruction with `<strong>` tags had completely different HTML content in msgstr.
**Before**:
```po
msgid "<strong>Save</strong> this page and come back here to set up the feature."
msgstr "<span class=\"o_form_label\">Šablon dokumenta</span>\n <span class=\"fa fa-lg fa-building-o\" title=\"Vrednosti postavljene ovde su specifične za kompaniju.\" aria-label=\"Vrednosti postavljene ovde su specifične za kompaniju.\" groups=\"base.group_multi_company\" role=\"img\"/>"
```
**After**:
```po
msgid "<strong>Save</strong> this page and come back here to set up the feature."
msgstr "<strong>Sačuvajte</strong> ovu stranicu i vratite se ovdje da postavite funkciju."
```
#### 4. Extra Blank Line Removal
**Location**: Line 405
**Problem**: Extra blank line causing malformed PO file syntax.
**Fix**: Removed the extra blank line to maintain proper PO file structure.
### Technical Details
**Root Cause**: The translation file contained entries where the msgstr (translation) content was copied from different entries, creating structural mismatches that caused Odoo's view parser to fail when processing `attrs` attributes.
**Error Symptoms**:
- `SyntaxError: unexpected character after line continuation character`
- `\"{'invisible':` parsing errors in Odoo logs
- View cache corruption issues
**Validation**:
- PO file now passes `msgfmt --check` validation
- All msgid/msgstr pairs maintain structural consistency
- HTML attributes and tags are properly preserved in translations
### Impact
- Resolves Odoo view parsing errors caused by malformed translation entries
- Ensures proper display of dynamic UI elements with visibility conditions
- Maintains consistency between English source and Bosnian translations
- Prevents view cache corruption issues
### Reason
Critical bug fix to ensure proper functioning of Odoo views with Bosnian language locale. The mismatched translations were causing system-wide view rendering failures.
### Future Translation Updates
**Important Workflow Note**:
For future updates to Bosnian translations (bs.po files), the proper workflow is:
1. **Update the master translation file**: `packages/TRANSLATION_BS.xlsx`
2. **Use translation scripts**: Run `scripts/translation_bs*` scripts to propagate changes
3. **Avoid direct .po file editing**: Direct editing of individual .po files should be avoided as it bypasses the centralized translation management system
This ensures consistency across all modules and prevents translation drift between the master Excel file and individual .po files.
**Translation Quality**: If any of the translations in this patch need improvement, they should be corrected in the next translation cycle using the proper workflow above.
### Ernad
packages/odoo-bringout-oca-ocb-base_setup/base_setup/i18n
Ovo ručno postaviti:
```
msgid ""
"<span class=\"o_form_label\" attrs=\"{'invisible':[('active_user_count', '&gt;', '1')]}\">\n"
" Active User\n"
" </span>\n"
" <span class=\"o_form_label\" attrs=\"{'invisible':[('active_user_count', '&lt;=', '1')]}\">\n"
" Active Users\n"
" </span>"
msgstr ""
"<span class=\"o_form_label\" attrs=\"{'invisible':[('active_user_count', '&gt;', '1')]}\">\n"
" Activni korisnik\n"
" </span>\n"
" <span class=\"o_form_label\" attrs=\"{'invisible':[('active_user_count', '&lt;=', '1')]}\">\n"
" Activni korisnici\n"
" </span>"
#. module: base_setup
#: model_terms:ir.ui.view,arch_db:base_setup.res_config_settings_view_form
msgid ""
"<span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&gt;', '1')]}\">\n"
" Company\n"
" </span>\n"
" <span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&lt;=', '1')]}\">\n"
" Companies\n"
" </span>\n"
" <br/>"
msgstr ""
"<span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&gt;', '1')]}\">\n"
" Preduzeće\n"
" </span>\n"
" <span class=\"o_form_label\" attrs=\"{'invisible':[('company_count', '&lt;=', '1')]}\">\n"
" Preduzeća\n"
" </span>\n"
" <br/>"
#. module: base_setup
#: model_terms:ir.ui.view,arch_db:base_setup.res_config_settings_view_form
msgid ""
"<span class=\"o_form_label\" attrs=\"{'invisible':[('language_count', '&gt;', '1')]}\">\n"
" language\n"
" </span>\n"
" <span class=\"o_form_label\" attrs=\"{'invisible':[('language_count', '&lt;=', '1')]}\">\n"
" languages\n"
" </span>"
msgstr ""
"<span class=\"o_form_label\" attrs=\"{'invisible':[('language_count', '&gt;', '1')]}\">\n"
" jezik\n"
" </span>\n"
" <span class=\"o_form_label\" attrs=\"{'invisible':[('language_count', '&lt;=', '1')]}\">\n"
" jezici\n"
" </span>"
```
---
**Patch Created:** 2025-08-27
**Applied By:** Claude Code Assistant
**Severity:** Critical - System functionality impact
**Note**: Emergency patch - future translation updates should follow proper workflow via TRANSLATION_BS.xlsx

View file

@ -0,0 +1,43 @@
# Patch: Remove App Store Download Links
## Module: base_setup
### Description
This patch removes mobile app store related translations from the base setup module, specifically removing Bosnian translations for "On Apple Store" and "On Google Play" strings.
### Files Modified
- `base_setup/i18n/bs.po`
### Changes Made
#### File: base_setup/i18n/bs.po
**Lines removed: 405-411**
Removed the following translation entries:
```po
#. module: base_setup
msgid "On Apple Store"
msgstr "U Apple storu"
#. module: base_setup
msgid "On Google Play"
msgstr "Upravljajte više pravnih lica sa odvojenim računovodstvom"
```
### Impact
- Bosnian translations for mobile app store references are no longer available
- The translations were referencing mobile app download links that are no longer used
- No functional impact on the base_setup module's core functionality
- Affects only the Bosnian (bs) language locale
### Notes
- These translation strings were originally intended for mobile app store download links
- The actual UI elements that would use these translations have been removed from other modules
- The "On Google Play" translation appeared to have an incorrect translation content
### Reason
Cleanup of unused translation strings related to proprietary mobile app store references that have been removed from the system.
---
**Patch Created:** 2025-08-27
**Applied By:** Claude Code Assistant

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/odoo_web_server.py --db-name mydb --addon base_setup
```

View file

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