Public release from ruodoo-project: 19.0 - 2026-05-10 21:19:01 UTC
This commit is contained in:
17
l10n_ru_base/README.md
Normal file
17
l10n_ru_base/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Российская локализация - Базовый
|
||||
name: l10n_ru_base
|
||||
|
||||
## Описание
|
||||
Российская локализация: основные отчеты и печатные формы. Это базовый модуль для работы с модулями локализации.
|
||||
|
||||
### Для включения модулей:
|
||||
1. Меню Настройки - в боковом меню "Российская локализация";
|
||||
2. Выбирается нужный блок для подключения дополнительных возможностей по локализации.
|
||||
|
||||
### Перечень модулей локализации:
|
||||
1. Российская локализация - Акт сверки (l10n_ru_act_rev)
|
||||
2. Российская локализация - Доверенность (l10n_ru_attorney)
|
||||
3. Российская локализация - Договоры (l10n_ru_contract)
|
||||
4. Российская локализация - Документы (l10n_ru_doc)
|
||||
5. Российская локализация - УПД в xml-формате (l10n_ru_upd_xml)
|
||||
6. Российская локализация - Авансовые платежи (l10n_ru_advance_payments)
|
||||
2
l10n_ru_base/__init__.py
Normal file
2
l10n_ru_base/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
from . import models
|
||||
|
||||
28
l10n_ru_base/__manifest__.py
Normal file
28
l10n_ru_base/__manifest__.py
Normal file
@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "Российская локализация - Базовый",
|
||||
'summary': """
|
||||
Российская локализация: основные отчеты и печатные формы.
|
||||
""",
|
||||
|
||||
'description': """
|
||||
Российская локализация: основные отчеты и печатные формы.
|
||||
|
||||
Для включения модулей:
|
||||
1. Меню Настройки - в боковом меню "Российская локализация"
|
||||
2. Выбирается нужный блок.
|
||||
""",
|
||||
|
||||
'author': "MK.Lab",
|
||||
'website': "https://www.inf-centre.ru/",
|
||||
|
||||
'version': '19.0.2025.11.11',
|
||||
'license': 'LGPL-3',
|
||||
'category': 'Uncategorized',
|
||||
|
||||
'depends': [],
|
||||
|
||||
'data': [
|
||||
'views/res_config_settings_views.xml',
|
||||
],
|
||||
}
|
||||
110
l10n_ru_base/i18n/ru_RU.po
Normal file
110
l10n_ru_base/i18n/ru_RU.po
Normal file
@ -0,0 +1,110 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * base_russian_localization
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 17.0+e-20240904\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-10-29 07:45+0000\n"
|
||||
"PO-Revision-Date: 2024-10-29 07:45+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: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_act_revise
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
#, python-format
|
||||
msgid "Act revise"
|
||||
msgstr "Акт сверки"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__company_status_rf
|
||||
msgid "Company Status Rf"
|
||||
msgstr "Статус компании"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model:ir.model,name:base_russian_localization.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Параметры конфигурации"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_fehu_base_consent
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
#, python-format
|
||||
msgid "Consent"
|
||||
msgstr "Доверенность"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_contract
|
||||
#, python-format
|
||||
msgid "Contract"
|
||||
msgstr "Договор"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Contracts"
|
||||
msgstr "Договоры"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Powers of attorney"
|
||||
msgstr "Доверенность на получение ТМЦ"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_l10n_ru_doc
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
#, python-format
|
||||
msgid "Print forms"
|
||||
msgstr "Печатные формы"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Report act revise"
|
||||
msgstr "Отчет Акт сверки"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Report contract"
|
||||
msgstr "Договоры"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Report report_xml"
|
||||
msgstr "УПД в формате xml для ЭДО"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_report_xml
|
||||
#, python-format
|
||||
msgid "Report_xml"
|
||||
msgstr "Универсальный передаточный документ (УПД) в формате xml для ЭДО"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Russian Localization"
|
||||
msgstr "Российская локализация"
|
||||
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "UPD xml"
|
||||
msgstr "УПД в формате xml для ЭДО"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "print_forms"
|
||||
msgstr "Печатные формы документов"
|
||||
4
l10n_ru_base/models/__init__.py
Normal file
4
l10n_ru_base/models/__init__.py
Normal file
@ -0,0 +1,4 @@
|
||||
from . import res_config_settings
|
||||
|
||||
|
||||
|
||||
44
l10n_ru_base/models/res_config_settings.py
Normal file
44
l10n_ru_base/models/res_config_settings.py
Normal file
@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
_FIELDS_MODUL = [
|
||||
'module_l10n_ru_act_rev',
|
||||
'module_l10n_ru_contract',
|
||||
'module_l10n_ru_upd_xml',
|
||||
'module_l10n_ru_doc',
|
||||
'module_l10n_ru_attorney',
|
||||
'module_l10n_ru_advance_payments'
|
||||
]
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
module_l10n_ru_act_rev = fields.Boolean(_("Act revise"))
|
||||
module_l10n_ru_contract = fields.Boolean(_("Contract"))
|
||||
module_l10n_ru_upd_xml = fields.Boolean(_("Report_xml"))
|
||||
module_l10n_ru_doc = fields.Boolean(_("Print forms"))
|
||||
module_l10n_ru_attorney = fields.Boolean(_("Consent"))
|
||||
module_l10n_ru_advance_payments = fields.Boolean(_("Advance payments"))
|
||||
|
||||
@api.model
|
||||
def write(self, values):
|
||||
company = self.env.company
|
||||
if company.country_id.code != 'RU':
|
||||
if any(field in values for field in _FIELDS_MODUL):
|
||||
raise UserError("Признак Российской компании не обнаружен!")
|
||||
if _FIELDS_MODUL:
|
||||
missing_modules = set()
|
||||
for field in _FIELDS_MODUL:
|
||||
if self.mapped(field)[0]:
|
||||
module_name = field[7:]
|
||||
module_installed = self.env['ir.module.module'].search([('name', '=', module_name)], limit=1)
|
||||
if not module_installed:
|
||||
missing_modules.add(module_name)
|
||||
if missing_modules:
|
||||
message = "Обратитесь в тех.поддержку для получения лицензии для следующих модулей:\n" + \
|
||||
"\n".join(missing_modules)
|
||||
raise UserError(message)
|
||||
return super(ResConfigSettings, self).write(values)
|
||||
BIN
l10n_ru_base/static/description/icon.png
Normal file
BIN
l10n_ru_base/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
66
l10n_ru_base/views/res_config_settings_views.xml
Normal file
66
l10n_ru_base/views/res_config_settings_views.xml
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.russian.localization</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="5"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form" position="inside">
|
||||
<app string="Российская локализация" name="l10n_ru_base" img="/l10n_ru_base/static/description/icon.png">
|
||||
|
||||
<block title="Акт сверки" name="act_revise_setting_container">
|
||||
<setting id="act_revise"
|
||||
string="Акт сверки"
|
||||
help="Отчет «Акт сверки»">
|
||||
<field name="module_l10n_ru_act_rev"/>
|
||||
</setting>
|
||||
</block>
|
||||
|
||||
<block title="Договоры" name="contract_setting_container">
|
||||
<setting id="contract"
|
||||
string="Договоры"
|
||||
help="Отчеты по договорам">
|
||||
<field name="module_l10n_ru_contract"/>
|
||||
</setting>
|
||||
</block>
|
||||
|
||||
<block title="УПД (XML)" name="upd_xml_setting_container">
|
||||
<setting id="report_xml"
|
||||
string="УПД в формате XML"
|
||||
help="Формирование УПД для ЭДО">
|
||||
<field name="module_l10n_ru_upd_xml"/>
|
||||
</setting>
|
||||
</block>
|
||||
|
||||
<block title="Печатные формы" name="print_forms_setting_container">
|
||||
<setting id="print_forms"
|
||||
string="Печатные формы"
|
||||
help="Печатные формы документов">
|
||||
<field name="module_l10n_ru_doc"/>
|
||||
</setting>
|
||||
</block>
|
||||
|
||||
<block title="Доверенности" name="powers_attorney_setting_container">
|
||||
<setting id="powers_attorney"
|
||||
string="Доверенности"
|
||||
help="Доверенности на получение ТМЦ">
|
||||
<field name="module_l10n_ru_attorney"/>
|
||||
</setting>
|
||||
</block>
|
||||
|
||||
<block title="Авансовые платежи" name="advance_payments_setting_container">
|
||||
<setting id="advance_payments"
|
||||
string="Авансовые платежи"
|
||||
help="Учет авансовых платежей">
|
||||
<field name="module_l10n_ru_advance_payments"/>
|
||||
</setting>
|
||||
</block>
|
||||
|
||||
</app>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user