squashed commit

This commit is contained in:
hoangvv
2026-09-18 13:55:25 +07:00
commit 039c98d4d0
45882 changed files with 24235585 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
+20
View File
@@ -0,0 +1,20 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Bulgaria - Report ledger',
'icon': '/account/static/description/l10n.png',
'countries': ['bg'],
'version': '1.0',
'category': 'Accounting/Localizations/Account Charts',
'description': """
Report ledger for Bulgaria
""",
'depends': [
'l10n_bg'
],
'data': [
'views/account_journal_views.xml',
'views/account_move_views.xml',
],
'auto_install': True,
'license': 'LGPL-3',
}
+106
View File
@@ -0,0 +1,106 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_bg_ledger
#
# Weblate <noreply-mt-weblate@weblate.org>, 2025.
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-03 15:39+0000\n"
"PO-Revision-Date: 2025-11-07 19:10+0000\n"
"Last-Translator: Weblate <noreply-mt-weblate@weblate.org>\n"
"Language-Team: Bulgarian <https://translate.odoo.com/projects/odoo-18-l10n/"
"l10n_bg_ledger/bg/>\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.12.2\n"
#. module: l10n_bg_ledger
#: model:ir.model.fields.selection,name:l10n_bg_ledger.selection__account_move__l10n_bg_exemption_reason__01
msgid "01 - A delivery under Part 1 of Appendix 2 of LVAT"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields.selection,name:l10n_bg_ledger.selection__account_move__l10n_bg_exemption_reason__02
msgid "02 - A delivery under Part 2 of Appendix 2 of LVAT"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields.selection,name:l10n_bg_ledger.selection__account_move__l10n_bg_exemption_reason__03
msgid "03 - Import under Appendix 3 of VAT act"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_form
msgid "Bulgaria VAT Document"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_journal_view_form
msgid "Bulgaria VAT Document Types"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_journal__l10n_bg_credit_notes
msgid "Credit Notes"
msgstr "Кредитни бележки"
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_journal__l10n_bg_customer_invoice
msgid "Customer Invoices"
msgstr "Фактури за продажби"
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_journal__l10n_bg_debit_notes
msgid "Debit Notes"
msgstr "Дебитни известия"
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_form
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_tree
msgid "Document Number"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_bank_statement_line__l10n_bg_document_number
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_move__l10n_bg_document_number
msgid "Document Number (BG)"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_filter
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_form
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_tree
msgid "Document Type"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_bank_statement_line__l10n_bg_document_type
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_move__l10n_bg_document_type
msgid "Document Type (BG)"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_form
msgid "Exemption reason"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_bank_statement_line__l10n_bg_exemption_reason
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_move__l10n_bg_exemption_reason
msgid "Exemption reason (BG)"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model,name:l10n_bg_ledger.model_account_journal
msgid "Journal"
msgstr "Дневник"
#. module: l10n_bg_ledger
#: model:ir.model,name:l10n_bg_ledger.model_account_move
msgid "Journal Entry"
msgstr "Записи в Дневника"
@@ -0,0 +1,102 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_bg_ledger
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-03 15:39+0000\n"
"PO-Revision-Date: 2025-11-03 15:39+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_bg_ledger
#: model:ir.model.fields.selection,name:l10n_bg_ledger.selection__account_move__l10n_bg_exemption_reason__01
msgid "01 - A delivery under Part 1 of Appendix 2 of LVAT"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields.selection,name:l10n_bg_ledger.selection__account_move__l10n_bg_exemption_reason__02
msgid "02 - A delivery under Part 2 of Appendix 2 of LVAT"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields.selection,name:l10n_bg_ledger.selection__account_move__l10n_bg_exemption_reason__03
msgid "03 - Import under Appendix 3 of VAT act"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_form
msgid "Bulgaria VAT Document"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_journal_view_form
msgid "Bulgaria VAT Document Types"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_journal__l10n_bg_credit_notes
msgid "Credit Notes"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_journal__l10n_bg_customer_invoice
msgid "Customer Invoices"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_journal__l10n_bg_debit_notes
msgid "Debit Notes"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_form
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_tree
msgid "Document Number"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_bank_statement_line__l10n_bg_document_number
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_move__l10n_bg_document_number
msgid "Document Number (BG)"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_filter
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_form
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_tree
msgid "Document Type"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_bank_statement_line__l10n_bg_document_type
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_move__l10n_bg_document_type
msgid "Document Type (BG)"
msgstr ""
#. module: l10n_bg_ledger
#: model_terms:ir.ui.view,arch_db:l10n_bg_ledger.l10n_bg_move_view_form
msgid "Exemption reason"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_bank_statement_line__l10n_bg_exemption_reason
#: model:ir.model.fields,field_description:l10n_bg_ledger.field_account_move__l10n_bg_exemption_reason
msgid "Exemption reason (BG)"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model,name:l10n_bg_ledger.model_account_journal
msgid "Journal"
msgstr ""
#. module: l10n_bg_ledger
#: model:ir.model,name:l10n_bg_ledger.model_account_move
msgid "Journal Entry"
msgstr ""
+3
View File
@@ -0,0 +1,3 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import account_move
from . import account_journal
@@ -0,0 +1,26 @@
from odoo import fields, models
class AccountJournal(models.Model):
_inherit = 'account.journal'
l10n_bg_customer_invoice = fields.Selection(string="Customer Invoices", selection='_l10n_bg_document_type_selection_values', default='01')
l10n_bg_credit_notes = fields.Selection(string="Credit Notes", selection='_l10n_bg_document_type_selection_values', default='03')
l10n_bg_debit_notes = fields.Selection(string="Debit Notes", selection='_l10n_bg_document_type_selection_values', default='02')
def _l10n_bg_document_type_selection_values(self):
return [
('01', '01 - Invoice'),
('02', '02 - Debit notice'),
('03', '03 - Credit notice'),
('07', '07 - Customs declaration'),
('09', '09 - Protocol or another document'),
('11', '11 - Invoice - cash account'),
('12', '12 - Debit notification - cash account'),
('13', '13 - Credit notification - cash account'),
('81', '81 - Report for the sales carried out'),
('82', '82 - Report for the sales carried out by a special levying procedure'),
('91', '91 - Protocol of due tax under Art. 151c, Para 3 of the Act'),
('93', '93 - Protocol of due tax under Art. 151c, Para 7 of the Act with a recipient being a person not applying the special regime'),
('94', '94 - Protocol of due tax under Art. 151c, Para 7 of the Act with a recipient being a person applying the special regime'),
]
@@ -0,0 +1,58 @@
from odoo import api, fields, models
class AccountMove(models.Model):
_inherit = "account.move"
l10n_bg_document_type = fields.Selection(
string="Document Type (BG)",
selection='_l10n_bg_document_type_selection_values',
compute='_compute_l10n_bg_document_type',
readonly=False,
store=True,
copy=False,
)
l10n_bg_document_number = fields.Char(string="Document Number (BG)", compute='_compute_l10n_bg_document_number')
l10n_bg_exemption_reason = fields.Selection(string="Exemption reason (BG)", selection=[
('01', '01 - A delivery under Part 1 of Appendix 2 of LVAT'),
('02', '02 - A delivery under Part 2 of Appendix 2 of LVAT'),
('03', '03 - Import under Appendix 3 of VAT act'),
])
def _l10n_bg_document_type_selection_values(self):
return [
('01', '01 - Invoice'),
('02', '02 - Debit notice'),
('03', '03 - Credit notice'),
('07', '07 - Customs declaration'),
('09', '09 - Protocol or another document'),
('11', '11 - Invoice - cash account'),
('12', '12 - Debit notification - cash account'),
('13', '13 - Credit notification - cash account'),
('81', '81 - Report for the sales carried out'),
('82', '82 - Report for the sales carried out by a special levying procedure'),
('91', '91 - Protocol of due tax under Art. 151c, Para 3 of the Act'),
('93', '93 - Protocol of due tax under Art. 151c, Para 7 of the Act with a recipient being a person not applying the special regime'),
('94', '94 - Protocol of due tax under Art. 151c, Para 7 of the Act with a recipient being a person applying the special regime'),
]
@api.depends('journal_id', 'move_type')
def _compute_l10n_bg_document_type(self):
for move in self:
if move.journal_id:
if 'debit_origin_id' in self._fields and move.debit_origin_id:
move.l10n_bg_document_type = move.journal_id.l10n_bg_debit_notes
elif move.move_type in ('out_invoice', 'in_invoice'):
move.l10n_bg_document_type = move.journal_id.l10n_bg_customer_invoice
elif move.move_type in ('in_refund', 'out_refund'):
move.l10n_bg_document_type = move.journal_id.l10n_bg_credit_notes
@api.depends('l10n_bg_document_type', 'move_type', 'state', 'ref', 'name')
def _compute_l10n_bg_document_number(self):
for move in self:
if move.state == 'draft':
move.l10n_bg_document_number = ""
elif move.is_sale_document(include_receipts=True):
move.l10n_bg_document_number = move.name
else:
move.l10n_bg_document_number = move.ref
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="l10n_bg_journal_view_form" model="ir.ui.view">
<field name="name">l10n_bg.journal.view.form</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='bank_account_number']" position="before">
<group string="Bulgaria VAT Document Types" invisible="type not in ('sale', 'purchase')">
<field name="l10n_bg_customer_invoice"/>
<field name="l10n_bg_credit_notes"/>
<field name="l10n_bg_debit_notes"/>
</group>
</xpath>
</field>
</record>
</odoo>
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="l10n_bg_move_view_form" model="ir.ui.view">
<field name="name">l10n_bg.move.view.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='sale_info_group']" position="after">
<group string="Bulgaria VAT Document" name="l10n_bg_documents">
<field string="Document Type" name="l10n_bg_document_type"/>
<field string="Document Number" name="l10n_bg_document_number"/>
<field string="Exemption reason" name="l10n_bg_exemption_reason"/>
</group>
</xpath>
</field>
</record>
<record id="l10n_bg_move_view_tree" model="ir.ui.view">
<field name="name">l10n_bg.move.view.tree</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_invoice_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field string="Document Number" name="l10n_bg_document_number" optional="show"/>
<field string="Document Type" name="l10n_bg_document_type" optional="show"/>
</xpath>
</field>
</record>
<record id="l10n_bg_move_view_filter" model="ir.ui.view">
<field name="name">l10n_bg.move.view.filter</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='group_by_company']" position="after">
<filter string="Document Type" name="l10n_bg_document_type_groupby" context="{'group_by': 'l10n_bg_document_type'}"/>
</xpath>
</field>
</record>
</odoo>