Browse Source

Nov 8 [ADD] Initial Commit 'base_accounting_kit'

pull/313/head
AjmalCybro 1 year ago
parent
commit
af8691a7aa
  1. 46
      base_account_budget/README.rst
  2. 22
      base_account_budget/__init__.py
  3. 50
      base_account_budget/__manifest__.py
  4. 7
      base_account_budget/doc/RELEASE_NOTES.md
  5. 410
      base_account_budget/i18n/zh_CN.po
  6. 23
      base_account_budget/models/__init__.py
  7. 32
      base_account_budget/models/account_analytic_account.py
  8. 187
      base_account_budget/models/account_budget.py
  9. 31
      base_account_budget/security/account_budget_security.xml
  10. 7
      base_account_budget/security/ir.model.access.csv
  11. BIN
      base_account_budget/static/description/assets/icons/capture (1).png
  12. BIN
      base_account_budget/static/description/assets/icons/check.png
  13. BIN
      base_account_budget/static/description/assets/icons/chevron.png
  14. BIN
      base_account_budget/static/description/assets/icons/cogs.png
  15. BIN
      base_account_budget/static/description/assets/icons/consultation.png
  16. BIN
      base_account_budget/static/description/assets/icons/ecom-black.png
  17. BIN
      base_account_budget/static/description/assets/icons/education-black.png
  18. BIN
      base_account_budget/static/description/assets/icons/hotel-black.png
  19. BIN
      base_account_budget/static/description/assets/icons/img.png
  20. BIN
      base_account_budget/static/description/assets/icons/license.png
  21. BIN
      base_account_budget/static/description/assets/icons/lifebuoy.png
  22. BIN
      base_account_budget/static/description/assets/icons/manufacturing-black.png
  23. BIN
      base_account_budget/static/description/assets/icons/photo-capture.png
  24. BIN
      base_account_budget/static/description/assets/icons/pos-black.png
  25. BIN
      base_account_budget/static/description/assets/icons/puzzle.png
  26. BIN
      base_account_budget/static/description/assets/icons/restaurant-black.png
  27. BIN
      base_account_budget/static/description/assets/icons/service-black.png
  28. BIN
      base_account_budget/static/description/assets/icons/trading-black.png
  29. BIN
      base_account_budget/static/description/assets/icons/training.png
  30. BIN
      base_account_budget/static/description/assets/icons/update.png
  31. BIN
      base_account_budget/static/description/assets/icons/user.png
  32. BIN
      base_account_budget/static/description/assets/icons/wrench.png
  33. BIN
      base_account_budget/static/description/assets/misc/Cybrosys R.png
  34. 33
      base_account_budget/static/description/assets/misc/email.svg
  35. 3
      base_account_budget/static/description/assets/misc/phone.svg
  36. 9
      base_account_budget/static/description/assets/misc/star (1) 2.svg
  37. 9
      base_account_budget/static/description/assets/misc/support (1) 1.svg
  38. 6
      base_account_budget/static/description/assets/misc/support-email.svg
  39. 17
      base_account_budget/static/description/assets/misc/tick-mark.svg
  40. 9
      base_account_budget/static/description/assets/misc/whatsapp 1.svg
  41. 33
      base_account_budget/static/description/assets/misc/whatsapp.svg
  42. BIN
      base_account_budget/static/description/assets/modules/1.png
  43. BIN
      base_account_budget/static/description/assets/modules/2.png
  44. BIN
      base_account_budget/static/description/assets/modules/3.png
  45. BIN
      base_account_budget/static/description/assets/modules/4.png
  46. BIN
      base_account_budget/static/description/assets/modules/5.png
  47. BIN
      base_account_budget/static/description/assets/modules/6.png
  48. BIN
      base_account_budget/static/description/assets/screenshots/budget_1.png
  49. BIN
      base_account_budget/static/description/assets/screenshots/budget_2.png
  50. BIN
      base_account_budget/static/description/assets/screenshots/budget_3.png
  51. BIN
      base_account_budget/static/description/assets/screenshots/budget_4.png
  52. BIN
      base_account_budget/static/description/assets/screenshots/budget_5.png
  53. BIN
      base_account_budget/static/description/assets/screenshots/budget_6.png
  54. BIN
      base_account_budget/static/description/assets/screenshots/hero.gif
  55. BIN
      base_account_budget/static/description/banner.jpg
  56. BIN
      base_account_budget/static/description/icon.png
  57. 670
      base_account_budget/static/description/index.html
  58. 47
      base_account_budget/views/account_analytic_account_views.xml
  59. 353
      base_account_budget/views/account_budget_views.xml
  60. 46
      base_accounting_kit/README.rst
  61. 24
      base_accounting_kit/__init__.py
  62. 98
      base_accounting_kit/__manifest__.py
  63. 151
      base_accounting_kit/data/account_financial_report_data.xml
  64. 24
      base_accounting_kit/data/account_pdc_data.xml
  65. 77
      base_accounting_kit/data/cash_flow_data.xml
  66. 13
      base_accounting_kit/data/followup_levels.xml
  67. 9
      base_accounting_kit/data/multiple_invoice_data.xml
  68. 16
      base_accounting_kit/data/recurring_entry_cron.xml
  69. 7
      base_accounting_kit/doc/RELEASE_NOTES.md
  70. 4132
      base_accounting_kit/i18n/ar_001.po
  71. 4132
      base_accounting_kit/i18n/de_CH.po
  72. 4132
      base_accounting_kit/i18n/es_AR.po
  73. 4132
      base_accounting_kit/i18n/fr_BE.po
  74. 4132
      base_accounting_kit/i18n/uk_UA.po
  75. 4171
      base_accounting_kit/i18n/zh_CN.po
  76. 4130
      base_accounting_kit/i18n/zh_HK.po
  77. 37
      base_accounting_kit/models/__init__.py
  78. 169
      base_accounting_kit/models/account_account.py
  79. 813
      base_accounting_kit/models/account_asset.py
  80. 51
      base_accounting_kit/models/account_followup.py
  81. 89
      base_accounting_kit/models/account_journal.py
  82. 266
      base_accounting_kit/models/account_move.py
  83. 213
      base_accounting_kit/models/account_payment.py
  84. 160
      base_accounting_kit/models/credit_limit.py
  85. 63
      base_accounting_kit/models/multiple_invoice.py
  86. 159
      base_accounting_kit/models/multiple_invoice_layout.py
  87. 38
      base_accounting_kit/models/product_template.py
  88. 180
      base_accounting_kit/models/recurring_payments.py
  89. 74
      base_accounting_kit/models/res_company.py
  90. 47
      base_accounting_kit/models/res_config_settings.py
  91. 113
      base_accounting_kit/models/res_partner.py
  92. 35
      base_accounting_kit/report/__init__.py
  93. 86
      base_accounting_kit/report/account_asset_report.py
  94. 77
      base_accounting_kit/report/account_asset_report_views.xml
  95. 176
      base_accounting_kit/report/account_bank_book.py
  96. 134
      base_accounting_kit/report/account_bank_book_view.xml
  97. 167
      base_accounting_kit/report/account_cash_book.py
  98. 108
      base_accounting_kit/report/account_cash_book_view.xml
  99. 125
      base_accounting_kit/report/account_day_book.py
  100. 115
      base_accounting_kit/report/account_day_book_view.xml

46
base_account_budget/README.rst

@ -0,0 +1,46 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Budget Management
=================
Budgets Management system for Odoo 17 Community edition.
Configuration
=============
No configuration
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
General Public License, Version 3 (LGPL v3).
(http://www.gnu.org/licenses/lgpl-3.0-standalone.html)
Credits
-------
Developer: (V17) Risvana A R , Contact: odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

22
base_account_budget/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models

50
base_account_budget/__manifest__.py

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Budget Management',
'version': '17.0.1.0.0',
'category': 'Accounting',
'summary': """ Budget Management for Odoo 17 Community Edition. """,
'description': """ This module allows accountants to manage analytic and
budgets. Once the Budgets are defined (in Accounting/Accounting/Budgets),
the Project Managers can set the planned amount on each Analytic Account.
The accountant has the possibility to see the total of amount planned for
each Budget in order to ensure the total planned is not greater/lower
than what he planned for this Budget. Each list of record can also be
switched to a graphical view of it.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['base', 'account'],
'data': [
'security/account_budget_security.xml',
'security/ir.model.access.csv',
'views/account_analytic_account_views.xml',
'views/account_budget_views.xml',
],
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

7
base_account_budget/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <base_account_budget>
#### 07.11.2023
#### Version 17.0.1.0.0
#### ADD
- Initial commit for Budget Management

410
base_account_budget/i18n/zh_CN.po

@ -0,0 +1,410 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_account_budget
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-09 10:32+0000\n"
"PO-Revision-Date: 2022-03-10 08:50+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: zh_CN\n"
"X-Generator: Poedit 2.2\n"
#. module: base_account_budget
#: model_terms:ir.actions.act_window,help:base_account_budget.act_budget_view
msgid ""
"A budget is a forecast of your company's income and/or expenses\n"
" expected for a period in the future. A budget is defined on some\n"
" financial accounts and/or analytic accounts (that may represent\n"
" projects, departments, categories of products, etc.)"
msgstr ""
"预算是对公司收入和/或支出的预测\n"
"预计在未来一段时间内。预算是在某些时间定义的\n"
"金融账户和/或分析账户(可能代表\n"
"项目、部门、产品类别等)"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__account_ids
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_budget_post_form
msgid "Accounts"
msgstr "科目"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__percentage
msgid "Achievement"
msgstr "达成"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_needaction
msgid "Action Needed"
msgstr "需要采取的行动"
#. module: base_account_budget
#: model:ir.model,name:base_account_budget.model_account_analytic_account
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__analytic_account_id
msgid "Analytic Account"
msgstr "辅助核算"
#. module: base_account_budget
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Approve"
msgstr "批准"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_attachment_count
msgid "Attachment Count"
msgstr "附件数量"
#. module: base_account_budget
#: model:ir.model,name:base_account_budget.model_budget_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__budget_id
#: model_terms:ir.ui.view,arch_db:base_account_budget.budget_budget_view_tree
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Budget"
msgstr "预算"
#. module: base_account_budget
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_account_analytic_account_form_inherit_budget
msgid "Budget Items"
msgstr "预算项目"
#. module: base_account_budget
#: model:ir.model,name:base_account_budget.model_budget_lines
msgid "Budget Line"
msgstr "预算明细"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_analytic_account__budget_line
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__budget_line
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__budget_line
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_budget_line_form
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_budget_line_search
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_budget_line_tree
msgid "Budget Lines"
msgstr "预算明细"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__name
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Budget Name"
msgstr "预算名称"
#. module: base_account_budget
#: model:ir.model,name:base_account_budget.model_account_budget_post
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__general_budget_id
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_budget_post_form
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_budget_post_search
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_budget_post_tree
msgid "Budgetary Position"
msgstr "预算状况"
#. module: base_account_budget
#: model:ir.actions.act_window,name:base_account_budget.open_budget_post_form
#: model:ir.ui.menu,name:base_account_budget.menu_budget_post_form
msgid "Budgetary Positions"
msgstr "预算状况"
#. module: base_account_budget
#: model:ir.actions.act_window,name:base_account_budget.act_budget_lines_view
#: model:ir.actions.act_window,name:base_account_budget.act_budget_view
#: model:ir.ui.menu,name:base_account_budget.menu_act_budget_view
#: model:ir.ui.menu,name:base_account_budget.menu_act_crossovered_budget_lines_view
msgid "Budgets"
msgstr "预算"
#. module: base_account_budget
#: model_terms:ir.actions.act_window,help:base_account_budget.act_budget_view
msgid ""
"By keeping track of where your money goes, you may be less\n"
" likely to overspend, and more likely to meet your financial\n"
" goals. Forecast a budget by detailing the expected revenue per\n"
" analytic account and monitor its evolution based on the actuals\n"
" realised during that period."
msgstr ""
"通过跟踪资金流向,您可能会减少\n"
"可能会超支,更可能满足您的财务要求\n"
"目标。通过详细说明每个月的预期收入来预测预算\n"
"分析帐户并根据实际情况监控调整以达到预算目的。"
#. module: base_account_budget
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Cancel Budget"
msgstr "取消预算"
#. module: base_account_budget
#: model:ir.model.fields.selection,name:base_account_budget.selection__budget_budget__state__cancel
msgid "Cancelled"
msgstr "已取消"
#. module: base_account_budget
#: model_terms:ir.actions.act_window,help:base_account_budget.act_budget_view
msgid "Click to create a new budget."
msgstr "单击以创建新预算"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__company_id
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__company_id
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__company_id
msgid "Company"
msgstr "公司"
#. module: base_account_budget
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Confirm"
msgstr "审核"
#. module: base_account_budget
#: model:ir.model.fields.selection,name:base_account_budget.selection__budget_budget__state__confirm
msgid "Confirmed"
msgstr "已审核"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__create_uid
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__create_uid
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__create_uid
msgid "Created by"
msgstr "创建人"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__create_date
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__create_date
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__create_date
msgid "Created on"
msgstr "创建于"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_analytic_account__display_name
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__display_name
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__display_name
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__display_name
msgid "Display Name"
msgstr "显示名称"
#. module: base_account_budget
#: model:ir.model.fields.selection,name:base_account_budget.selection__budget_budget__state__done
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Done"
msgstr "完成"
#. module: base_account_budget
#: model:ir.model.fields.selection,name:base_account_budget.selection__budget_budget__state__draft
msgid "Draft"
msgstr "草稿"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__date_to
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__date_to
msgid "End Date"
msgstr "结束时间"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_follower_ids
msgid "Followers"
msgstr "相关人员"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_channel_ids
msgid "Followers (Channels)"
msgstr "相关人员(频道)"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_partner_ids
msgid "Followers (Partners)"
msgstr "相关人员(业务伙伴)"
#. module: base_account_budget
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "From"
msgstr "来自"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_analytic_account__id
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__id
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__id
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__id
msgid "ID"
msgstr "ID"
#. module: base_account_budget
#: model:ir.model.fields,help:base_account_budget.field_budget_budget__message_needaction
#: model:ir.model.fields,help:base_account_budget.field_budget_budget__message_unread
msgid "If checked, new messages require your attention."
msgstr "确认后, 将会提示消息。"
#. module: base_account_budget
#: model:ir.model.fields,help:base_account_budget.field_budget_budget__message_has_error
#: model:ir.model.fields,help:base_account_budget.field_budget_budget__message_has_sms_error
msgid "If checked, some messages have a delivery error."
msgstr "如果勾选此项, 某些消息将会产生传递错误。"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_is_follower
msgid "Is Follower"
msgstr "是否相关人员"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_analytic_account____last_update
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post____last_update
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget____last_update
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines____last_update
msgid "Last Modified on"
msgstr "最后修改日"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__write_uid
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__write_uid
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__write_uid
msgid "Last Updated by"
msgstr "最后更新人"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__write_date
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__write_date
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__write_date
msgid "Last Updated on"
msgstr "最后更新日期"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_main_attachment_id
msgid "Main Attachment"
msgstr "主要附件"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_has_error
msgid "Message Delivery error"
msgstr "消息传递错误"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_ids
msgid "Messages"
msgstr "消息"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_account_budget_post__name
msgid "Name"
msgstr "名称"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_needaction_counter
msgid "Number of Actions"
msgstr "执行次数"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_has_error_counter
msgid "Number of errors"
msgstr "错误数"
#. module: base_account_budget
#: model:ir.model.fields,help:base_account_budget.field_budget_budget__message_needaction_counter
msgid "Number of messages which requires an action"
msgstr "需要处理的消息数量"
#. module: base_account_budget
#: model:ir.model.fields,help:base_account_budget.field_budget_budget__message_has_error_counter
msgid "Number of messages with delivery error"
msgstr "发送错误的消息数量"
#. module: base_account_budget
#: model:ir.model.fields,help:base_account_budget.field_budget_budget__message_unread_counter
msgid "Number of unread messages"
msgstr "未读消息数"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__paid_date
msgid "Paid Date"
msgstr "付款日期"
#. module: base_account_budget
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Period"
msgstr "期间"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__planned_amount
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Planned Amount"
msgstr "预算金额"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__practical_amount
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_account_analytic_account_form_inherit_budget
msgid "Practical Amount"
msgstr "实际金额"
#. module: base_account_budget
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "Reset to Draft"
msgstr "重置为草稿"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__creating_user_id
msgid "Responsible"
msgstr "负责人"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_has_sms_error
msgid "SMS Delivery error"
msgstr "短信发送错误"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__date_from
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__date_from
msgid "Start Date"
msgstr "开始日期"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__state
msgid "Status"
msgstr "状态"
#. module: base_account_budget
#: code:addons/base_account_budget/models/account_budget.py:0
#, python-format
msgid "The budget must have at least one account."
msgstr "此预算必须至少需要有一个账户"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_lines__theoretical_amount
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
#: model_terms:ir.ui.view,arch_db:base_account_budget.view_account_analytic_account_form_inherit_budget
msgid "Theoretical Amount"
msgstr "理论金额"
#. module: base_account_budget
#: model_terms:ir.ui.view,arch_db:base_account_budget.crossovered_budget_view_form
msgid "To"
msgstr "按"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_unread
msgid "Unread Messages"
msgstr "未读邮件"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__message_unread_counter
msgid "Unread Messages Counter"
msgstr "未读邮件计数器"
#. module: base_account_budget
#: model:ir.model.fields.selection,name:base_account_budget.selection__budget_budget__state__validate
msgid "Validated"
msgstr "已验证"
#. module: base_account_budget
#: model:ir.model.fields,field_description:base_account_budget.field_budget_budget__website_message_ids
msgid "Website Messages"
msgstr "网站消息"
#. module: base_account_budget
#: model:ir.model.fields,help:base_account_budget.field_budget_budget__website_message_ids
msgid "Website communication history"
msgstr "网站浏览历史"

23
base_account_budget/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import account_budget
from . import account_analytic_account

32
base_account_budget/models/account_analytic_account.py

@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class AccountAnalyticAccount(models.Model):
"""Inherits the AccountAnalytic model to add new budget line field that
connect with the budget line modules"""
_inherit = "account.analytic.account"
budget_line = fields.One2many('budget.lines',
'analytic_account_id',
'Budget Lines')

187
base_account_budget/models/account_budget.py

@ -0,0 +1,187 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class AccountBudgetPost(models.Model):
"""Model used to create the Budgetary Position for the account"""
_name = "account.budget.post"
_order = "name"
_description = "Budgetary Position"
name = fields.Char('Name', required=True)
account_ids = fields.Many2many('account.account', 'account_budget_rel', 'budget_id', 'account_id', 'Accounts',
domain=[('deprecated', '=', False)])
budget_line = fields.One2many('budget.lines', 'general_budget_id', 'Budget Lines')
company_id = fields.Many2one('res.company', 'Company', required=True,
default=lambda self: self.env['res.company']._company_default_get(
'account.budget.post'))
def _check_account_ids(self, vals):
if 'account_ids' in vals:
account_ids = vals['account_ids']
else:
account_ids = self.account_ids
if not account_ids:
raise ValidationError(_('The budget must have at least one account.'))
@api.model
def create(self, vals):
self._check_account_ids(vals)
return super(AccountBudgetPost, self).create(vals)
def write(self, vals):
self._check_account_ids(vals)
return super(AccountBudgetPost, self).write(vals)
class Budget(models.Model):
_name = "budget.budget"
_description = "Budget"
_inherit = ['mail.thread']
name = fields.Char('Budget Name', required=True, states={'done': [('readonly', True)]})
creating_user_id = fields.Many2one('res.users', 'Responsible', default=lambda self: self.env.user)
date_from = fields.Date('Start Date', required=True, states={'done': [('readonly', True)]})
date_to = fields.Date('End Date', required=True, states={'done': [('readonly', True)]})
state = fields.Selection([
('draft', 'Draft'),
('cancel', 'Cancelled'),
('confirm', 'Confirmed'),
('validate', 'Validated'),
('done', 'Done')
], 'Status', default='draft', index=True, required=True, readonly=True, copy=False, track_visibility='always')
budget_line = fields.One2many('budget.lines', 'budget_id', 'Budget Lines',
states={'done': [('readonly', True)]}, copy=True)
company_id = fields.Many2one('res.company', 'Company', required=True,
default=lambda self: self.env['res.company']._company_default_get(
'account.budget.post'))
def action_budget_confirm(self):
self.write({'state': 'confirm'})
def action_budget_draft(self):
self.write({'state': 'draft'})
def action_budget_validate(self):
self.write({'state': 'validate'})
def action_budget_cancel(self):
self.write({'state': 'cancel'})
def action_budget_done(self):
self.write({'state': 'done'})
class BudgetLines(models.Model):
_name = "budget.lines"
_rec_name = "budget_id"
_description = "Budget Line"
budget_id = fields.Many2one('budget.budget', 'Budget', ondelete='cascade', index=True, required=True)
analytic_account_id = fields.Many2one('account.analytic.account', 'Analytic Account')
general_budget_id = fields.Many2one('account.budget.post', 'Budgetary Position', required=True)
date_from = fields.Date('Start Date', required=True)
date_to = fields.Date('End Date', required=True)
paid_date = fields.Date('Paid Date')
planned_amount = fields.Float('Planned Amount', required=True, digits=0)
practical_amount = fields.Float(compute='_compute_practical_amount', string='Practical Amount', digits=0)
theoretical_amount = fields.Float(compute='_compute_theoretical_amount', string='Theoretical Amount', digits=0)
percentage = fields.Float(compute='_compute_percentage', string='Achievement')
company_id = fields.Many2one(related='budget_id.company_id', comodel_name='res.company',
string='Company', store=True, readonly=True)
def _compute_practical_amount(self):
for line in self:
result = 0.0
acc_ids = line.general_budget_id.account_ids.ids
date_to = self.env.context.get('wizard_date_to') or line.date_to
date_from = self.env.context.get('wizard_date_from') or line.date_from
if line.analytic_account_id.id:
self.env.cr.execute("""
SELECT SUM(amount)
FROM account_analytic_line
WHERE account_id=%s
AND date between %s AND %s
AND general_account_id=ANY(%s)""",
(line.analytic_account_id.id, date_from, date_to, acc_ids,))
result = self.env.cr.fetchone()[0] or 0.0
line.practical_amount = result
def _compute_theoretical_amount(self):
today = fields.Datetime.now()
for line in self:
# Used for the report
if self.env.context.get('wizard_date_from') and self.env.context.get('wizard_date_to'):
date_from = fields.Datetime.from_string(self.env.context.get('wizard_date_from'))
date_to = fields.Datetime.from_string(self.env.context.get('wizard_date_to'))
if date_from < fields.Datetime.from_string(line.date_from):
date_from = fields.Datetime.from_string(line.date_from)
elif date_from > fields.Datetime.from_string(line.date_to):
date_from = False
if date_to > fields.Datetime.from_string(line.date_to):
date_to = fields.Datetime.from_string(line.date_to)
elif date_to < fields.Datetime.from_string(line.date_from):
date_to = False
theo_amt = 0.00
if date_from and date_to:
line_timedelta = fields.Datetime.from_string(line.date_to) - fields.Datetime.from_string(
line.date_from)
elapsed_timedelta = date_to - date_from
if elapsed_timedelta.days > 0:
theo_amt = (
elapsed_timedelta.total_seconds() / line_timedelta.total_seconds()) * line.planned_amount
else:
if line.paid_date:
if fields.Datetime.from_string(line.date_to) <= fields.Datetime.from_string(line.paid_date):
theo_amt = 0.00
else:
theo_amt = line.planned_amount
else:
line_timedelta = fields.Datetime.from_string(line.date_to) - fields.Datetime.from_string(
line.date_from)
elapsed_timedelta = fields.Datetime.from_string(today) - (
fields.Datetime.from_string(line.date_from))
if elapsed_timedelta.days < 0:
# If the budget line has not started yet, theoretical amount should be zero
theo_amt = 0.00
elif line_timedelta.days > 0 and fields.Datetime.from_string(today) < fields.Datetime.from_string(
line.date_to):
# If today is between the budget line date_from and date_to
theo_amt = (
elapsed_timedelta.total_seconds() / line_timedelta.total_seconds()) * line.planned_amount
else:
theo_amt = line.planned_amount
line.theoretical_amount = theo_amt
def _compute_percentage(self):
for line in self:
if line.theoretical_amount != 0.00:
line.percentage = float((line.practical_amount or 0.0) / line.theoretical_amount) * 100
else:
line.percentage = 0.00

31
base_account_budget/security/account_budget_security.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Record rule for multi-company-->
<record id="budget_post_comp_rule" model="ir.rule">
<field name="name">Budget post multi-company</field>
<field name="model_id" ref="model_account_budget_post"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="budget_comp_rule" model="ir.rule">
<field name="name">Budget multi-company</field>
<field name="model_id" ref="model_budget_budget"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="budget_lines_comp_rule" model="ir.rule">
<field name="name">Budget lines multi-company</field>
<field name="model_id" ref="model_budget_lines"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="res.users" id="base.user_root">
<field eval="[(4,ref('analytic.group_analytic_accounting'))]" name="groups_id"/>
</record>
</data>
</odoo>

7
base_account_budget/security/ir.model.access.csv

@ -0,0 +1,7 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_budget_budget,budget.budget,model_budget_budget,account.group_account_manager,1,1,1,1
access_account_budget_post,account.budget.post,model_account_budget_post,account.group_account_manager,1,1,1,1
access_account_budget_post_accountant,account.budget.post accountant,model_account_budget_post,account.group_account_user,1,1,1,1
access_budget_budget_accountant,budget.budget accountant,model_budget_budget,account.group_account_user,1,1,1,1
access_budget_lines_accountant,budget.lines accountant,model_budget_lines,account.group_account_user,1,1,1,1
access_budget,budget.lines manager,model_budget_lines,base.group_user,1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_budget_budget budget.budget model_budget_budget account.group_account_manager 1 1 1 1
3 access_account_budget_post account.budget.post model_account_budget_post account.group_account_manager 1 1 1 1
4 access_account_budget_post_accountant account.budget.post accountant model_account_budget_post account.group_account_user 1 1 1 1
5 access_budget_budget_accountant budget.budget accountant model_budget_budget account.group_account_user 1 1 1 1
6 access_budget_lines_accountant budget.lines accountant model_budget_lines account.group_account_user 1 1 1 1
7 access_budget budget.lines manager model_budget_lines base.group_user 1 1 1 0

BIN
base_account_budget/static/description/assets/icons/capture (1).png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
base_account_budget/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
base_account_budget/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
base_account_budget/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
base_account_budget/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
base_account_budget/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
base_account_budget/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
base_account_budget/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
base_account_budget/static/description/assets/icons/img.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
base_account_budget/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
base_account_budget/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
base_account_budget/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
base_account_budget/static/description/assets/icons/photo-capture.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
base_account_budget/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
base_account_budget/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
base_account_budget/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
base_account_budget/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
base_account_budget/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
base_account_budget/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
base_account_budget/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
base_account_budget/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
base_account_budget/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
base_account_budget/static/description/assets/misc/Cybrosys R.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

33
base_account_budget/static/description/assets/misc/email.svg

@ -0,0 +1,33 @@
<svg width="80" height="81" viewBox="0 0 80 81" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="3116889_design_email_material_communication_mail_icon 1" clip-path="url(#clip0_81_366)">
<g id="layer1">
<path id="rect3851" d="M74.6067 0.730957H5.5424C2.75742 0.730957 0.499756 3.01685 0.499756 5.83664V75.7642C0.499756 78.584 2.75742 80.8699 5.5424 80.8699H74.6067C77.3916 80.8699 79.6493 78.584 79.6493 75.7642V5.83664C79.6493 3.01685 77.3916 0.730957 74.6067 0.730957Z" fill="#DB534B"/>
<g id="Clip path group">
<mask id="mask0_81_366" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="1" y="5" width="78" height="76">
<g id="clipPath4206">
<path id="rect4208" d="M73.6244 5.2915H6.62595C3.92428 5.2915 1.73413 7.4473 1.73413 10.1066V76.0546C1.73413 78.7139 3.92428 80.8697 6.62595 80.8697H73.6244C76.3261 80.8697 78.5162 78.7139 78.5162 76.0546V10.1066C78.5162 7.4473 76.3261 5.2915 73.6244 5.2915Z" fill="white"/>
</g>
</mask>
<g mask="url(#mask0_81_366)">
<g id="g4145" opacity="0.489612">
<g id="g4147">
<path id="path4149" d="M65.8115 41.5171C65.8115 54.9863 54.4292 65.9053 40.3884 65.9053L198.828 221.861C212.869 221.861 224.251 210.942 224.251 197.472L65.8115 41.5171Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4151" d="M40.3884 65.9051C33.2495 65.9051 26.7979 63.0825 22.1802 58.5371L180.62 214.492C185.237 219.038 191.689 221.86 198.828 221.86L40.3884 65.9051Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4153" d="M22.1802 58.5373C17.7157 54.1428 14.9653 48.1381 14.9653 41.5171L173.405 197.472C173.405 204.093 176.155 210.098 180.62 214.493L22.1802 58.5373Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4155" d="M14.9653 41.5171C14.9653 28.0479 26.3476 17.1289 40.3884 17.1289L198.828 173.084C184.787 173.084 173.405 184.003 173.405 197.472L14.9653 41.5171Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4157" d="M40.3884 17.1289C47.5273 17.1289 53.9789 19.9516 58.5966 24.4969L217.036 180.452C212.418 175.907 205.967 173.084 198.828 173.084L40.3884 17.1289Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4159" d="M58.5964 24.4971C63.0609 28.8916 65.8113 34.8963 65.8113 41.5173L224.251 197.473C224.251 190.852 221.5 184.847 217.036 180.452L58.5964 24.4971Z" fill="black" fill-opacity="0.0588235"/>
</g>
<path id="path4111" d="M65.8114 41.5171C65.8114 54.9863 54.4291 65.9053 40.3884 65.9053C26.3476 65.9053 14.9653 54.9863 14.9653 41.5171C14.9653 28.0479 26.3476 17.1289 40.3884 17.1289C54.4291 17.1289 65.8114 28.0479 65.8114 41.5171Z" fill="black" fill-opacity="0.0588235"/>
</g>
</g>
</g>
<path id="path3864" d="M17.506 17.5386H62.9018C64.4068 17.5386 65.8501 18.1439 66.9143 19.2214C67.9784 20.2988 68.5763 21.7602 68.5763 23.284V57.7564C68.5763 58.5109 68.4295 59.258 68.1443 59.9551C67.8592 60.6521 67.4412 61.2855 66.9143 61.819C66.3873 62.3525 65.7618 62.7757 65.0733 63.0645C64.3849 63.3532 63.647 63.5018 62.9018 63.5018H17.506C14.3567 63.5018 11.8315 60.9164 11.8315 57.7564V23.284C11.8315 20.0953 14.3567 17.5386 17.506 17.5386ZM40.2039 37.6475L62.9018 23.284H17.506L40.2039 37.6475ZM17.506 57.7564H62.9018V30.0923L40.2039 44.4271L17.506 30.0923V57.7564Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_81_366">
<rect width="80" height="81" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

3
base_account_budget/static/description/assets/misc/phone.svg

@ -0,0 +1,3 @@
<svg width="36" height="44" viewBox="0 0 36 44" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="Vector" d="M7.25 19.3903C10.13 26.0689 14.76 31.5322 20.43 34.9305L24.83 29.7268C25.38 29.0778 26.17 28.889 26.86 29.1486C29.1 30.0218 31.51 30.4938 34 30.4938C35.11 30.4938 36 31.544 36 32.8537V41.1135C36 42.4233 35.11 43.4734 34 43.4734C15.22 43.4734 0 25.5143 0 3.35456C0 2.0448 0.9 0.994629 2 0.994629H9C10.11 0.994629 11 2.0448 11 3.35456C11 6.29268 11.4 9.1364 12.14 11.7795C12.36 12.5937 12.2 13.5259 11.65 14.1749L7.25 19.3903Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 565 B

9
base_account_budget/static/description/assets/misc/star (1) 2.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

9
base_account_budget/static/description/assets/misc/support (1) 1.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 43 KiB

6
base_account_budget/static/description/assets/misc/support-email.svg

@ -0,0 +1,6 @@
<svg width="49" height="37" viewBox="0 0 49 37" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group">
<path id="Vector" d="M2.23798 3.59132C3.53363 4.39742 21.5313 15.9748 22.2027 16.3917C22.8741 16.8087 23.5573 17.0032 24.6173 17.0032C25.6774 17.0032 26.3606 16.8087 27.0319 16.3917C27.7033 15.9748 45.701 4.39742 46.9967 3.59132C47.4796 3.29945 48.2923 2.77131 48.469 2.17368C48.7753 1.11741 48.4455 0.714355 47.138 0.714355H24.6173H2.09664C0.789214 0.714355 0.459412 1.13131 0.765656 2.17368C0.942335 2.78521 1.75506 3.29945 2.23798 3.59132Z" fill="white"/>
<path id="Vector_2" d="M48.0214 4.21664C47.0555 4.80037 38.3865 12.0831 32.6503 16.4611L42.3323 29.3171C42.5679 29.5951 42.6739 29.9286 42.5443 30.0954C42.403 30.2483 42.0967 30.1649 41.8494 29.9008L30.2357 18.3374C28.4807 19.6716 27.2439 20.5889 27.0319 20.7279C26.1249 21.2699 25.4889 21.3394 24.6173 21.3394C23.7457 21.3394 23.1096 21.2699 22.2027 20.7279C21.9789 20.5889 20.7539 19.6716 18.9989 18.3374L7.38519 29.9008C7.14961 30.1788 6.83159 30.2622 6.69025 30.0954C6.54891 29.9425 6.65491 29.5951 6.89048 29.3171L16.5607 16.4611C10.8245 12.0831 2.06126 4.80037 1.09541 4.21664C0.0588929 3.59121 0 4.32783 0 4.89766C0 5.46749 0 33.3893 0 33.3893C0 34.6819 1.61367 36.2941 2.76797 36.2941H24.6173H46.4666C47.6209 36.2941 48.999 34.668 48.999 33.3893C48.999 33.3893 48.999 5.4536 48.999 4.89766C48.999 4.31393 49.0697 3.59121 48.0214 4.21664Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

17
base_account_budget/static/description/assets/misc/tick-mark.svg

@ -0,0 +1,17 @@
<svg width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect width="52" height="52" fill="#F5F5F5"/>
<g clip-path="url(#clip0_0_1)">
<rect width="1440" height="7504" transform="translate(-107 -1660)" fill="white"/>
<rect x="-45" y="-203" width="1305" height="937" rx="19" fill="#FFF5FC"/>
<rect width="52" height="52" fill="url(#pattern0)"/>
</g>
<defs>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_0_1" transform="scale(0.00387597)"/>
</pattern>
<clipPath id="clip0_0_1">
<rect width="1440" height="7504" fill="white" transform="translate(-107 -1660)"/>
</clipPath>
<image id="image0_0_1" width="258" height="258" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQIAAAECCAYAAAAVT9lQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAJJ0lEQVR4nO3dYZXjNhQGUDEohEAohEAohEAYCIawEAxhIQRCIQTCQmhX202bTWcmcWzpSda953y/J9JYL5EsyykBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD1/f49f37PXwXztVprgMXeUtkCkDNXaw2wyOF7zql8EXir1SBgmTw4v6XyReBUq0HA835L/8zVSxeAXGSOldoELPBHqvMrIP+N3yu1CXhS/hXwJZUvAIoANKrGbcFr8t/5rU6zgGfVWhBUBKBBtRYEFQFoVJ4KXJIiAMOqsUNQEYBG1Z4K/PXz7ykC0IjaU4GcuUrLgKecUt0CoAhAQ/JP8jwgFQEY1CHV2yCkCECDaj0rcJ8/azQOeGxK9QvAtQi4OwDBIm4NKgLQkJoPDCkC0KCo9QBFABpRe6uwIgANidofcM23pAhAqDwAo9YDrkXAyUIQKA/AqPUARQAacEqxRSBHEYBAkYuC15yKtxL40JwUARhWXhQ8p/gi4DVkEOSQYu8MXDOXbijwvug7A4oABIvcLnwbuwYhyCnFFwBFAALVet/go+RfI4fCbQXekefi0QXgWgRsGILKWrk9eM0fZZsL3It+cOg+p7LNBe5Fnib0XuayzQXutbJHQBGAIK0VAbcJobI8B2+pCDhhCCrLRSB64N8XAbcJoaLWikCO24RQ0ZTiB/19PFIMFc0pftDfZy7aYuAXLRYBLyeFilosApfkDgFU02IRcIcAKmnt4aHbuEMAFbT28NBtpoLtBn5quQh8Ldhu4KeWi4BnCKCClouAo8aggpaLQM6xXNOBrPUiYPswFNZ6EZjLNR3IWi8CFgehsNaLgMVBKKz1IpBj5yAU1EMRmIq1HuiiCNg5CAX1UAQuyeIgFNNDEfBYMRTUQxHIOZXqAKDd8wRuMxdrPdDkyUL3ceYgFNRDEbBpCArqoQjk2DQEhfRSBKZSHQCj+5LiB/gzOZfqABjdKcUP8GfibcVQSC9FIOdYqA9gaD0VgalQH8DQ8rdr9OB+NudCfQBDy/vy83w7eoA/E+sCUEBPRSDnWKYbYFz5m7WnIjCV6QYYVy9PEl5zLtMNMK7eioB1ASggf7tGD+4lOZbpBhjXnOIH9pJ8KdMNMK5enh+4xvkCsLFTih/YS+J8AdhYb0Ugx/kCsKG8YSh6UC/NXKQnaFb+h+d5oJ+AZfS2azDHy0oHk4vA9Z+fL9ZT7MfZnTyYLil+YC+N9xEM5LYI3Ca/osq3wXq9bRi65q1EZ9Cmj4rANflb7Bj26fYhF9ToQb003lM4kEdF4DZT0Gfs3ZI+biW2EA/klQvUQuIy+ad19KB+JccSnUF71nxLWUh8Tu6j6AH9SmwhHsSaInAbC4kf6/E2YY4txIPYqghcc0l+Rt47pD6LgFeXD2LrInCbqWI7WtbrbcIctwoHULIIXGMhsb9zBa5xq3AANYrANSMvJNbs563/Z9Z6di7q4hxtITEXv+gB/Wo8Vbhz0d9QlzTGQmJuY/RgfjVuFe5cdBG4zVS4rZF6vU2Yc0lj/WobTktF4Jo9LiT2fIcgx63CnWv14tzbQuI5xffpq5kK9AeNaf3n6h4WEucU34+vxu7BgZxS/AX3WS6p34XE1vv2sziAdEA9PAM/FWt9Gbl4RffZmtg9OKBejsbqZSExf8aWp1yPct6+S+hFLyfmtr6Q2PsdArsH6epwjFYXEucU3zdrYvcgP/SwXnDNJbW1kNhTIX0vHijiX72sF9xmKtITy+SCFN0Pa2JKwP/0eFFHLiTmv9vz4mDOcfNeYRemFH9xLk3EQmLvi4M5HijiU+cUf5G+kpoLiXOlNpXKJZkS8EC+QHr9yZsv8OP2XfKL3hcHc0r3ETuRL5Toi3VNpu275Ife+yXHlIBF8gUTfdGuydYLiT3/UrrtE1MCFut9QWzLhcTe+yLHGQO85JD6/xbMWbuQ2Puvo5xpRfvhx/bT6It4i1zSa4tke2i/MwbYxJziL+atMi1o9yHt4xeRKQGb2MMGmts8s5C4lzZPD9oJi/TyyPKzebSQODfwGdfGlIAi9rCZ5j7vLSTuYV0gx5SAYnp6ZPnZXNJ/C4mHtI91gend/x5sZA8baz4bPHtYFzAloIpjir/Y5eOYElDNlOIvePl/ps/+aVDCHn5G7ymmBIQ4pP2uF/QYUwLCnFL8ABBTAhowp/iBMHIuyePFNKDHU5D3lOPjfxHUsbctyL3EiUM0Z0rxA2OkXJIpAY06p/gBMkqOT/5PoLpDckuxRkwJaN5ent5rNV5VRjf2cM5fq/H2YrqxlxN+Wou3F9MdtxS3jSkB3drjqUZROS3se2jKOcUPot5zXtzr0JhDcktxTb6lbV/fBmHcUnw90wv9Dc2aU/yg6i0OG2F3PKW4PA4bYZfcUnw+04t9DF3IF3j0IGs9l2TPAAOw6/DzHF/vWujHIbml+FHmFf0K3Tml+EHXWmwjZkh7fJfimpzWdSf0ac/vUlya88q+hK4dU/wgjI5txJAcZDKt70Lo38gHmdhGDDdG3XV43KLzYE/yT+TogVkzTiOGD5xT/ACtEXsG4BOHNMYtRacRwwN7P+vwvF1Xwb7tedfhYcN+gl3b667DactOghHs7azDy7bdA+OYU/wA3irHjfsGhrGXsw7nrTsGRpO/SaMH8prYMwAb6fnBpLcC/QFD6nWK4KEi2FiPDyZ5NwEUMKX4wf1sPFQEBfVwdoEFQiishynCqVjrgX+1PEU4F2w3cKfVKcKhZKOBX7U4RZiKthh4V0tThEuyQAhhWpkiOHUIArUwRTgXbyXwUPQU4VC+icAzoqYIU43GAc+JmCJckgVCaE7tKYIFQmhUrSnCuVaDgOVqTREOtRoEvKb0FGGq1xRgjVJTBAuE0JFSU4RTzUYA6209RbBACB3a+tBTZxBCp45pmyLgDELo3Nr3IjiDEHZg7RTBAiHsxKtvV/aSEtiZr2l5ITiGfFKgmDxFyPP9Z4vAHPMxgdLyS0mfXSA8BH1GoIK8MehRIZjCPh1QxaPtx5e4jwbUlL/xPyoEDhyBQXy0t+Ac+aGA+t7bW+B5AhjQ7d4CzxPAoPItwm/J8wQwvLxw+Bb9IQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4DV/A/Mf3+pWEmbtAAAAAElFTkSuQmCC"/>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

9
base_account_budget/static/description/assets/misc/whatsapp 1.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 38 KiB

33
base_account_budget/static/description/assets/misc/whatsapp.svg

@ -0,0 +1,33 @@
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="3116884_whatsapp_square_chat_design_message_icon 1" clip-path="url(#clip0_81_382)">
<g id="layer1">
<path id="rect3851" d="M74.6066 0.72168H5.5424C2.75742 0.72168 0.499756 2.97935 0.499756 5.76433V74.8286C0.499756 77.6135 2.75742 79.8712 5.5424 79.8712H74.6066C77.3916 79.8712 79.6492 77.6135 79.6492 74.8286V5.76433C79.6492 2.97935 77.3916 0.72168 74.6066 0.72168Z" fill="#39BB59"/>
<g id="Clip path group">
<mask id="mask0_81_382" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="9" width="75" height="72">
<g id="clipPath4206">
<path id="rect4208" d="M75.7716 9.01709H11.1629C8.55758 9.01709 6.44556 11.0471 6.44556 13.5512V75.6502C6.44556 78.1543 8.55758 80.1843 11.1629 80.1843H75.7716C78.3769 80.1843 80.4889 78.1543 80.4889 75.6502V13.5512C80.4889 11.0471 78.3769 9.01709 75.7716 9.01709Z" fill="white"/>
</g>
</mask>
<g mask="url(#mask0_81_382)">
<g id="g4145" opacity="0.489612">
<g id="g4147">
<path id="path4149" d="M68.2374 43.1284C68.2374 55.8115 57.2611 66.0932 43.7212 66.0932L196.51 212.946C210.049 212.946 221.026 202.665 221.026 189.982L68.2374 43.1284Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4151" d="M43.7211 66.0932C36.8369 66.0932 30.6154 63.4353 26.1624 59.1553L178.951 206.008C183.404 210.289 189.625 212.946 196.51 212.946L43.7211 66.0932Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4153" d="M26.1623 59.1553C21.8571 55.0173 19.2048 49.363 19.2048 43.1284L171.993 189.982C171.993 196.216 174.645 201.87 178.951 206.008L26.1623 59.1553Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4155" d="M19.2048 43.1284C19.2048 30.4453 30.1811 20.1636 43.7211 20.1636L196.509 167.017C182.969 167.017 171.993 177.299 171.993 189.982L19.2048 43.1284Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4157" d="M43.7212 20.1636C50.6054 20.1636 56.8269 22.8215 61.2799 27.1015L214.068 173.955C209.615 169.675 203.394 167.017 196.51 167.017L43.7212 20.1636Z" fill="black" fill-opacity="0.0588235"/>
<path id="path4159" d="M61.2798 27.1016C65.585 31.2396 68.2373 36.8939 68.2373 43.1284L221.026 189.982C221.026 183.747 218.373 178.093 214.068 173.955L61.2798 27.1016Z" fill="black" fill-opacity="0.0588235"/>
</g>
<path id="path4111" d="M68.2373 43.1284C68.2373 55.8115 57.261 66.0932 43.7211 66.0932C30.1811 66.0932 19.2048 55.8115 19.2048 43.1284C19.2048 30.4453 30.1811 20.1636 43.7211 20.1636C57.261 20.1636 68.2373 30.4453 68.2373 43.1284Z" fill="black" fill-opacity="0.0588235"/>
</g>
</g>
</g>
<path id="path4074" d="M51.3896 43.6875C51.9673 43.9879 52.337 44.1497 52.4526 44.3808C52.5912 44.635 52.545 45.7904 51.9673 47.1076C51.5051 48.4017 49.1018 49.6496 48.0388 49.6958C46.9758 49.7421 46.9527 50.5277 41.1985 48.0089C35.4444 45.49 31.9781 39.3431 31.7008 38.9502C31.4235 38.5574 29.4823 35.7612 29.5748 32.9188C29.6903 30.0995 31.1693 28.7592 31.7701 28.2046C32.3247 27.6037 32.9487 27.5344 33.3415 27.6037H34.4276C34.7743 27.6037 35.2596 27.4651 35.6986 28.6437L37.2931 32.965C37.4318 33.2654 37.5242 33.6121 37.3163 33.9818L36.6923 34.9293L35.7911 35.8998C35.5138 36.1771 35.1902 36.4776 35.5138 37.0553C35.7911 37.6561 36.9465 39.5741 38.5641 41.1687C40.667 43.2022 42.5158 43.8724 43.0704 44.1728C43.625 44.4963 43.9716 44.4501 44.3182 44.0804L46.1901 41.9081C46.6291 41.3304 46.9989 41.4691 47.5304 41.6539L51.3896 43.6875ZM40.4128 16.0493C46.5417 16.0493 52.4195 18.484 56.7533 22.8178C61.0871 27.1515 63.5217 33.0293 63.5217 39.1582C63.5217 45.287 61.0871 51.1649 56.7533 55.4986C52.4195 59.8324 46.5417 62.2671 40.4128 62.2671C35.8604 62.2671 31.6315 60.9498 28.0496 58.6852L17.304 62.2671L20.8858 51.5214C18.6212 47.9396 17.304 43.7106 17.304 39.1582C17.304 33.0293 19.7386 27.1515 24.0724 22.8178C28.4061 18.484 34.284 16.0493 40.4128 16.0493ZM40.4128 20.6711C35.5098 20.6711 30.8075 22.6188 27.3405 26.0858C23.8735 29.5528 21.9257 34.2551 21.9257 39.1582C21.9257 43.1329 23.1736 46.8072 25.2996 49.8114L23.0812 56.4898L29.7596 54.2714C32.7638 56.3974 36.4381 57.6453 40.4128 57.6453C45.3159 57.6453 50.0182 55.6975 53.4852 52.2305C56.9522 48.7635 58.9 44.0613 58.9 39.1582C58.9 34.2551 56.9522 29.5528 53.4852 26.0858C50.0182 22.6188 45.3159 20.6711 40.4128 20.6711Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_81_382">
<rect width="80" height="80" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
base_account_budget/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
base_account_budget/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
base_account_budget/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
base_account_budget/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
base_account_budget/static/description/assets/modules/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
base_account_budget/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
base_account_budget/static/description/assets/screenshots/budget_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
base_account_budget/static/description/assets/screenshots/budget_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
base_account_budget/static/description/assets/screenshots/budget_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
base_account_budget/static/description/assets/screenshots/budget_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
base_account_budget/static/description/assets/screenshots/budget_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
base_account_budget/static/description/assets/screenshots/budget_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
base_account_budget/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

BIN
base_account_budget/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
base_account_budget/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

670
base_account_budget/static/description/index.html

@ -0,0 +1,670 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Odoo App 3 Index</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
</head>
<body>
<section>
<div class="container" style="font-family: 'Inter', sans-serif !important;background-color: #fff !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between flex-wrap align-items-sm-center"
style="border-bottom:1px solid rgba(0, 0, 0, 0.22)">
<div class="my-3">
<img src="assets/misc/Cybrosys R.png" style="width:auto !important; height:40px !important">
</div>
<div class="my-3 d-flex align-items-center">
<div class="text-center"
style="background-color:#017E84 !important;font-size: 0.8rem !important; color:#fff !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width: 120px !important;">
Community
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 text-center d-flex align-items-center flex-column"
style="margin: 80px 0px !important;">
<h1 style="font-size: 2.8rem;font-weight: 700; color:
#1A202C;">
Budget Management</h1>
<p class="my-3 mb-4"
style="max-width: 80%; font-weight: 400 !important; line-height: 32px; color: #718096;">
Budget Management for Odoo 17 Community Edition.
</p>
<div style="width: 80%; margin-top: 3rem;">
<img src="assets/screenshots/hero.gif" class="img-responsive" width="100%" height="auto">
</div>
</div>
</div>
<div class="container mt-5 mb-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#714b67 !important">Key Highlights
</p>
</div>
<div class="row py-4">
<div class="col-md-6 col-sm-12 p-3">
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px;
background: #FFF;
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); ">
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67;
display: flex; justify-content: center; align-items: center;
margin-right: 10px; flex-shrink: 0;">
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i>
</div>
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Odoo 17 Community Edition Support.</p>
<p class="m-0" style="color:#718096">Budget management system in Odoo 17 Community Edition.
</p>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 p-3">
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px;
background: #FFF;
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); ">
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67;
display: flex; justify-content: center; align-items: center;
margin-right: 10px; flex-shrink: 0;">
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i>
</div>
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Budgetary Positions.</p>
<p class="m-0" style="color:#718096">Create and manage Budgetary Positions.
</p>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 p-3">
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px;
background: #FFF;
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); ">
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67;
display: flex; justify-content: center; align-items: center;
margin-right: 10px; flex-shrink: 0;">
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i>
</div>
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Manage with Analytic Accounts.</p>
<p class="m-0" style="color:#718096">Manage budgets with analytic accounts.
</p>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 p-3">
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px;
background: #FFF;
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); ">
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67;
display: flex; justify-content: center; align-items: center;
margin-right: 10px; flex-shrink: 0; ">
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i>
</div>
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Budgetary Planning with Planned Amount.</p>
<p class="m-0" style="color:#718096"> Budgetary planning with planned amount on each Analytic Account.
</p>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 p-3">
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px;
background: #FFF;
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); ">
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67;
display: flex; justify-content: center; align-items: center;
margin-right: 10px; flex-shrink: 0; ">
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i>
</div>
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Budgetary Reports.</p>
<p class="m-0" style="color:#718096"> Budgetary reports are also available.
</p>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 p-3">
<div class="d-flex h-100" style="padding: 30px;border-radius: 12px;
background: #FFF;
box-shadow: 1px 2px 3px 0px rgba(0, 0, 0, 0.25); ">
<div style="width: 36px; height: 36px; border-radius: 50%; background: #714B67;
display: flex; justify-content: center; align-items: center;
margin-right: 10px; flex-shrink: 0; ">
<i class="fa-solid fa-star " style="color: #fff;font-size:14px;"></i>
</div>
<div>
<p style="color: #1A202C;font-weight: 600;
font-size: 1.2rem; margin-bottom: 2px;">Graphical View.</p>
<p class="m-0" style="color:#718096"> Each list of record can also be switched to a graphical view of it. .
</p>
</div>
</div>
</div>
</div>
</div>
<div class="container rounded" >
<ul class="nav nav-tabs d-flex" style="width: fit-content;margin: 0 auto;gap: 1rem;">
<li class="col text-center py-2 text-nowrap "
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a
class="active show" data-toggle="tab" href="#tab1"
style="color: #fff;font-weight: 500; background-color: #714B67; text-decoration: none;">
<i class="fa-regular fa-image pr-2" style="color: #fff;"></i>
Screenshots</a></li>
<li class="col text-center py-2 text-nowrap "
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a
data-toggle="tab" href="#tab2"
style="color: #fff;font-weight: 500; text-decoration: none;"><i
class="fa-solid fa-star pr-2" style="color: #fff;"></i>Features</a></li>
<li class="col text-center py-2 text-nowrap "
style="color: #fff; background-color: #714B67;border-radius: 6px 6px 0px 0px;"><a
data-toggle="tab" href="#tab3"
style="color: #fff;font-weight: 500; text-decoration: none; background-color: #714B67;"><i
class="fa-solid fa-book-open pr-2" style="color: #fff;"></i>Released Notes</a></li>
</ul>
<div class="tab-content" style="background-color: rgba(121, 113, 119, 0.04);">
<div id="tab1" class="tab-pane fade in active show">
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/budget_1.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Creating Budget.</h4>
<h6 class="mt-2"
style=" font-weight:300 !important; color:#282F33 !important; font-size:0.7rem !important">
Create Budget from Accounting > Accounting > Budgets > New.</h6>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/budget_2.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Budget Records.</h4>
<h6 class="mt-2"
style=" font-weight:300 !important; color:#282F33 !important; font-size:0.7rem !important">
Can see the list view of the Budget records.</h6>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/budget_3.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Create Budgetary Positions.</h4>
<h6 class="mt-2"
style=" font-weight:300 !important; color:#282F33 !important; font-size:0.7rem !important">
Create Budgetary Positions from Accounting -> Configuration -> Budgetary Positions.</h6>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/budget_4.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
List View of the Budgetary Positions.</h4>
<h6 class="mt-2"
style=" font-weight:300 !important; color:#282F33 !important; font-size:0.7rem !important">
We can set-up the records and that will be shown in the list view.</h6>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/budget_6.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Budget Form view.</h4>
<h6 class="mt-2"
style=" font-weight:300 !important; color:#282F33 !important; font-size:0.7rem !important">
The Budget records and the Budgetary Positions can be added in the forms.</h6>
</div>
</div>
</div>
<div class="col-lg-12 py-2" style="padding: 1rem 4rem !important;">
<div
style="border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="row justify-content-center p-3 w-100 m-0">
<img src="assets/screenshots/budget_5.png" class="img-responsive" width="100%" height="auto">
</div>
<div class="px-3">
<h4 class="mt-2"
style=" font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Budget Report.</h4>
<h6 class="mt-2"
style=" font-weight:300 !important; color:#282F33 !important; font-size:0.7rem !important">
For Budget report, go to Accounting > Reporting > Management > Budgets.</h6>
</div>
</div>
</div>
</div>
<div id="tab2" class="tab-pane fade">
<div class="col-mg-12" style="padding: 1rem 4rem;">
<ul style="list-style: none; padding: 1rem 0;font-weight: 500;">
<li class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt=""
width="16px"></span>Create and manage Budgetary Positions.
</li>
<li class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt=""
width="16px"></span>Manage budgets with analytic accounts.
</li>
<li class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<span style="margin-right: 12px;"><img src="assets/misc/star (1) 2.svg" alt=""
width="16px"></span>Budgetary planning with planned amount on each Analytic Account..
</li>
</ul>
</div>
</div>
<div id="tab3" class="tab-pane fade">
<div class="col-mg-12 active" style="padding: 1rem 4rem;">
<div class="py-3"
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;"><span>Version
17.0.1.0.0</span><span class="px-2">|</span><span
style="color: #714B67;font-weight: 600;">Released on:07th Nov 2023</span>
</div>
<p class="m-0"
style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">
Odoo 17 Budgets Management.</p>
</div>
</div>
</div>
</div>
</div>
<div class="container mt-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-5">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Related Products</p>
</div>
</div>
<div id="myCarousel" class="carousel slide py-3" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="row p-4">
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/16.0/manufacturing_reports/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px; ">
<img src="assets/modules/1.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Manufacturing Reports</p>
</div>
</a>
</div>
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/16.0/mrp_work_order_print/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px; ">
<img src="assets/modules/2.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Print Work Order Details</p>
</div>
</a>
</div>
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/16.0/bom_total_cost/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px; ">
<img src="assets/modules/3.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Show Total Cost On BOM</p>
</div>
</a>
</div>
</div>
</div>
</div>
<div class="carousel-item">
<div class="row p-4">
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/16.0/simple_mrp_order/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px; ">
<img src="assets/modules/4.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">Simple Manufacturing Orders</p>
</div>
</a>
</div>
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/16.0/bom_multiple_product/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px;">
<img src="assets/modules/5.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold">BOM Multiple Product Selection</p>
</div>
</a>
</div>
</div>
<div class="col">
<div class="p-3">
<a href="https://apps.odoo.com/apps/modules/16.0/cw_mrp/" style="color: #000; text-decoration: none;">
<div style="border:1px solid #CBCBCB !important;border-radius: 4px;">
<div style="width: 300px;">
<img src="assets/modules/6.png" alt="" width="100%" height="auto">
</div>
<p class="text-center pt-2 text-black font-weight-bold"> Catch Weight Management: Manufacturing</p>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#myCarousel" data-slide="prev" style="width: 35px; color: #000;">
<span class="carousel-control-prev-icon">
<i class="fa fa-chevron-left" style="font-size: 24px;"></i>
</span>
</a>
<a class="carousel-control-next" href="#myCarousel" data-slide="next" style="width: 35px; color: #000;">
<span class="carousel-control-next-icon">
<i class="fa fa-chevron-right" style="font-size: 24px;"></i>
</span>
</a>
</div>
<div class="container mt-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Our Services</p>
</div>
</div>
<div class="container my-5">
<div class="row py-3">
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#13EA36 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/cogs.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Customization</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#DBC711; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/wrench.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Implementation</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#FF6B6B ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/lifebuoy.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Support</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#FFA801 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/user.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Hire Odoo Developer</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative; border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#54A0FF; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/puzzle.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Integration</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#6D7680 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/update.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Migration</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#786FA6 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/consultation.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Consultancy</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#F8A5C2 ; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/training.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Implementation</p>
</div>
</div>
<div class="col-md-4 col-sm-6 px-4 py-4">
<div
style="background-color: #fff; padding: 25px; text-align: center; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; position: relative;border-radius: 4px;">
<div style="position: absolute; top: 0%; left: 50%; transform: translate(-50%, -50%);">
<div style="background-color:#E6BE26; border-radius: 50%; padding: 15px; width: 68px;
height: 68px; display: inline-block; box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);">
<img src="assets/icons/license.png" alt="service-icon" width="38px" height="auto">
</div>
</div>
<p style="margin-top: 20px; font-weight: bold;">Odoo Licensing Consultancy</p>
</div>
</div>
</div>
</div>
<div class="container mt-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-4">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Our Industries</p>
</div>
</div>
<div class="container">
<div class="row my-5 py-4">
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100 "
style="border-right: 1px solid rgb(209, 209, 209); border-bottom: 1px solid rgb(209, 209, 209); padding: 30px; box-shadow: 6px 0 10px rgba(228, 227, 227, 0.373);">
<img src="assets/icons/trading-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Trading</p>
<p>Easily procure and sell your products</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209);border-bottom: 1px solid rgb(209, 209, 209); padding: 30px;">
<img src="assets/icons/pos-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">POS</p>
<p>Easy configuration and convivial experience</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209);border-bottom: 1px solid rgba(0, 0, 0, 0.2); padding: 30px; box-shadow: 0 5px 10px rgba(228, 227, 227, 0.373)">
<img src="assets/icons/education-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Education</p>
<p>A platform for educational management</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-bottom: 1px solid rgb(209, 209, 209); padding: 30px; ">
<img src="assets/icons/manufacturing-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Manufacturing</p>
<p>Plan, track and schedule your operations</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px;">
<img src="assets/icons/ecom-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">E-commerce & Website</p>
<p>Mobile friendly, awe-inspiring product pages</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px;box-shadow: 0 -5px 10px rgba(228, 227, 227, 0.373);">
<img src="assets/icons/service-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Service Management</p>
<p>Keep track of services and invoice</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style="border-right: 1px solid rgb(209, 209, 209); padding: 30px; ">
<img src="assets/icons/restaurant-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Restaurant</p>
<p>Run your bar or restaurant methodically</p>
</div>
</div>
<div class="col-md-3 col-sm-6 p-0">
<div class="d-flex flex-column h-100"
style=" padding: 30px;box-shadow: -5px 0 10px rgba(228, 227, 227, 0.373);">
<img src="assets/icons/hotel-black.png" width="42px" height="auto" alt="">
<p style="color: #714B67;font-weight: 600; margin-top: 10px;
font-size: 1.2rem; margin-bottom: 2px;">Hotel Management</p>
<p>An all-inclusive hotel management application</p>
</div>
</div>
</div>
</div>
<div class="container mt-5">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center mt-5">
<p class="m-0" style="font-weight: 600; font-size: 24px; color:#000 !important">Support</p>
</div>
</div>
<div class="container my-5">
<div class="row" style="background-color: #FFFAFE;">
<div class="col-md-6 pb-4 d-flex align-items-center justify-content-center"
style="border-right: 1px solid #D9D9D9;">
<div style="padding: 30px;">
<div class="d-flex align-items-center">
<img src="assets/misc/support (1) 1.svg" alt="" width="60px" style="margin-right: 12px;">
<div style="padding: 0px 8px;">
<span
style="color: #714B67;font-size: 24px;font-weight: 600;padding-bottom: 1rem;">Need
Help?</span>
<p class="m-0" style="color:#718096;">Got questions or need help? Get in touch.</p>
<div style="font-weight: 400;"><span><img src="assets/misc/support-email.svg" alt=""
width="18px"
style="filter: invert(1);margin-right: 0.8rem;"></span>odoo@cybrosys.com
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 pb-4 d-flex align-items-center justify-content-center">
<div style="padding: 30px;">
<div class="d-flex align-items-center">
<img src="assets/misc/whatsapp 1.svg" alt="" width="60px" style="margin-right: 12px;">
<div>
<span style="color: #714B67;font-size: 24px;font-weight: 600;">WhatsApp</span>
<p class="m-0" style="color:#718096;">Say hi to us on WhatsApp!</p>
<div style="font-weight: 400; font-size: 16px;"><span><img src="assets/misc/phone.svg"
alt="" width="14px"
style="filter: invert(1); margin-right: 0.8rem;"></span>+91
99456767686</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>

47
base_account_budget/views/account_analytic_account_views.xml

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- The form view of the Analytic accounts-->
<record id="view_account_analytic_account_form_inherit_budget" model="ir.ui.view">
<field name="name">account.analytic.account.form.inherit.budget</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id"
ref="analytic.view_account_analytic_account_form"/>
<field name="priority" eval="50"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='main']" position='after'>
<notebook groups="account.group_account_user">
<page string="Budget Items">
<field name="budget_line" widget="one2many_list"
colspan="4" nolabel="1" mode="tree">
<tree string="Budget Items" editable="top">
<field name="budget_id"/>
<field name="general_budget_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="paid_date"/>
<field name="planned_amount"
widget="monetary"/>
<field name="practical_amount"
sum="Practical Amount"
widget="monetary"/>
<field name="theoretical_amount"
sum="Theoretical Amount"
widget="monetary"/>
<field name="percentage"/>
</tree>
<form string="Budget Items">
<field name="budget_id"/>
<field name="general_budget_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="paid_date"/>
<field name="planned_amount"
widget="monetary"/>
</form>
</field>
</page>
</notebook>
</xpath>
</field>
</record>
</odoo>

353
base_account_budget/views/account_budget_views.xml

@ -0,0 +1,353 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Budgetary Position views and actions-->
<record id="view_budget_post_search" model="ir.ui.view">
<field name="name">account.budget.post.search</field>
<field name="model">account.budget.post</field>
<field name="arch" type="xml">
<search string="Budgetary Position">
<field name="name" filter_domain="[('name','ilike',self)]"
string="Budgetary Position"/>
<field name="company_id" groups="base.group_multi_company"/>
</search>
</field>
</record>
<record id="view_budget_post_tree" model="ir.ui.view">
<field name="name">account.budget.post.tree</field>
<field name="model">account.budget.post</field>
<field name="arch" type="xml">
<tree string="Budgetary Position">
<field name="name"/>
<field name="company_id" options="{'no_create': True}"
groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="open_budget_post_form" model="ir.actions.act_window">
<field name="name">Budgetary Positions</field>
<field name="res_model">account.budget.post</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_id" ref="view_budget_post_tree"/>
<field name="search_view_id" ref="view_budget_post_search"/>
</record>
<menuitem action="open_budget_post_form" id="menu_budget_post_form"
parent="account.account_management_menu"
sequence="5"/>
<record model="ir.ui.view" id="view_budget_post_form">
<field name="name">account.budget.post.form</field>
<field name="model">account.budget.post</field>
<field name="arch" type="xml">
<form string="Budgetary Position">
<sheet>
<group col="4">
<field name="name"/>
<field name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"/>
</group>
<notebook>
<page string="Accounts">
<field name="account_ids">
<tree>
<field name="code"/>
<field name="name"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="crossovered_budget_view_form">
<field name="name">budget.view.form</field>
<field name="model">budget.budget</field>
<field name="arch" type="xml">
<form string="Budget">
<header>
<button string="Confirm" name="action_budget_confirm"
invisible="state != 'draft'" type="object"
class="oe_highlight"/>
<button string="Approve" name="action_budget_validate"
invisible="state != 'confirm'" type="object"
class="oe_highlight"/>
<button string="Done" name="action_budget_done"
invisible="state != 'validate'" type="object"
class="oe_highlight"/>
<button string="Reset to Draft" name="action_budget_draft"
invisible="state != 'cancel'" type="object"/>
<button string="Cancel Budget" name="action_budget_cancel"
invisible="state not in ('confirm','validate')"
type="object"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,confirm"/>
</header>
<sheet string="Budget">
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" readonly="state != 'draft'"
placeholder="Budget Name"/>
</h1>
</div>
<group>
<group>
<field name="creating_user_id"
readonly="state != 'draft'"/>
</group>
<group>
<label for="date_from" string="Period"/>
<div>
<field name="date_from" placeholder="From"
class="oe_inline"
readonly="state != 'draft'"/>
-
<field name="date_to" placeholder="To"
class="oe_inline"
readonly="state != 'draft'"
nolabel="1"/>
</div>
<field name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"/>
</group>
</group>
<notebook>
<page string="Budget Lines">
<field name="budget_line"
context="{'default_date_from': date_from,'default_date_to': date_to}"
colspan="4"
nolabel="1" readonly="state != 'draft'">
<tree string="Budget Lines">
<field name="general_budget_id"/>
<field name="analytic_account_id"
groups="analytic.group_analytic_accounting"
required="1"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="paid_date"
groups="base.group_no_one"/>
<field name="planned_amount"
sum="Planned Amount"
widget="monetary"/>
<field name="practical_amount"
sum="Practical Amount"
widget="monetary"/>
<field name="theoretical_amount"
sum="Theoretical Amount"
widget="monetary"/>
<field name="percentage"/>
</tree>
<form string="Budget Lines">
<group>
<group>
<field name="general_budget_id"/>
<field name="planned_amount"
widget="monetary"/>
<field name="analytic_account_id"
groups="analytic.group_analytic_accounting"
required="1"/>
</group>
<group>
<label for="date_from"
string="Period"/>
<div>
<field name="date_from"
placeholder="From"
class="oe_inline"/>
-
<field name="date_to"
placeholder="To"
class="oe_inline"/>
</div>
<field name="paid_date"
groups="base.group_no_one"/>
<field name="company_id"
options="{'no_create': True}"
groups="base.group_multi_company"/>
</group>
</group>
</form>
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"
groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record model="ir.ui.view" id="budget_budget_view_tree">
<field name="name">budget.view.tree</field>
<field name="model">budget.budget</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'"
decoration-muted="state in ('done','cancel')"
string="Budget">
<field name="name" colspan="1"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="company_id" options="{'no_create': True}"
groups="base.group_multi_company"/>
<field name="creating_user_id"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_budget_kanban" model="ir.ui.view">
<field name="name">budget.kanban</field>
<field name="model">budget.budget</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="name"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="creating_user_id"/>
<field name="state"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="row mb4">
<div class="col-8">
<strong>
<field name="name"/>
</strong>
</div>
<div class="col-4">
<span class="float-right">
<field name="state"
widget="label_selection"
options="{'classes': {'draft': 'default', 'done': 'success'}}"/>
</span>
</div>
</div>
<div class="row">
<div class="col-10">
<i class="fa fa-clock-o"/>
<t t-esc="record.date_from.value"/>-
<t t-esc="record.date_to.value"/>
</div>
<div class="col-xs-2">
<span class="float-right">
<img alt=""
t-att-src="kanban_image('res.users', 'image_small', record.creating_user_id.raw_value)"
t-att-title="record.creating_user_id.value"
width="24" height="24"
class="oe_kanban_avatar float-right"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record model="ir.actions.act_window" id="act_budget_view">
<field name="name">Budgets</field>
<field name="res_model">budget.budget</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_id" ref="budget_budget_view_tree"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new budget.
</p>
<p>
A budget is a forecast of your company's income and/or expenses
expected for a period in the future. A budget is defined on
some
financial accounts and/or analytic accounts (that may represent
projects, departments, categories of products, etc.)
</p>
<p>
By keeping track of where your money goes, you may be less
likely to overspend, and more likely to meet your financial
goals. Forecast a budget by detailing the expected revenue per
analytic account and monitor its evolution based on the actuals
realised during that period.
</p>
</field>
</record>
<menuitem parent="account.menu_finance_entries_management"
id="menu_act_budget_view"
name="Budgets"
action="act_budget_view" sequence="60"
groups="account.group_account_user"/>
<record id="view_budget_line_search" model="ir.ui.view">
<field name="name">account.budget.line.search</field>
<field name="model">budget.lines</field>
<field name="arch" type="xml">
<search string="Budget Lines">
<field name="analytic_account_id"/>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_budget_line_tree">
<field name="name">budget.line.tree</field>
<field name="model">budget.lines</field>
<field name="arch" type="xml">
<tree string="Budget Lines">
<field name="budget_id" invisible="1"/>
<field name="general_budget_id"/>
<field name="analytic_account_id"
groups="analytic.group_analytic_accounting"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="paid_date" groups="base.group_no_one"/>
<field name="planned_amount" widget="monetary"/>
<field name="practical_amount" widget="monetary"/>
<field name="theoretical_amount" widget="monetary"/>
<field name="percentage"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_budget_line_form">
<field name="name">budget.line.form</field>
<field name="model">budget.lines</field>
<field name="arch" type="xml">
<form string="Budget Lines">
<sheet>
<group col="4">
<field name="budget_id"/>
<field name="analytic_account_id"/>
<field name="general_budget_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="paid_date"/>
<field name="planned_amount" widget="monetary"/>
<field name="practical_amount" widget="monetary"/>
<field name="theoretical_amount" widget="monetary"/>
<field name="percentage"/>
<field name="company_id" options="{'no_create': True}"
groups="base.group_multi_company"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="act_budget_lines_view">
<field name="name">Budgets</field>
<field name="res_model">budget.lines</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_budget_line_tree"/>
</record>
<menuitem parent="account.account_reports_management_menu"
id="menu_act_crossovered_budget_lines_view"
action="act_budget_lines_view" sequence="20"/>
</odoo>

46
base_accounting_kit/README.rst

@ -0,0 +1,46 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Odoo 17 Full Accounting Kit
===========================
Full accounting kit for Odoo 17 community editions
Configuration
=============
No configuration
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
General Public License, Version 3 (LGPL v3).
(http://www.gnu.org/licenses/lgpl-3.0-standalone.html)
Credits
-------
Developer: (V17) Risvana A R , Contact: odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

24
base_accounting_kit/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models
from . import report
from . import wizard

98
base_accounting_kit/__manifest__.py

@ -0,0 +1,98 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Odoo 17 Full Accounting Kit',
'version': '17.0.1.0.0',
'category': 'Accounting',
'summary': """ Asset and Budget Management,Accounting Reports, PDC,
Lock dates, Credit Limit, Follow Ups, Day-Bank-Cash book reports.""",
'description': """ The module used to manage the Full Account Features.
that can manage the Account Reports,Journals Asset and Budget Management,
Accounting Reports, PDC, Lock dates, Credit Limit, Follow Ups,
Day-Bank-Cash book reports.""",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['account', 'sale', 'account_check_printing',
'base_account_budget', 'analytic'],
'data': [
'security/security.xml',
'security/ir.model.access.csv',
'data/account_financial_report_data.xml',
'data/cash_flow_data.xml',
'data/followup_levels.xml',
'data/multiple_invoice_data.xml',
'data/recurring_entry_cron.xml',
'data/account_pdc_data.xml',
'views/reports_config_view.xml',
'views/accounting_menu.xml',
'views/account_group.xml',
'views/credit_limit_view.xml',
'views/account_configuration.xml',
'views/res_config_view.xml',
'views/account_followup.xml',
'views/followup_report.xml',
'wizard/asset_depreciation_confirmation_wizard_views.xml',
'wizard/asset_modify_views.xml',
'views/account_asset_views.xml',
'views/account_move_views.xml',
'views/product_template_views.xml',
'views/multiple_invoice_layout_view.xml',
'views/multiple_invoice_form.xml',
'wizard/financial_report.xml',
'wizard/general_ledger.xml',
'wizard/partner_ledger.xml',
'wizard/tax_report.xml',
'wizard/trial_balance.xml',
'wizard/aged_partner.xml',
'wizard/journal_audit.xml',
'wizard/cash_flow_report.xml',
'wizard/account_bank_book_wizard_view.xml',
'wizard/account_cash_book_wizard_view.xml',
'wizard/account_day_book_wizard_view.xml',
'report/report_financial.xml',
'report/general_ledger_report.xml',
'report/report_journal_audit.xml',
'report/report_aged_partner.xml',
'report/report_trial_balance.xml',
'report/report_tax.xml',
'report/report_partner_ledger.xml',
'report/cash_flow_report.xml',
'report/account_bank_book_view.xml',
'report/account_cash_book_view.xml',
'report/account_day_book_view.xml',
'report/account_asset_report_views.xml',
'report/report.xml',
'report/multiple_invoice_layouts.xml',
'report/multiple_invoice_report.xml',
'views/recurring_payments_view.xml',
'wizard/account_lock_date.xml',
'views/account_payment_view.xml',
],
'license': 'LGPL-3',
'images': ['static/description/banner.jpg'],
'installable': True,
'auto_install': False,
'application': True,
}

151
base_accounting_kit/data/account_financial_report_data.xml

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Financial Reports data records in the model account.financial.report-->
<record id="account_financial_report_profitandloss0"
model="account.financial.report">
<field name="name">Profit and Loss</field>
<field name="sign" eval="'-1'"/>
<field name="type">sum</field>
</record>
<record id="account_financial_report_income0"
model="account.financial.report">
<field name="name">Income</field>
<field name="sign" eval="'-1'"/>
<field name="sequence">1</field>
<field name="parent_id"
ref="account_financial_report_profitandloss0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">sum</field>
</record>
<record id="account_financial_report_other_income0"
model="account.financial.report">
<field name="name">Other Income</field>
<field name="sequence">10</field>
<field name="parent_id"
ref="account_financial_report_income0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">account_type</field>
<field name="account_type_ids">income_other</field>
</record>
<record id="financial_report_gross_profit"
model="account.financial.report">
<field name="name">Gross Profit</field>
<field name="parent_id"
ref="account_financial_report_income0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">sum</field>
<field name="sequence">3</field>
</record>
<record id="financial_report_cost_of_revenue"
model="account.financial.report">
<field name="name">Cost of Revenue</field>
<field name="sequence">10</field>
<field name="parent_id"
ref="financial_report_gross_profit"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">account_type</field>
<field name="account_type_ids">expense_direct_cost</field>
</record>
<record id="account_financial_report_operating_income0"
model="account.financial.report">
<field name="name">Operating Income</field>
<field name="sequence">1</field>
<field name="parent_id"
ref="financial_report_gross_profit"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">account_type</field>
<field name="account_type_ids">income</field>
</record>
<record id="account_financial_report_expense0"
model="account.financial.report">
<field name="name">Expense</field>
<field name="sign" eval="'-1'"/>
<field name="sequence">2</field>
<field name="parent_id"
ref="account_financial_report_profitandloss0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">account_type</field>
<field name="account_type_ids">expense</field>
</record>
<record id="account_financial_report_balancesheet0"
model="account.financial.report">
<field name="name">Balance Sheet</field>
<field name="type">sum</field>
</record>
<record id="account_financial_report_assets0"
model="account.financial.report">
<field name="name">Assets</field>
<field name="parent_id"
ref="account_financial_report_balancesheet0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">account_type</field>
<field name="account_type_ids">income_other</field>
</record>
<record id="account_financial_report_liabilitysum0"
model="account.financial.report">
<field name="name">Liability</field>
<field name="sequence">1</field>
<field name="parent_id"
ref="account_financial_report_balancesheet0"/>
<field name="display_detail">no_detail</field>
<field name="type">sum</field>
</record>
<record id="account_financial_report_liability0"
model="account.financial.report">
<field name="name">Liability</field>
<field name="parent_id"
ref="account_financial_report_liabilitysum0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">account_type</field>
<field name="account_type_ids">income_other</field>
</record>
<record id="account_financial_report_profitloss_toreport0"
model="account.financial.report">
<field name="name">Profit (Loss) to report</field>
<field name="parent_id"
ref="account_financial_report_liabilitysum0"/>
<field name="display_detail">no_detail</field>
<field name="type">account_report</field>
<field name="account_report_id"
ref="account_financial_report_profitandloss0"/>
</record>
<record id="account_common_report_view" model="ir.ui.view">
<field name="name">Common Report</field>
<field name="model">account.report</field>
<field name="arch" type="xml">
<form string="Report Options">
<group col="4">
<field name="target_move" widget="radio"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group>
<field name="journal_ids" widget="many2many_tags"
options="{'no_create': True}"/>
<field name="company_id" invisible="1"/>
</group>
<footer>
<button name="check_report" string="Print"
type="object" default_focus="1"
class="oe_highlight"
data-hotkey="q"/>
<button string="Cancel" class="btn btn-secondary"
special="cancel" data-hotkey="z"/>
</footer>
</form>
</field>
</record>
</data>
</odoo>

24
base_accounting_kit/data/account_pdc_data.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Account payment method-->
<record id="account_payment_method_pdc_in"
model="account.payment.method">
<field name="name">PDC</field>
<field name="code">pdc</field>
<field name="payment_type">inbound</field>
</record>
<record id="account_payment_method_pdc_out"
model="account.payment.method">
<field name="name">PDC</field>
<field name="code">pdc</field>
<field name="payment_type">outbound</field>
</record>
<!-- Decimal precision for account -->
<record forcecreate="True" id="decimal_account"
model="decimal.precision">
<field name="name">Account</field>
<field name="digits" eval="3"/>
</record>
</data>
</odoo>

77
base_accounting_kit/data/cash_flow_data.xml

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Records for the account.financial.report model-->
<record id="account_financial_report_cash_flow0" model="account.financial.report">
<field name="name">Cash Flow Statement</field>
<field name="type">sum</field>
</record>
<record id="account_financial_report_operation0" model="account.financial.report">
<field name="name">Operations</field>
<field name="sequence">1</field>
<field name="parent_id" ref="account_financial_report_cash_flow0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">sum</field>
</record>
<record id="cash_in_from_operation0" model="account.financial.report">
<field name="name">Cash In</field>
<field name="sequence">1</field>
<field name="parent_id" ref="account_financial_report_operation0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">accounts</field>
</record>
<record id="cash_out_operation1" model="account.financial.report">
<field name="name">Cash Out</field>
<field name="sequence">2</field>
<field name="parent_id" ref="account_financial_report_operation0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">accounts</field>
</record>
<record id="account_financial_report_investing_activity0" model="account.financial.report">
<field name="name">Investing Activities</field>
<field name="sequence">2</field>
<field name="parent_id" ref="account_financial_report_cash_flow0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">sum</field>
</record>
<record id="cash_in_investing0" model="account.financial.report">
<field name="name">Cash In</field>
<field name="parent_id" ref="account_financial_report_investing_activity0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">accounts</field>
</record>
<record id="cash_out_investing1" model="account.financial.report">
<field name="name">Cash Out</field>
<field name="parent_id" ref="account_financial_report_investing_activity0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">accounts</field>
</record>
<record id="account_financial_report_financing_activity1" model="account.financial.report">
<field name="name">Financing Activities</field>
<field name="sequence">3</field>
<field name="parent_id" ref="account_financial_report_cash_flow0"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">sum</field>
</record>
<record id="cash_in_financial0" model="account.financial.report">
<field name="name">Cash In</field>
<field name="parent_id" ref="account_financial_report_financing_activity1"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">accounts</field>
</record>
<record id="cash_out_financial1" model="account.financial.report">
<field name="name">Cash Out</field>
<field name="parent_id" ref="account_financial_report_financing_activity1"/>
<field name="display_detail">detail_with_hierarchy</field>
<field name="type">accounts</field>
</record>
</data>
</odoo>

13
base_accounting_kit/data/followup_levels.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Data file for the follow-up lines-->
<record model="followup.line" id="followup_line_id" >
<field name="name">Reminder</field>
<field name="delay">5</field>
</record>
<record model="account.followup" id="followup">
<field name="followup_line_ids" eval="[(6,0,[ref('followup_line_id')])]"/>
</record>
</data>
</odoo>

9
base_accounting_kit/data/multiple_invoice_data.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Data file for the Multiple Invoice-->
<record id="multiple_invoice_sample_name" model="multiple.invoice">
<field name="copy_name">Sample Name</field>
</record>
</data>
</odoo>

16
base_accounting_kit/data/recurring_entry_cron.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding='UTF-8'?>
<odoo>
<data noupdate="1">
<!-- The schedular action for Recurring Entries-->
<record id="recurring_template_cron" model="ir.cron">
<field name="name">Generate Recurring Entries</field>
<field name="model_id" ref="model_account_recurring_payments"/>
<field name="state">code</field>
<field name="code">model._cron_generate_entries()</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False"/>
</record>
</data>
</odoo>

7
base_accounting_kit/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <base_accounting_kit>
#### 06.11.2022
#### Version 16.0.1.0.0
#### ADD
- Initial commit for Odoo 17 Full Accounting Kit

4132
base_accounting_kit/i18n/ar_001.po

File diff suppressed because it is too large

4132
base_accounting_kit/i18n/de_CH.po

File diff suppressed because it is too large

4132
base_accounting_kit/i18n/es_AR.po

File diff suppressed because it is too large

4132
base_accounting_kit/i18n/fr_BE.po

File diff suppressed because it is too large

4132
base_accounting_kit/i18n/uk_UA.po

File diff suppressed because it is too large

4171
base_accounting_kit/i18n/zh_CN.po

File diff suppressed because it is too large

4130
base_accounting_kit/i18n/zh_HK.po

File diff suppressed because it is too large

37
base_accounting_kit/models/__init__.py

@ -0,0 +1,37 @@
#############################################################################
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import account_account
from . import account_asset
from . import account_followup
from . import account_journal
from . import account_move
from . import credit_limit
from . import product_template
from . import res_config_settings
from . import res_partner
from . import multiple_invoice
from . import multiple_invoice_layout
from . import recurring_payments
from . import account_payment
from . import res_company

169
base_accounting_kit/models/account_account.py

@ -0,0 +1,169 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
from odoo.tools.misc import get_lang
class CashFlow(models.Model):
"""Inherits the account.account model to add additional functionality and
fields to the account"""
_inherit = 'account.account'
def get_cash_flow_ids(self):
"""Returns a list of cashflows for the account"""
cash_flow_id = self.env.ref('base_accounting_kit.account_financial_report_cash_flow0')
if cash_flow_id:
return [('parent_id.id', '=', cash_flow_id.id)]
cash_flow_type = fields.Many2one('account.financial.report', string="Cash Flow type", domain=get_cash_flow_ids)
@api.onchange('cash_flow_type')
def onchange_cash_flow_type(self):
"""Onchange the cash flow type of the account that will be updating
the account_ids values"""
for rec in self.cash_flow_type:
# update new record
rec.write({
'account_ids': [(4, self._origin.id)]
})
if self._origin.cash_flow_type.ids:
for rec in self._origin.cash_flow_type:
# remove old record
rec.write({'account_ids': [(3, self._origin.id)]})
class AccountCommonReport(models.Model):
"""Inherits the Account report model to add special fields and functions"""
_inherit = "account.report"
_description = "Account Common Report"
company_id = fields.Many2one('res.company', string='Company',
required=True, readonly=True,
default=lambda self: self.env.company)
journal_ids = fields.Many2many(
comodel_name='account.journal',
string='Journals',
required=True,
default=lambda self: self.env['account.journal'].search([('company_id', '=', self.company_id.id)]),
domain="[('company_id', '=', company_id)]")
date_from = fields.Date(string='Start Date')
date_to = fields.Date(string='End Date')
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries'),
], string='Target Moves',
required=True, default='posted')
@api.onchange('company_id')
def _onchange_company_id(self):
"""Onchange function based on the company and updated the journals"""
if self.company_id:
self.journal_ids = self.env['account.journal'].search(
[('company_id', '=', self.company_id.id)])
else:
self.journal_ids = self.env['account.journal'].search([])
def _build_contexts(self, data):
"""Builds the context information for the given data"""
result = {}
result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
result['date_from'] = data['form']['date_from'] or False
result['date_to'] = data['form']['date_to'] or False
result['strict_range'] = True if result['date_from'] else False
result['company_id'] = data['form']['company_id'][0] or False
return result
def _print_report(self, data):
"""Raise an error if the report comes checked """
raise NotImplementedError()
def check_report(self):
"""Function to check if the report comes active models and related
values"""
self.ensure_one()
data = {}
data['ids'] = self.env.context.get('active_ids', [])
data['model'] = self.env.context.get('active_model', 'ir.ui.menu')
data['form'] = self.read(['date_from', 'date_to', 'journal_ids', 'target_move', 'company_id'])[0]
used_context = self._build_contexts(data)
data['form']['used_context'] = dict(used_context, lang=get_lang(self.env).code)
return self.with_context(discard_logo_check=True)._print_report(data)
class AccountCommonJournalReport(models.TransientModel):
"""Model used for creating the common journal report"""
_name = 'account.common.journal.report'
_description = 'Common Journal Report'
_inherit = "account.report"
section_main_report_ids = fields.Many2many(string="Section Of",
comodel_name='account.report',
relation="account_common_journal_report_section_rel",
column1="sub_report_id",
column2="main_report_id")
section_report_ids = fields.Many2many(string="Sections",
comodel_name='account.report',
relation="account_common_journal_report_section_rel",
column1="main_report_id",
column2="sub_report_id")
amount_currency = fields.Boolean(
'With Currency',
help="Print Report with the currency column if the currency differs "
"from the company currency.")
company_id = fields.Many2one('res.company', string='Company',
required=True, readonly=True,
default=lambda self: self.env.company)
date_from = fields.Date(string='Start Date')
date_to = fields.Date(string='End Date')
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries'),
], string='Target Moves',
required=True, default='posted')
def pre_print_report(self, data):
"""Pre-print the given data and that updates the amount
amount_currency value"""
data['form'].update({'amount_currency': self.amount_currency})
return data
def check_report(self):
"""Function to check if the report comes active models and related
values"""
self.ensure_one()
data = {}
data['ids'] = self.env.context.get('active_ids', [])
data['model'] = self.env.context.get('active_model', 'ir.ui.menu')
data['form'] = self.read(['date_from', 'date_to', 'journal_ids', 'target_move', 'company_id'])[0]
used_context = self._build_contexts(data)
data['form']['used_context'] = dict(used_context, lang=get_lang(self.env).code)
return self.with_context(discard_logo_check=True)._print_report(data)
def _build_contexts(self, data):
"""Builds the context information for the given data"""
result = {}
result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
result['state'] = 'target_move' in data['form'] and data['form']['target_move'] or ''
result['date_from'] = data['form']['date_from'] or False
result['date_to'] = data['form']['date_to'] or False
result['strict_range'] = True if result['date_from'] else False
result['company_id'] = data['form']['company_id'][0] or False
return result

813
base_accounting_kit/models/account_asset.py

@ -0,0 +1,813 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import calendar
from datetime import date, datetime
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF
from odoo.tools import float_compare, float_is_zero
class AccountAssetCategory(models.Model):
_name = 'account.asset.category'
_description = 'Asset category'
active = fields.Boolean(default=True)
name = fields.Char(required=True, index=True, string="Asset Type")
company_id = fields.Many2one('res.company', string='Company',
required=True,
default=lambda self: self.env.company)
price = fields.Monetary(string='Price', required=True)
currency_id = fields.Many2one("res.currency",
default=lambda self: self.env[
'res.currency'].search(
[('name', '=', 'USD')]).id,
readonly=True, hide=True)
account_analytic_id = fields.Many2one('account.analytic.account',
string='Analytic Account',
domain="[('company_id', '=', company_id)]")
account_asset_id = fields.Many2one('account.account',
string='Asset Account', required=True,
domain="[('account_type', '!=', 'asset_receivable'),('account_type', '!=', 'liability_payable'),('account_type', '!=', 'asset_cash'),('account_type', '!=', 'liability_credit_card'),('deprecated', '=', False)]",
help="Account used to record the purchase of the asset at its original price.")
account_depreciation_id = fields.Many2one(
'account.account', string='Depreciation Account',
required=True,
domain="[('account_type', '!=', 'asset_receivable'),('account_type', '!=', 'liability_payable'),('account_type', '!=', 'asset_cash'),('account_type', '!=', 'liability_credit_card'),('deprecated', '=', False),('company_id', '=', company_id)]",
help="Account used in the depreciation entries, to decrease the asset value.")
account_depreciation_expense_id = fields.Many2one(
'account.account', string='Expense Account',
required=True,
domain="[('account_type', '!=', 'asset_receivable'),('account_type', '!=','liability_payable'),('account_type', '!=', 'asset_cash'),('account_type', '!=','liability_credit_card'),('deprecated', '=', False),('company_id', '=', company_id)]",
help="Account used in the periodical entries, to record a part of the asset as expense.")
journal_id = fields.Many2one('account.journal', string='Journal',
required=True)
method = fields.Selection(
[('linear', 'Linear'), ('degressive', 'Degressive')],
string='Computation Method', required=True, default='linear',
help="Choose the method to use to compute the amount of depreciation lines.\n"
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n"
" * Degressive: Calculated on basis of: Residual Value * Degressive Factor")
method_number = fields.Integer(string='Number of Depreciations', default=5,
help="The number of depreciations needed to depreciate your asset")
method_period = fields.Integer(string='Period Length', default=1,
help="State here the time between 2 depreciations, in months",
required=True)
method_progress_factor = fields.Float('Degressive Factor', default=0.3)
method_time = fields.Selection(
[('number', 'Number of Entries'), ('end', 'Ending Date')],
string='Time Method', required=True, default='number',
help="Choose the method to use to compute the dates and number of entries.\n"
" * Number of Entries: Fix the number of entries and the time between 2 depreciations.\n"
" * Ending Date: Choose the time between 2 depreciations and the date the depreciations won't go beyond.")
method_end = fields.Date('Ending date')
prorata = fields.Boolean(string='Prorata Temporis',
help='Indicates that the first depreciation entry for this asset have to be done from the purchase date instead of the first of January')
open_asset = fields.Boolean(string='Auto-confirm Assets',
help="Check this if you want to automatically confirm the assets of this category when created by invoices.")
group_entries = fields.Boolean(string='Group Journal Entries',
help="Check this if you want to group the generated entries by categories.")
type = fields.Selection([('sale', 'Sale: Revenue Recognition'),
('purchase', 'Purchase: Asset')], required=True,
index=True, default='purchase')
@api.onchange('account_asset_id')
def onchange_account_asset(self):
if self.type == "purchase":
self.account_depreciation_id = self.account_asset_id
elif self.type == "sale":
self.account_depreciation_expense_id = self.account_asset_id
@api.onchange('type')
def onchange_type(self):
if self.type == 'sale':
self.prorata = True
self.method_period = 1
else:
self.method_period = 12
@api.onchange('method_time')
def _onchange_method_time(self):
if self.method_time != 'number':
self.prorata = False
class AccountAssetAsset(models.Model):
_name = 'account.asset.asset'
_description = 'Asset/Revenue Recognition'
_inherit = ['mail.thread']
entry_count = fields.Integer(compute='_entry_count',
string='# Asset Entries')
name = fields.Char(string='Asset Name', required=True, readonly=True)
code = fields.Char(string='Reference', size=32, readonly=True)
value = fields.Float(string='Gross Value', required=True, readonly=True,
digits=0)
currency_id = fields.Many2one('res.currency', string='Currency',
required=True, readonly=True,
default=lambda self: self.env.company.currency_id.id)
company_id = fields.Many2one('res.company', string='Company',
required=True, readonly=True,
default=lambda self: self.env.company)
note = fields.Text()
category_id = fields.Many2one('account.asset.category', string='Category',
required=True, change_default=True,
readonly=True,)
date = fields.Date(string='Date', required=True, readonly=True,
default=fields.Date.context_today)
state = fields.Selection(
[('draft', 'Draft'), ('open', 'Running'), ('close', 'Close')],
'Status', required=True, copy=False, default='draft',
help="When an asset is created, the status is 'Draft'.\n"
"If the asset is confirmed, the status goes in 'Running' and the depreciation lines can be posted in the accounting.\n"
"You can manually close an asset when the depreciation is over. If the last line of depreciation is posted, the asset automatically goes in that status.")
active = fields.Boolean(default=True)
partner_id = fields.Many2one('res.partner', string='Partner',
readonly=True)
method = fields.Selection(
[('linear', 'Linear'), ('degressive', 'Degressive')],
string='Computation Method', required=True, readonly=True, default='linear',
help="Choose the method to use to compute the amount of depreciation lines.\n * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n"
" * Degressive: Calculated on basis of: Residual Value * Degressive Factor")
method_number = fields.Integer(string='Number of Depreciations',
readonly=True,
default=5,
help="The number of depreciations needed to depreciate your asset")
method_period = fields.Integer(string='Number of Months in a Period',
required=True, readonly=True, default=12,
help="The amount of time between two depreciations, in months")
method_end = fields.Date(string='Ending Date', readonly=True,)
method_progress_factor = fields.Float(string='Degressive Factor',
readonly=True, default=0.3,)
value_residual = fields.Float(compute='_amount_residual',
digits=0, string='Residual Value')
method_time = fields.Selection(
[('number', 'Number of Entries'), ('end', 'Ending Date')],
string='Time Method', required=True, readonly=True, default='number',
help="Choose the method to use to compute the dates and number of entries.\n"
" * Number of Entries: Fix the number of entries and the time between 2 depreciations.\n"
" * Ending Date: Choose the time between 2 depreciations and the date the depreciations won't go beyond.")
prorata = fields.Boolean(string='Prorata Temporis', readonly=True,
help='Indicates that the first depreciation entry for this asset have to be done from the purchase date instead of the first January / Start date of fiscal year')
depreciation_line_ids = fields.One2many('account.asset.depreciation.line',
'asset_id',
string='Depreciation Lines',
readonly=True,)
salvage_value = fields.Float(string='Salvage Value', digits=0,
readonly=True,
help="It is the amount you plan to have that you cannot depreciate.")
invoice_id = fields.Many2one('account.move', string='Invoice',
copy=False)
type = fields.Selection(related="category_id.type", string='Type',
required=True)
def unlink(self):
for asset in self:
if asset.state in ['open', 'close']:
raise UserError(
_('You cannot delete a document is in %s state.') % (
asset.state,))
for depreciation_line in asset.depreciation_line_ids:
if depreciation_line.move_id:
raise UserError(_(
'You cannot delete a document that contains posted entries.'))
return super(AccountAssetAsset, self).unlink()
def _get_last_depreciation_date(self):
"""
@param id: ids of a account.asset.asset objects
@return: Returns a dictionary of the effective dates of the last depreciation entry made for given asset ids. If there isn't any, return the purchase date of this asset
"""
self.env.cr.execute("""
SELECT a.id as id, COALESCE(MAX(m.date),a.date) AS date
FROM account_asset_asset a
LEFT JOIN account_asset_depreciation_line rel ON (rel.asset_id = a.id)
LEFT JOIN account_move m ON (rel.move_id = m.id)
WHERE a.id IN %s
GROUP BY a.id, m.date """, (tuple(self.ids),))
result = dict(self.env.cr.fetchall())
return result
# @api.model
# def _cron_generate_entries(self):
# self.compute_generated_entries(datetime.today())
@api.onchange('category_id')
def gross_value(self):
self.value = self.category_id.price
@api.model
def compute_generated_entries(self, date, asset_type=None):
# Entries generated : one by grouped category and one by asset from ungrouped category
created_move_ids = []
type_domain = []
if asset_type:
type_domain = [('type', '=', asset_type)]
ungrouped_assets = self.env['account.asset.asset'].search(
type_domain + [('state', '=', 'open'),
('category_id.group_entries', '=', False)])
created_move_ids += ungrouped_assets._compute_entries(date,
group_entries=False)
for grouped_category in self.env['account.asset.category'].search(
type_domain + [('group_entries', '=', True)]):
assets = self.env['account.asset.asset'].search(
[('state', '=', 'open'),
('category_id', '=', grouped_category.id)])
created_move_ids += assets._compute_entries(date,
group_entries=True)
return created_move_ids
def _compute_board_amount(self, sequence, residual_amount, amount_to_depr,
undone_dotation_number,
posted_depreciation_line_ids, total_days,
depreciation_date):
amount = 0
if sequence == undone_dotation_number:
amount = residual_amount
else:
if self.method == 'linear':
amount = amount_to_depr / (undone_dotation_number - len(
posted_depreciation_line_ids))
if self.prorata:
amount = amount_to_depr / self.method_number
if sequence == 1:
if self.method_period % 12 != 0:
date = datetime.strptime(str(self.date),
'%Y-%m-%d')
month_days = \
calendar.monthrange(date.year, date.month)[1]
days = month_days - date.day + 1
amount = (
amount_to_depr / self.method_number) / month_days * days
else:
days = (self.company_id.compute_fiscalyear_dates(
depreciation_date)[
'date_to'] - depreciation_date).days + 1
amount = (
amount_to_depr / self.method_number) / total_days * days
elif self.method == 'degressive':
amount = residual_amount * self.method_progress_factor
if self.prorata:
if sequence == 1:
if self.method_period % 12 != 0:
date = datetime.strptime(str(self.date),
'%Y-%m-%d')
month_days = \
calendar.monthrange(date.year, date.month)[1]
days = month_days - date.day + 1
amount = (
residual_amount * self.method_progress_factor) / month_days * days
else:
days = (self.company_id.compute_fiscalyear_dates(
depreciation_date)[
'date_to'] - depreciation_date).days + 1
amount = (
residual_amount * self.method_progress_factor) / total_days * days
return amount
def _compute_board_undone_dotation_nb(self, depreciation_date, total_days):
undone_dotation_number = self.method_number
if self.method_time == 'end':
end_date = datetime.strptime(str(self.method_end), DF).date()
undone_dotation_number = 0
while depreciation_date <= end_date:
depreciation_date = date(depreciation_date.year,
depreciation_date.month,
depreciation_date.day) + relativedelta(
months=+self.method_period)
undone_dotation_number += 1
if self.prorata:
undone_dotation_number += 1
return undone_dotation_number
def compute_depreciation_board(self):
self.ensure_one()
posted_depreciation_line_ids = self.depreciation_line_ids.filtered(
lambda x: x.move_check).sorted(key=lambda l: l.depreciation_date)
unposted_depreciation_line_ids = self.depreciation_line_ids.filtered(
lambda x: not x.move_check)
# Remove old unposted depreciation lines. We cannot use unlink() with One2many field
commands = [(2, line_id.id, False) for line_id in
unposted_depreciation_line_ids]
if self.value_residual != 0.0:
amount_to_depr = residual_amount = self.value_residual
if self.prorata:
# if we already have some previous validated entries, starting date is last entry + method perio
if posted_depreciation_line_ids and \
posted_depreciation_line_ids[-1].depreciation_date:
last_depreciation_date = datetime.strptime(
posted_depreciation_line_ids[-1].depreciation_date,
DF).date()
depreciation_date = last_depreciation_date + relativedelta(
months=+self.method_period)
else:
depreciation_date = datetime.strptime(
str(self._get_last_depreciation_date()[self.id]),
DF).date()
else:
# depreciation_date = 1st of January of purchase year if annual valuation, 1st of
# purchase month in other cases
if self.method_period >= 12:
if self.company_id.fiscalyear_last_month:
asset_date = date(year=int(self.date.year),
month=int(
self.company_id.fiscalyear_last_month),
day=int(
self.company_id.fiscalyear_last_day)) + relativedelta(
days=1) + \
relativedelta(year=int(
self.date.year)) # e.g. 2018-12-31 +1 -> 2019
else:
asset_date = datetime.strptime(
str(self.date)[:4] + '-01-01', DF).date()
else:
asset_date = datetime.strptime(str(self.date)[:7] + '-01',
DF).date()
# if we already have some previous validated entries, starting date isn't 1st January but last entry + method period
if posted_depreciation_line_ids and \
posted_depreciation_line_ids[-1].depreciation_date:
last_depreciation_date = datetime.strptime(str(
posted_depreciation_line_ids[-1].depreciation_date),
DF).date()
depreciation_date = last_depreciation_date + relativedelta(
months=+self.method_period)
else:
depreciation_date = asset_date
day = depreciation_date.day
month = depreciation_date.month
year = depreciation_date.year
total_days = (year % 4) and 365 or 366
undone_dotation_number = self._compute_board_undone_dotation_nb(
depreciation_date, total_days)
for x in range(len(posted_depreciation_line_ids),
undone_dotation_number):
sequence = x + 1
amount = self._compute_board_amount(sequence, residual_amount,
amount_to_depr,
undone_dotation_number,
posted_depreciation_line_ids,
total_days,
depreciation_date)
amount = self.currency_id.round(amount)
if float_is_zero(amount,
precision_rounding=self.currency_id.rounding):
continue
residual_amount -= amount
vals = {
'amount': amount,
'asset_id': self.id,
'sequence': sequence,
'name': (self.code or '') + '/' + str(sequence),
'remaining_value': residual_amount if residual_amount >= 0 else 0.0,
'depreciated_value': self.value - (
self.salvage_value + residual_amount),
'depreciation_date': depreciation_date.strftime(DF),
}
commands.append((0, False, vals))
# Considering Depr. Period as months
depreciation_date = date(year, month, day) + relativedelta(
months=+self.method_period)
day = depreciation_date.day
month = depreciation_date.month
year = depreciation_date.year
self.write({'depreciation_line_ids': commands})
return True
def validate(self):
self.write({'state': 'open'})
fields = [
'method',
'method_number',
'method_period',
'method_end',
'method_progress_factor',
'method_time',
'salvage_value',
'invoice_id',
]
ref_tracked_fields = self.env['account.asset.asset'].fields_get(fields)
for asset in self:
tracked_fields = ref_tracked_fields.copy()
if asset.method == 'linear':
del (tracked_fields['method_progress_factor'])
if asset.method_time != 'end':
del (tracked_fields['method_end'])
else:
del (tracked_fields['method_number'])
dummy, tracking_value_ids = asset._mail_track(tracked_fields,
dict.fromkeys(
fields))
asset.message_post(subject=_('Asset created'),
tracking_value_ids=tracking_value_ids)
def _get_disposal_moves(self):
move_ids = []
for asset in self:
unposted_depreciation_line_ids = asset.depreciation_line_ids.filtered(
lambda x: not x.move_check)
if unposted_depreciation_line_ids:
old_values = {
'method_end': asset.method_end,
'method_number': asset.method_number,
}
# Remove all unposted depr. lines
commands = [(2, line_id.id, False) for line_id in
unposted_depreciation_line_ids]
# Create a new depr. line with the residual amount and post it
sequence = len(asset.depreciation_line_ids) - len(
unposted_depreciation_line_ids) + 1
today = datetime.today().strftime(DF)
vals = {
'amount': asset.value_residual,
'asset_id': asset.id,
'sequence': sequence,
'name': (asset.code or '') + '/' + str(sequence),
'remaining_value': 0,
'depreciated_value': asset.value - asset.salvage_value,
# the asset is completely depreciated
'depreciation_date': today,
}
commands.append((0, False, vals))
asset.write(
{'depreciation_line_ids': commands, 'method_end': today,
'method_number': sequence})
tracked_fields = self.env['account.asset.asset'].fields_get(
['method_number', 'method_end'])
changes, tracking_value_ids = asset._mail_track(
tracked_fields, old_values)
if changes:
asset.message_post(subject=_(
'Asset sold or disposed. Accounting entry awaiting for validation.'),
tracking_value_ids=tracking_value_ids)
move_ids += asset.depreciation_line_ids[-1].create_move(
post_move=False)
return move_ids
def set_to_close(self):
move_ids = self._get_disposal_moves()
if move_ids:
name = _('Disposal Move')
view_mode = 'form'
if len(move_ids) > 1:
name = _('Disposal Moves')
view_mode = 'tree,form'
return {
'name': name,
'view_mode': view_mode,
'res_model': 'account.move',
'type': 'ir.actions.act_window',
'target': 'current',
'res_id': move_ids[0],
}
# Fallback, as if we just clicked on the smartbutton
return self.open_entries()
def set_to_draft(self):
self.write({'state': 'draft'})
@api.depends('value', 'salvage_value', 'depreciation_line_ids.move_check',
'depreciation_line_ids.amount')
def _amount_residual(self):
for record in self:
total_amount = 0.0
for line in record.depreciation_line_ids:
if line.move_check:
total_amount += line.amount
record.value_residual = record.value - total_amount - record.salvage_value
@api.onchange('company_id')
def onchange_company_id(self):
self.currency_id = self.company_id.currency_id.id
@api.depends('depreciation_line_ids.move_id')
def _entry_count(self):
for asset in self:
res = self.env['account.asset.depreciation.line'].search_count(
[('asset_id', '=', asset.id), ('move_id', '!=', False)])
asset.entry_count = res or 0
@api.constrains('prorata', 'method_time')
def _check_prorata(self):
if self.prorata and self.method_time != 'number':
raise ValidationError(_(
'Prorata temporis can be applied only for time method "number of depreciations".'))
@api.onchange('category_id')
def onchange_category_id(self):
vals = self.onchange_category_id_values(self.category_id.id)
# We cannot use 'write' on an object that doesn't exist yet
if vals:
for k, v in vals['value'].items():
setattr(self, k, v)
def onchange_category_id_values(self, category_id):
if category_id:
category = self.env['account.asset.category'].browse(category_id)
return {
'value': {
'method': category.method,
'method_number': category.method_number,
'method_time': category.method_time,
'method_period': category.method_period,
'method_progress_factor': category.method_progress_factor,
'method_end': category.method_end,
'prorata': category.prorata,
}
}
@api.onchange('method_time')
def onchange_method_time(self):
if self.method_time != 'number':
self.prorata = False
def copy_data(self, default=None):
if default is None:
default = {}
default['name'] = self.name + _(' (copy)')
return super(AccountAssetAsset, self).copy_data(default)
def _compute_entries(self, date, group_entries=False):
depreciation_ids = self.env['account.asset.depreciation.line'].search([
('asset_id', 'in', self.ids), ('depreciation_date', '<=', date),
('move_check', '=', False)])
if group_entries:
return depreciation_ids.create_grouped_move()
return depreciation_ids.create_move()
@api.model
def create(self, vals):
asset = super(AccountAssetAsset,
self.with_context(mail_create_nolog=True)).create(vals)
asset.sudo().compute_depreciation_board()
return asset
def write(self, vals):
res = super(AccountAssetAsset, self).write(vals)
if 'depreciation_line_ids' not in vals and 'state' not in vals:
for rec in self:
rec.compute_depreciation_board()
return res
def open_entries(self):
move_ids = []
for asset in self:
for depreciation_line in asset.depreciation_line_ids:
if depreciation_line.move_id:
move_ids.append(depreciation_line.move_id.id)
return {
'name': _('Journal Entries'),
'view_mode': 'tree,form',
'res_model': 'account.move',
'view_id': False,
'type': 'ir.actions.act_window',
'domain': [('id', 'in', move_ids)],
}
class AccountAssetDepreciationLine(models.Model):
_name = 'account.asset.depreciation.line'
_description = 'Asset depreciation line'
name = fields.Char(string='Depreciation Name', required=True, index=True)
sequence = fields.Integer(required=True)
asset_id = fields.Many2one('account.asset.asset', string='Asset',
required=True, ondelete='cascade')
parent_state = fields.Selection(related='asset_id.state',
string='State of Asset')
amount = fields.Float(string='Current Depreciation',
required=True)
remaining_value = fields.Float(string='Next Period Depreciation',
required=True)
depreciated_value = fields.Float(string='Cumulative Depreciation',
required=True)
depreciation_date = fields.Date('Depreciation Date', index=True)
move_id = fields.Many2one('account.move', string='Depreciation Entry')
move_check = fields.Boolean(compute='_get_move_check', string='Linked',
store=True)
move_posted_check = fields.Boolean(compute='_get_move_posted_check',
string='Posted', store=True)
@api.depends('move_id')
def _get_move_check(self):
for line in self:
line.move_check = bool(line.move_id)
@api.depends('move_id.state')
def _get_move_posted_check(self):
for line in self:
line.move_posted_check = True if line.move_id and line.move_id.state == 'posted' else False
def create_move(self, post_move=True):
created_moves = self.env['account.move']
prec = self.env['decimal.precision'].precision_get('Account')
if self.mapped('move_id'):
raise UserError(_(
'This depreciation is already linked to a journal entry! Please post or delete it.'))
for line in self:
category_id = line.asset_id.category_id
depreciation_date = self.env.context.get(
'depreciation_date') or line.depreciation_date or fields.Date.context_today(
self)
company_currency = line.asset_id.company_id.currency_id
current_currency = line.asset_id.currency_id
amount = current_currency.with_context(
date=depreciation_date).compute(line.amount, company_currency)
asset_name = line.asset_id.name + ' (%s/%s)' % (line.sequence, len(line.asset_id.depreciation_line_ids))
partner = self.env['res.partner']._find_accounting_partner(line.asset_id.partner_id)
move_line_1 = {
'name': asset_name,
'account_id': category_id.account_depreciation_id.id,
'debit': 0.0 if float_compare(amount, 0.0,
precision_digits=prec) > 0 else -amount,
'credit': amount if float_compare(amount, 0.0,
precision_digits=prec) > 0 else 0.0,
'journal_id': category_id.journal_id.id,
'partner_id': partner.id,
# 'analytic_account_id': category_id.account_analytic_id.id if category_id.type == 'sale' else False,
'currency_id': company_currency != current_currency and current_currency.id or company_currency.id,
'amount_currency': company_currency != current_currency and - 1.0 * line.amount or 0.0,
}
move_line_2 = {
'name': asset_name,
'account_id': category_id.account_depreciation_expense_id.id,
'credit': 0.0 if float_compare(amount, 0.0,
precision_digits=prec) > 0 else -amount,
'debit': amount if float_compare(amount, 0.0,
precision_digits=prec) > 0 else 0.0,
'journal_id': category_id.journal_id.id,
'partner_id': partner.id,
# 'analytic_account_id': category_id.account_analytic_id.id if category_id.type == 'purchase' else False,
'currency_id': company_currency != current_currency and current_currency.id or company_currency.id,
'amount_currency': company_currency != current_currency and line.amount or 0.0,
}
line_ids = [(0, 0, {
'account_id': category_id.account_depreciation_id.id,
'partner_id': partner.id,
'credit': amount if float_compare(amount, 0.0,
precision_digits=prec) > 0 else 0.0,
}), (0, 0, {
'account_id': category_id.account_depreciation_expense_id.id,
'partner_id': partner.id,
'debit': amount if float_compare(amount, 0.0,
precision_digits=prec) > 0 else 0.0,
})]
move = self.env['account.move'].create({
'ref': line.asset_id.code,
'date': depreciation_date or False,
'journal_id': category_id.journal_id.id,
'line_ids': line_ids,
})
for move_line in move.line_ids:
if move_line.account_id.id == move_line_1['account_id']:
move_line.write({'credit': move_line_1['credit'],
'debit': move_line_1['debit']})
elif move_line.account_id.id == move_line_2['account_id']:
move_line.write({'debit': move_line_2['debit'],
'credit': move_line_2['credit']})
if move.line_ids.filtered(
lambda x: x.name == 'Automatic Balancing Line'):
move.line_ids.filtered(
lambda x: x.name == 'Automatic Balancing Line').unlink()
line.write({'move_id': move.id, 'move_check': True})
created_moves |= move
if post_move and created_moves:
created_moves.filtered(lambda m: any(
m.asset_depreciation_ids.mapped(
'asset_id.category_id.open_asset'))).post()
return [x.id for x in created_moves]
def create_grouped_move(self, post_move=True):
if not self.exists():
return []
created_moves = self.env['account.move']
category_id = self[
0].asset_id.category_id # we can suppose that all lines have the same category
depreciation_date = self.env.context.get(
'depreciation_date') or fields.Date.context_today(self)
amount = 0.0
for line in self:
# Sum amount of all depreciation lines
company_currency = line.asset_id.company_id.currency_id
current_currency = line.asset_id.currency_id
amount += current_currency.compute(line.amount, company_currency)
name = category_id.name + _(' (grouped)')
move_line_1 = {
'name': name,
'account_id': category_id.account_depreciation_id.id,
'debit': 0.0,
'credit': amount,
'journal_id': category_id.journal_id.id,
'analytic_account_id': category_id.account_analytic_id.id if category_id.type == 'sale' else False,
}
move_line_2 = {
'name': name,
'account_id': category_id.account_depreciation_expense_id.id,
'credit': 0.0,
'debit': amount,
'journal_id': category_id.journal_id.id,
'analytic_account_id': category_id.account_analytic_id.id if category_id.type == 'purchase' else False,
}
move_vals = {
'ref': category_id.name,
'date': depreciation_date or False,
'journal_id': category_id.journal_id.id,
'line_ids': [(0, 0, move_line_1), (0, 0, move_line_2)],
}
move = self.env['account.move'].create(move_vals)
self.write({'move_id': move.id, 'move_check': True})
created_moves |= move
if post_move and created_moves:
self.post_lines_and_close_asset()
created_moves.post()
return [x.id for x in created_moves]
def post_lines_and_close_asset(self):
# we re-evaluate the assets to determine whether we can close them
# `message_post` invalidates the (whole) cache
# preprocess the assets and lines in which a message should be posted,
# and then post in batch will prevent the re-fetch of the same data over and over.
assets_to_close = self.env['account.asset.asset']
for line in self:
asset = line.asset_id
if asset.currency_id.is_zero(asset.value_residual):
assets_to_close |= asset
self.log_message_when_posted()
assets_to_close.write({'state': 'close'})
for asset in assets_to_close:
asset.message_post(body=_("Document closed."))
def log_message_when_posted(self):
def _format_message(message_description, tracked_values):
message = ''
if message_description:
message = '<span>%s</span>' % message_description
for name, values in tracked_values.items():
message += '<div> &nbsp; &nbsp; &bull; <b>%s</b>: ' % name
message += '%s</div>' % values
return message
# `message_post` invalidates the (whole) cache
# preprocess the assets in which messages should be posted,
# and then post in batch will prevent the re-fetch of the same data over and over.
assets_to_post = {}
for line in self:
if line.move_id and line.move_id.state == 'draft':
partner_name = line.asset_id.partner_id.name
currency_name = line.asset_id.currency_id.name
msg_values = {_('Currency'): currency_name,
_('Amount'): line.amount}
if partner_name:
msg_values[_('Partner')] = partner_name
msg = _format_message(_('Depreciation line posted.'),
msg_values)
assets_to_post.setdefault(line.asset_id, []).append(msg)
for asset, messages in assets_to_post.items():
for msg in messages:
asset.message_post(body=msg)
def unlink(self):
for record in self:
if record.move_check:
if record.asset_id.category_id.type == 'purchase':
msg = _("You cannot delete posted depreciation lines.")
else:
msg = _("You cannot delete posted installment lines.")
raise UserError(msg)
return super(AccountAssetDepreciationLine, self).unlink()

51
base_accounting_kit/models/account_followup.py

@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class Followup(models.Model):
_name = 'account.followup'
_description = 'Account Follow-up'
_rec_name = 'name'
followup_line_ids = fields.One2many('followup.line', 'followup_id',
'Follow-up', copy=True)
company_id = fields.Many2one('res.company', 'Company',
default=lambda self: self.env.company)
name = fields.Char(related='company_id.name', readonly=True)
class FollowupLine(models.Model):
_name = 'followup.line'
_description = 'Follow-up Criteria'
_order = 'delay'
name = fields.Char('Follow-Up Action', required=True, translate=True)
sequence = fields.Integer(
help="Gives the sequence order when displaying a list of follow-up lines.")
delay = fields.Integer('Due Days', required=True,
help="The number of days after the due date of the invoice"
" to wait before sending the reminder."
" Could be negative if you want to send a polite alert beforehand.")
followup_id = fields.Many2one('account.followup', 'Follow Ups',
ondelete="cascade")

89
base_accounting_kit/models/account_journal.py

@ -0,0 +1,89 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, _
class AccountJournal(models.Model):
"""Module inherited for adding the reconcile method in the account
journal"""
_inherit = "account.journal"
# def action_open_reconcile(self):
# self.ensure_one()
#
# if self.type in ('bank', 'cash'):
# return self.env['account.bank.statement.line']._action_open_bank_reconciliation_widget(
# default_context={
# 'default_journal_id': self.id,
# 'search_default_journal_id': self.id,
# 'search_default_not_matched': True,
# },
# )
# else:
# # Open reconciliation view for customers/suppliers
# action_context = {'show_mode_selector': False, 'company_ids': self.mapped('company_id').ids}
# if self.type == 'sale':
# action_context.update({'mode': 'customers'})
# elif self.type == 'purchase':
# action_context.update({'mode': 'suppliers'})
# return {
# 'type': 'ir.actions.client',
# 'tag': 'manual_reconciliation_view',
# 'context': action_context,
# }
def action_open_reconcile(self):
"""Function to open reconciliation view for bank statements
belonging to this journal"""
if self.type in ['bank', 'cash']:
# Open reconciliation view for bank statements belonging
# to this journal
bank_stmt = self.env['account.bank.statement'].search(
[('journal_id', 'in', self.ids)]).mapped('line_ids')
return {
'type': 'ir.actions.client',
'tag': 'bank_statement_reconciliation_view',
'context': {'statement_line_ids': bank_stmt.ids,
'company_ids': self.mapped('company_id').ids},
}
else:
# Open reconciliation view for customers/suppliers
action_context = {'show_mode_selector': False,
'company_ids': self.mapped('company_id').ids}
if self.type == 'sale':
action_context.update({'mode': 'customers'})
elif self.type == 'purchase':
action_context.update({'mode': 'suppliers'})
return {
'type': 'ir.actions.client',
'tag': 'manual_reconciliation_view',
'context': action_context,
}
def create_cash_statement(self):
"""for redirecting in to bank statement lines"""
return {
'name': _("Statements"),
'type': 'ir.actions.act_window',
'res_model': 'account.bank.statement.line',
'view_mode': 'list,form',
'context': {'default_journal_id': self.id},
}

266
base_accounting_kit/models/account_move.py

@ -0,0 +1,266 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import datetime
import ast
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF
class AccountMove(models.Model):
"""Inherits from the account.move model for adding the depreciation
field to the account"""
_inherit = 'account.move'
asset_depreciation_ids = fields.One2many('account.asset.depreciation.line',
'move_id',
string='Assets Depreciation Lines')
def button_cancel(self):
"""Button action to cancel the transfer"""
for move in self:
for line in move.asset_depreciation_ids:
line.move_posted_check = False
return super(AccountMove, self).button_cancel()
def post(self):
"""Supering the post method to mapped the asset depreciation records"""
self.mapped('asset_depreciation_ids').post_lines_and_close_asset()
return super(AccountMove, self).action_post()
@api.model
def _refund_cleanup_lines(self, lines):
"""Supering the refund cleanup lines to check the asset category """
result = super(AccountMove, self)._refund_cleanup_lines(lines)
for i, line in enumerate(lines):
for name, field in line._fields.items():
if name == 'asset_category_id':
result[i][2][name] = False
break
return result
def action_cancel(self):
"""Action perform to cancel the asset record"""
res = super(AccountMove, self).action_cancel()
self.env['account.asset.asset'].sudo().search(
[('invoice_id', 'in', self.ids)]).write({'active': False})
return res
def action_post(self):
"""Action used to post invoice"""
result = super(AccountMove, self).action_post()
for inv in self:
context = dict(self.env.context)
# Within the context of an invoice,
# this default value is for the type of the invoice, not the type
# of the asset. This has to be cleaned from the context before
# creating the asset,otherwise it tries to create the asset with
# the type of the invoice.
context.pop('default_type', None)
inv.invoice_line_ids.with_context(context).asset_create()
return result
class AccountInvoiceLine(models.Model):
_inherit = 'account.move.line'
asset_category_id = fields.Many2one('account.asset.category',
string='Asset Category')
asset_start_date = fields.Date(string='Asset Start Date',
compute='_get_asset_date', readonly=True,
store=True)
asset_end_date = fields.Date(string='Asset End Date',
compute='_get_asset_date', readonly=True,
store=True)
asset_mrr = fields.Float(string='Monthly Recurring Revenue',
compute='_get_asset_date',
readonly=True, digits='Account',
store=True)
@api.depends('asset_category_id', 'move_id.invoice_date')
def _get_asset_date(self):
"""Returns the asset_start_date and the asset_end_date of the Asset"""
for record in self:
record.asset_mrr = 0
record.asset_start_date = False
record.asset_end_date = False
cat = record.asset_category_id
if cat:
if cat.method_number == 0 or cat.method_period == 0:
raise UserError(_(
'The number of depreciations or the period length of your asset category cannot be null.'))
months = cat.method_number * cat.method_period
if record.move_id in ['out_invoice', 'out_refund']:
record.asset_mrr = record.price_subtotal_signed / months
if record.move_id.invoice_date:
start_date = datetime.strptime(
str(record.move_id.invoice_date), DF).replace(day=1)
end_date = (start_date + relativedelta(months=months,
days=-1))
record.asset_start_date = start_date.strftime(DF)
record.asset_end_date = end_date.strftime(DF)
def asset_create(self):
"""Create function for the asset and its associated properties"""
for record in self:
if record.asset_category_id:
vals = {
'name': record.name,
'code': record.move_id.name or False,
'category_id': record.asset_category_id.id,
'value': record.price_subtotal,
'partner_id': record.partner_id.id,
'company_id': record.move_id.company_id.id,
'currency_id': record.move_id.company_currency_id.id,
'date': record.move_id.invoice_date,
'invoice_id': record.move_id.id,
}
changed_vals = record.env[
'account.asset.asset'].onchange_category_id_values(
vals['category_id'])
vals.update(changed_vals['value'])
asset = record.env['account.asset.asset'].create(vals)
if record.asset_category_id.open_asset:
asset.validate()
return True
@api.depends('asset_category_id')
def onchange_asset_category_id(self):
"""On change function based on the category and its updates the
account status"""
if self.move_id.move_type == 'out_invoice' and self.asset_category_id:
self.account_id = self.asset_category_id.account_asset_id.id
elif self.move_id.move_type == 'in_invoice' and self.asset_category_id:
self.account_id = self.asset_category_id.account_asset_id.id
@api.onchange('product_id')
def _onchange_uom_id(self):
"""Onchange function for product that's call the UOM compute function
and the asset category function"""
result = super(AccountInvoiceLine, self)._compute_product_uom_id()
self.onchange_asset_category_id()
return result
@api.depends('product_id')
def _onchange_product_id(self):
"""Onchange product values and it's associated with the move types"""
vals = super(AccountInvoiceLine, self)._compute_price_unit()
if self.product_id:
if self.move_id.move_type == 'out_invoice':
self.asset_category_id = self.product_id.product_tmpl_id.deferred_revenue_category_id
elif self.move_id.move_type == 'in_invoice':
self.asset_category_id = self.product_id.product_tmpl_id.asset_category_id
return vals
def _set_additional_fields(self, invoice):
"""The function adds additional fields that based on the invoice
move types"""
if not self.asset_category_id:
if invoice.type == 'out_invoice':
self.asset_category_id = self.product_id.product_tmpl_id.deferred_revenue_category_id.id
elif invoice.type == 'in_invoice':
self.asset_category_id = self.product_id.product_tmpl_id.asset_category_id.id
self.onchange_asset_category_id()
super(AccountInvoiceLine, self)._set_additional_fields(invoice)
def get_invoice_line_account(self, type, product, fpos, company):
""""It returns the invoice line and callback"""
return product.asset_category_id.account_asset_id or super(
AccountInvoiceLine, self).get_invoice_line_account(type, product,
fpos, company)
@api.model
def _query_get(self, domain=None):
"""Used to add domain constraints to the query"""
self.check_access_rights('read')
context = dict(self._context or {})
domain = domain or []
if not isinstance(domain, (list, tuple)):
domain = ast.literal_eval(domain)
date_field = 'date'
if context.get('aged_balance'):
date_field = 'date_maturity'
if context.get('date_to'):
domain += [(date_field, '<=', context['date_to'])]
if context.get('date_from'):
if not context.get('strict_range'):
domain += ['|', (date_field, '>=', context['date_from']),
('account_id.include_initial_balance', '=', True)]
elif context.get('initial_bal'):
domain += [(date_field, '<', context['date_from'])]
else:
domain += [(date_field, '>=', context['date_from'])]
if context.get('journal_ids'):
domain += [('journal_id', 'in', context['journal_ids'])]
state = context.get('state')
if state and state.lower() != 'all':
domain += [('parent_state', '=', state)]
if context.get('company_id'):
domain += [('company_id', '=', context['company_id'])]
elif context.get('allowed_company_ids'):
domain += [('company_id', 'in', self.env.companies.ids)]
else:
domain += [('company_id', '=', self.env.company.id)]
if context.get('reconcile_date'):
domain += ['|', ('reconciled', '=', False), '|',
('matched_debit_ids.max_date', '>', context['reconcile_date']),
('matched_credit_ids.max_date', '>', context['reconcile_date'])]
if context.get('account_tag_ids'):
domain += [('account_id.tag_ids', 'in', context['account_tag_ids'].ids)]
if context.get('account_ids'):
domain += [('account_id', 'in', context['account_ids'].ids)]
if context.get('analytic_tag_ids'):
domain += [('analytic_tag_ids', 'in', context['analytic_tag_ids'].ids)]
if context.get('analytic_account_ids'):
domain += [('analytic_account_id', 'in', context['analytic_account_ids'].ids)]
if context.get('partner_ids'):
domain += [('partner_id', 'in', context['partner_ids'].ids)]
if context.get('partner_categories'):
domain += [('partner_id.category_id', 'in', context['partner_categories'].ids)]
where_clause = ""
where_clause_params = []
tables = ''
if domain:
domain.append(('display_type', 'not in', ('line_section', 'line_note')))
domain.append(('parent_state', '!=', 'cancel'))
query = self._where_calc(domain)
# Wrap the query with 'company_id IN (...)' to avoid bypassing company access rights.
self._apply_ir_rules(query)
tables, where_clause, where_clause_params = query.get_sql()
return tables, where_clause, where_clause_params

213
base_accounting_kit/models/account_payment.py

@ -0,0 +1,213 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class AccountRegisterPayments(models.TransientModel):
"""Inherits the account.payment.register model to add the new
fields and functions"""
_inherit = "account.payment.register"
bank_reference = fields.Char(string="Bank Reference", copy=False)
cheque_reference = fields.Char(string="Cheque Reference", copy=False)
effective_date = fields.Date('Effective Date',
help='Effective date of PDC', copy=False,
default=False)
def _prepare_payment_vals(self, invoices):
"""Its prepare the payment values for the invoice and update
the MultiPayment"""
res = super(AccountRegisterPayments, self)._prepare_payment_vals(
invoices)
# Check payment method is Check or PDC
check_pdc_ids = self.env['account.payment.method'].search(
[('code', 'in', ['pdc', 'check_printing'])])
if self.payment_method_id.id in check_pdc_ids.ids:
currency_id = self.env['res.currency'].browse(res['currency_id'])
journal_id = self.env['account.journal'].browse(res['journal_id'])
# Updating values in case of Multi payments
res.update({
'bank_reference': self.bank_reference,
'cheque_reference': self.cheque_reference,
'check_manual_sequencing': journal_id.check_manual_sequencing,
'effective_date': self.effective_date,
'check_amount_in_words': currency_id.amount_to_text(
res['amount']),
})
return res
def _create_payment_vals_from_wizard(self, batch_result):
"""It super the wizard action of the create payment values and update
the bank and cheque values"""
res = super(AccountRegisterPayments,
self)._create_payment_vals_from_wizard(
batch_result)
if self.effective_date:
res.update({
'bank_reference': self.bank_reference,
'cheque_reference': self.cheque_reference,
'effective_date': self.effective_date,
})
return res
def _create_payment_vals_from_batch(self, batch_result):
"""It super the batch action of the create payment values and update
the bank and cheque values"""
res = super(AccountRegisterPayments,
self)._create_payment_vals_from_batch(
batch_result)
if self.effective_date:
res.update({
'bank_reference': self.bank_reference,
'cheque_reference': self.cheque_reference,
'effective_date': self.effective_date,
})
return res
def _create_payments(self):
"""USed to create a list of payments and update the bank and
cheque reference"""
payments = super(AccountRegisterPayments, self)._create_payments()
for payment in payments:
payment.write({
'bank_reference': self.bank_reference,
'cheque_reference': self.cheque_reference
})
return payments
class AccountPayment(models.Model):
""""It inherits the account.payment model for adding new fields
and functions"""
_inherit = "account.payment"
bank_reference = fields.Char(string="Bank Reference", copy=False)
cheque_reference = fields.Char(string="Cheque Reference",copy=False)
effective_date = fields.Date('Effective Date',
help='Effective date of PDC', copy=False,
default=False)
def open_payment_matching_screen(self):
"""Open reconciliation view for customers/suppliers"""
move_line_id = False
for move_line in self.line_ids:
if move_line.account_id.reconcile:
move_line_id = move_line.id
break
if not self.partner_id:
raise UserError(_("Payments without a customer can't be matched"))
action_context = {'company_ids': [self.company_id.id], 'partner_ids': [
self.partner_id.commercial_partner_id.id]}
if self.partner_type == 'customer':
action_context.update({'mode': 'customers'})
elif self.partner_type == 'supplier':
action_context.update({'mode': 'suppliers'})
if move_line_id:
action_context.update({'move_line_id': move_line_id})
return {
'type': 'ir.actions.client',
'tag': 'manual_reconciliation_view',
'context': action_context,
}
def print_checks(self):
""" Check that the recordset is valid, set the payments state to
sent and call print_checks() """
# Since this method can be called via a client_action_multi, we
# need to make sure the received records are what we expect
selfs = self.filtered(lambda r:
r.payment_method_id.code
in ['check_printing', 'pdc']
and r.state != 'reconciled')
if len(selfs) == 0:
raise UserError(_(
"Payments to print as a checks must have 'Check' "
"or 'PDC' selected as payment method and "
"not have already been reconciled"))
if any(payment.journal_id != selfs[0].journal_id for payment in selfs):
raise UserError(_(
"In order to print multiple checks at once, they "
"must belong to the same bank journal."))
if not selfs[0].journal_id.check_manual_sequencing:
# The wizard asks for the number printed on the first
# pre-printed check so payments are attributed the
# number of the check the'll be printed on.
last_printed_check = selfs.search([
('journal_id', '=', selfs[0].journal_id.id),
('check_number', '!=', "0")], order="check_number desc",
limit=1)
next_check_number = last_printed_check and int(
last_printed_check.check_number) + 1 or 1
return {
'name': _('Print Pre-numbered Checks'),
'type': 'ir.actions.act_window',
'res_model': 'print.prenumbered.checks',
'view_mode': 'form',
'target': 'new',
'context': {
'payment_ids': self.ids,
'default_next_check_number': next_check_number,
}
}
else:
self.filtered(lambda r: r.state == 'draft').post()
self.write({'state': 'sent'})
return self.do_print_checks()
def _prepare_payment_moves(self):
""" supered function to set effective date """
res = super(AccountPayment, self)._prepare_payment_moves()
inbound_pdc_id = self.env.ref(
'base_accounting_kit.account_payment_method_pdc_in').id
outbound_pdc_id = self.env.ref(
'base_accounting_kit.account_payment_method_pdc_out').id
if self.payment_method_id.id == inbound_pdc_id or \
self.payment_method_id.id == outbound_pdc_id \
and self.effective_date:
res[0]['date'] = self.effective_date
for line in res[0]['line_ids']:
line[2]['date_maturity'] = self.effective_date
return res
def mark_as_sent(self):
"""Updates the is_move_sent value of the payment model"""
self.write({'is_move_sent': True})
def unmark_as_sent(self):
"""Updates the is_move_sent value of the payment model"""
self.write({'is_move_sent': False})
class AccountPaymentMethod(models.Model):
"""The class inherits the account payment method for supering the
_get_payment_method_information function"""
_inherit = "account.payment.method"
@api.model
def _get_payment_method_information(self):
"""Super the function to update the pdc values"""
res = super()._get_payment_method_information()
res['pdc'] = {'mode': 'multi', 'domain': [('type', '=', 'bank')]}
return res

160
base_accounting_kit/models/credit_limit.py

@ -0,0 +1,160 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
from odoo.exceptions import UserError
from odoo.tools.translate import _
class ResPartner(models.Model):
"""The Class inherits the res.partner model for adding the new
fields and functions"""
_inherit = 'res.partner'
warning_stage = fields.Float(string='Warning Amount',
help="A warning message will appear once the "
"selected customer is crossed warning "
"amount. Set its value to 0.00 to"
" disable this feature")
blocking_stage = fields.Float(string='Blocking Amount',
help="Cannot make sales once the selected "
"customer is crossed blocking amount."
"Set its value to 0.00 to disable "
"this feature")
due_amount = fields.Float(string="Total Sale",
compute="compute_due_amount")
active_limit = fields.Boolean("Active Credit Limit", default=False)
enable_credit_limit = fields.Boolean(string="Credit Limit Enabled",
compute="_compute_enable_credit_limit")
def compute_due_amount(self):
"""Compute function to compute the due amount with the
credit and debit amount"""
for rec in self:
if not rec.id:
continue
rec.due_amount = rec.credit - rec.debit
def _compute_enable_credit_limit(self):
""" Check credit limit is enabled in account settings """
params = self.env['ir.config_parameter'].sudo()
customer_credit_limit = params.get_param('customer_credit_limit',
default=False)
for rec in self:
rec.enable_credit_limit = True if customer_credit_limit else False
@api.constrains('warning_stage', 'blocking_stage')
def constrains_warning_stage(self):
"""Constrains functionality used to indicate or raise an
UserError"""
if self.active_limit and self.enable_credit_limit:
if self.warning_stage >= self.blocking_stage:
if self.blocking_stage > 0:
raise UserError(_(
"Warning amount should be less than Blocking amount"))
class SaleOrder(models.Model):
"""The Class inherits the sale.order model for adding the new
fields and functions"""
_inherit = 'sale.order'
has_due = fields.Boolean(string='Has due')
is_warning = fields.Boolean(string='Is warning')
due_amount = fields.Float(string='Due Amount',
related='partner_id.due_amount')
def _action_confirm(self):
"""To check the selected customers due amount is exceed than
blocking stage"""
if self.partner_id.active_limit \
and self.partner_id.enable_credit_limit:
if self.due_amount >= self.partner_id.blocking_stage:
if self.partner_id.blocking_stage != 0:
raise UserError(_(
"%s is in Blocking Stage and "
"has a due amount of %s %s to pay") % (
self.partner_id.name, self.due_amount,
self.currency_id.symbol))
return super(SaleOrder, self)._action_confirm()
@api.onchange('partner_id')
def check_due(self):
"""To show the due amount and warning stage"""
if self.partner_id and self.partner_id.due_amount > 0 \
and self.partner_id.active_limit \
and self.partner_id.enable_credit_limit:
self.has_due = True
else:
self.has_due = False
if self.partner_id and self.partner_id.active_limit\
and self.partner_id.enable_credit_limit:
if self.due_amount >= self.partner_id.warning_stage:
if self.partner_id.warning_stage != 0:
self.is_warning = True
else:
self.is_warning = False
class AccountMove(models.Model):
"""The Class inherits the account.move model for adding the new
fields and functions"""
_inherit = 'account.move'
has_due = fields.Boolean(string='Has due')
is_warning = fields.Boolean(string='Is warning')
due_amount = fields.Float(string="Due Amount",
related='partner_id.due_amount')
def action_post(self):
"""To check the selected customers due amount is exceed than
blocking stage"""
pay_type = ['out_invoice', 'out_refund', 'out_receipt']
for rec in self:
if rec.partner_id.active_limit and rec.move_type in pay_type \
and rec.partner_id.enable_credit_limit:
if rec.due_amount >= rec.partner_id.blocking_stage:
if rec.partner_id.blocking_stage != 0:
raise UserError(_(
"%s is in Blocking Stage and "
"has a due amount of %s %s to pay") % (
rec.partner_id.name, rec.due_amount,
rec.currency_id.symbol))
return super(AccountMove, self).action_post()
@api.onchange('partner_id')
def check_due(self):
"""To show the due amount and warning stage"""
if self.partner_id and self.partner_id.due_amount > 0 \
and self.partner_id.active_limit \
and self.partner_id.enable_credit_limit:
self.has_due = True
else:
self.has_due = False
if self.partner_id and self.partner_id.active_limit \
and self.partner_id.enable_credit_limit:
if self.due_amount >= self.partner_id.warning_stage:
if self.partner_id.warning_stage != 0:
self.is_warning = True
else:
self.is_warning = False

63
base_accounting_kit/models/multiple_invoice.py

@ -0,0 +1,63 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class MultipleInvoice(models.Model):
"""Multiple Invoice Model"""
_name = "multiple.invoice"
_description = 'Multiple Invoice'
_order = "sequence"
sequence = fields.Integer(string='Sequence No')
copy_name = fields.Char(string='Invoice Copy Name')
journal_id = fields.Many2one('account.journal', string="Journal")
class AccountJournal(models.Model):
"""Inheriting Account Journal Model for adding the new fields"""
_inherit = "account.journal"
multiple_invoice_ids = fields.One2many('multiple.invoice',
'journal_id',
string='Multiple Invoice')
multiple_invoice_type = fields.Selection(
[('text', 'Text'), ('watermark', 'Watermark')], required=True,
default='text', string="Display Type")
text_position = fields.Selection([
('header', 'Header'),
('footer', 'Footer'),
('body', 'Document Body')
], required=True, default='header', string='Text Position')
body_text_position = fields.Selection([
('tl', 'Top Left'),
('tr', 'Top Right'),
('bl', 'Bottom Left'),
('br', 'Bottom Right'),
], default='tl', string='Body Text Position')
text_align = fields.Selection([
('right', 'Right'),
('left', 'Left'),
('center', 'Center'),
], default='right', string='Center Align Text Position')
layout = fields.Char(string="Layout",
related="company_id.external_report_layout_id.key")

159
base_accounting_kit/models/multiple_invoice_layout.py

@ -0,0 +1,159 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
from odoo.modules import get_resource_path
try:
import sass as libsass
except ImportError:
libsass = None
class MultipleInvoiceLayout(models.TransientModel):
"""
Customise the invoice copy document layout and display a live preview
"""
_name = 'multiple.invoice.layout'
_description = 'Multiple Invoice Document Layout'
def _get_default_journal(self):
"""The default function to return the journal for the invoice"""
return self.env['account.journal'].search(
[('id', '=', self.env.context.get('active_id'))]).id
company_id = fields.Many2one(
'res.company', default=lambda self: self.env.company, required=True)
layout = fields.Char(related="company_id.external_report_layout_id.key")
journal_id = fields.Many2one('account.journal', string='Journal',
required=True, default=_get_default_journal)
multiple_invoice_type = fields.Selection(
related='journal_id.multiple_invoice_type', readonly=False,
required=True)
text_position = fields.Selection(related='journal_id.text_position',
readonly=False, required=True,
default='header')
body_text_position = fields.Selection(
related='journal_id.body_text_position',
readonly=False)
text_align = fields.Selection(
related='journal_id.text_align',
readonly=False)
preview = fields.Html(compute='_compute_preview',
sanitize=False,
sanitize_tags=False,
sanitize_attributes=False,
sanitize_style=False,
sanitize_form=False,
strip_style=False,
strip_classes=False)
@api.depends('multiple_invoice_type', 'text_position', 'body_text_position',
'text_align')
def _compute_preview(self):
""" compute a qweb based preview to display on the wizard """
styles = self._get_asset_style()
for wizard in self:
if wizard.company_id:
preview_css = self._get_css_for_preview(styles, wizard.id)
layout = self._get_layout_for_preview()
ir_ui_view = wizard.env['ir.ui.view']
wizard.preview = ir_ui_view._render_template(
'base_accounting_kit.multiple_invoice_wizard_preview',
{'company': wizard.company_id, 'preview_css': preview_css,
'layout': layout,
'mi_type': self.multiple_invoice_type,
'txt_position': self.text_position,
'body_txt_position': self.body_text_position,
'txt_align': self.text_align,
'mi': self.env.ref(
'base_accounting_kit.multiple_invoice_sample_name')
})
else:
wizard.preview = False
def _get_asset_style(self):
"""Used to set the asset style"""
company_styles = self.env['ir.qweb']._render(
'web.styles_company_report', {
'company_ids': self.company_id,
}, raise_if_not_found=False)
return company_styles
@api.model
def _get_css_for_preview(self, scss, new_id):
"""
Compile the scss into css.
"""
css_code = self._compile_scss(scss)
return css_code
@api.model
def _compile_scss(self, scss_source):
"""
This code will compile valid scss into css.
Parameters are the same from odoo/addons/base/models/assetsbundle.py
Simply copied and adapted slightly
"""
# No scss ? still valid, returns empty css
if not scss_source.strip():
return ""
precision = 8
output_style = 'expanded'
bootstrap_path = get_resource_path('web', 'static', 'lib', 'bootstrap',
'scss')
try:
return libsass.compile(
string=scss_source,
include_paths=[
bootstrap_path,
],
output_style=output_style,
precision=precision,
)
except libsass.CompileError as e:
raise libsass.CompileError(e.args[0])
def _get_layout_for_preview(self):
"""Returns the layout Preview for the accounting module"""
if self.layout == 'web.external_layout_boxed':
new_layout = 'base_accounting_kit.boxed'
elif self.layout == 'web.external_layout_bold':
new_layout = 'base_accounting_kit.bold'
elif self.layout == 'web.external_layout_striped':
new_layout = 'base_accounting_kit.striped'
else:
new_layout = 'base_accounting_kit.standard'
return new_layout
def document_layout_save(self):
"""meant to be overridden document_layout_save"""
return self.env.context.get('report_action') or {
'type': 'ir.actions.act_window_close'}

38
base_accounting_kit/models/product_template.py

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
class ProductTemplate(models.Model):
"""Inherited the model for adding new fields and functions"""
_inherit = 'product.template'
asset_category_id = fields.Many2one('account.asset.category', string='Asset Type', company_dependent=True, ondelete="restrict")
deferred_revenue_category_id = fields.Many2one('account.asset.category', string='Deferred Revenue Type', company_dependent=True, ondelete="restrict")
def _get_asset_accounts(self):
res = super(ProductTemplate, self)._get_asset_accounts()
if self.asset_category_id:
res['stock_input'] = self.property_account_expense_id
if self.deferred_revenue_category_id:
res['stock_output'] = self.property_account_income_id
return res

180
base_accounting_kit/models/recurring_payments.py

@ -0,0 +1,180 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import datetime, date
from dateutil.relativedelta import relativedelta
from odoo import api, models, fields
class FilterRecurringEntries(models.Model):
_inherit = 'account.move'
"""Inherits the account.move model for adding the recurring
reference field"""
recurring_ref = fields.Char(string='Recurring Ref')
class RecurringPayments(models.Model):
"""Created the module for recurring payments"""
_name = 'account.recurring.payments'
_description = 'Accounting Recurring Payment'
def _get_next_schedule(self):
"""Function for adding the schedule process"""
if self.date:
recurr_dates = []
today = datetime.today()
start_date = datetime.strptime(str(self.date), '%Y-%m-%d')
while start_date <= today:
recurr_dates.append(str(start_date.date()))
if self.recurring_period == 'days':
start_date += relativedelta(days=self.recurring_interval)
elif self.recurring_period == 'weeks':
start_date += relativedelta(weeks=self.recurring_interval)
elif self.recurring_period == 'months':
start_date += relativedelta(months=self.recurring_interval)
else:
start_date += relativedelta(years=self.recurring_interval)
self.next_date = start_date.date()
name = fields.Char(string='Name')
debit_account = fields.Many2one('account.account', 'Debit Account',
required=True,
domain="['|', ('company_id', '=', False), "
"('company_id', '=', company_id)]")
credit_account = fields.Many2one('account.account', 'Credit Account',
required=True,
domain="['|', ('company_id', '=', False), "
"('company_id', '=', company_id)]")
journal_id = fields.Many2one('account.journal', 'Journal', required=True)
analytic_account_id = fields.Many2one('account.analytic.account',
'Analytic Account')
date = fields.Date('Starting Date', required=True, default=date.today())
next_date = fields.Date('Next Schedule', compute=_get_next_schedule,
readonly=True, copy=False)
recurring_period = fields.Selection(selection=[('days', 'Days'),
('weeks', 'Weeks'),
('months', 'Months'),
('years', 'Years')],
store=True, required=True)
amount = fields.Float('Amount')
description = fields.Text('Description')
state = fields.Selection(selection=[('draft', 'Draft'),
('running', 'Running')],
default='draft', string='Status')
journal_state = fields.Selection(selection=[('draft', 'Unposted'),
('posted', 'Posted')],
required=True, default='draft',
string='Generate Journal As')
recurring_interval = fields.Integer('Recurring Interval', default=1)
partner_id = fields.Many2one('res.partner', 'Partner')
pay_time = fields.Selection(selection=[('pay_now', 'Pay Directly'),
('pay_later', 'Pay Later')],
store=True, required=True)
company_id = fields.Many2one('res.company',
default=lambda l: l.env.company.id)
recurring_lines = fields.One2many('account.recurring.entries.line', 'tmpl_id')
@api.onchange('partner_id')
def onchange_partner_id(self):
"""Onchange partner field for updating the credit account value"""
if self.partner_id.property_account_receivable_id:
self.credit_account = self.partner_id.property_account_payable_id
@api.model
def _cron_generate_entries(self):
data = self.env['account.recurring.payments'].search(
[('state', '=', 'running')])
entries = self.env['account.move'].search(
[('recurring_ref', '!=', False)])
journal_dates = []
journal_codes = []
remaining_dates = []
for entry in entries:
journal_dates.append(str(entry.date))
if entry.recurring_ref:
journal_codes.append(str(entry.recurring_ref))
today = datetime.today()
for line in data:
if line.date:
recurr_dates = []
start_date = datetime.strptime(str(line.date), '%Y-%m-%d')
while start_date <= today:
recurr_dates.append(str(start_date.date()))
if line.recurring_period == 'days':
start_date += relativedelta(
days=line.recurring_interval)
elif line.recurring_period == 'weeks':
start_date += relativedelta(
weeks=line.recurring_interval)
elif line.recurring_period == 'months':
start_date += relativedelta(
months=line.recurring_interval)
else:
start_date += relativedelta(
years=line.recurring_interval)
for rec in recurr_dates:
recurr_code = str(line.id) + '/' + str(rec)
if recurr_code not in journal_codes:
remaining_dates.append({
'date': rec,
'template_name': line.name,
'amount': line.amount,
'tmpl_id': line.id,
})
child_ids = self.recurring_lines.create(remaining_dates)
for line in child_ids:
tmpl_id = line.tmpl_id
recurr_code = str(tmpl_id.id) + '/' + str(line.date)
line_ids = [(0, 0, {
'account_id': tmpl_id.credit_account.id,
'partner_id': tmpl_id.partner_id.id,
'credit': line.amount,
# 'analytic_account_id': tmpl_id.analytic_account_id.id,
}), (0, 0, {
'account_id': tmpl_id.debit_account.id,
'partner_id': tmpl_id.partner_id.id,
'debit': line.amount,
# 'analytic_account_id': tmpl_id.analytic_account_id.id,
})]
vals = {
'date': line.date,
'recurring_ref': recurr_code,
'company_id': self.env.company.id,
'journal_id': tmpl_id.journal_id.id,
'ref': line.template_name,
'narration': 'Recurring entry',
'line_ids': line_ids
}
move_id = self.env['account.move'].create(vals)
if tmpl_id.journal_state == 'posted':
move_id.post()
class GetAllRecurringEntries(models.TransientModel):
_name = 'account.recurring.entries.line'
_description = 'Account Recurring Entries Line'
date = fields.Date('Date')
template_name = fields.Char('Name')
amount = fields.Float('Amount')
tmpl_id = fields.Many2one('account.recurring.payments', string='id')

74
base_accounting_kit/models/res_company.py

@ -0,0 +1,74 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import date, timedelta
from odoo import fields, models,_
from odoo.exceptions import UserError, ValidationError, AccessError, RedirectWarning
class ResCompany(models.Model):
_inherit = "res.company"
def _validate_fiscalyear_lock(self, values):
if values.get('fiscalyear_lock_date'):
draft_entries = self.env['account.move'].search([
('company_id', 'in', self.ids),
('state', '=', 'draft'),
('date', '<=', values['fiscalyear_lock_date'])])
if draft_entries:
error_msg = _('There are still unposted entries in the period you want to lock. You should either post or delete them.')
action_error = {
'view_mode': 'tree',
'name': 'Unposted Entries',
'res_model': 'account.move',
'type': 'ir.actions.act_window',
'domain': [('id', 'in', draft_entries.ids)],
'search_view_id': [self.env.ref('account.view_account_move_filter').id, 'search'],
'views': [[self.env.ref('account.view_move_tree').id, 'list'], [self.env.ref('account.view_move_form').id, 'form']],
}
raise RedirectWarning(error_msg, action_error, _('Show unposted entries'))
unreconciled_statement_lines = self.env['account.bank.statement.line'].search([
('company_id', 'in', self.ids),
('is_reconciled', '=', False),
('date', '<=', values['fiscalyear_lock_date']),
('move_id.state', 'in', ('draft', 'posted')),
])
if unreconciled_statement_lines:
error_msg = _("There are still unreconciled bank statement lines in the period you want to lock."
"You should either reconcile or delete them.")
action_error = {
'view_mode': 'tree',
'name': 'Unreconciled Transactions',
'res_model': 'account.bank.statement.line',
'type': 'ir.actions.act_window',
'domain': [('id', 'in', unreconciled_statement_lines.ids)],
# 'search_view_id': [self.env.ref('account.view_account_move_filter').id, 'search'],
'views': [[self.env.ref('base_accounting_kit.view_bank_statement_line_tree').id, 'list']]
# [self.env.ref('account.view_move_form').id, 'form']],
}
# action_error = self._get_fiscalyear_lock_statement_lines_redirect_action(unreconciled_statement_lines)
raise RedirectWarning(error_msg, action_error, _('Show Unreconciled Bank Statement Line'))

47
base_accounting_kit/models/res_config_settings.py

@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
customer_credit_limit = fields.Boolean(string="Customer Credit Limit")
use_anglo_saxon_accounting = fields.Boolean(string="Use Anglo-Saxon accounting", readonly=False,
related='company_id.anglo_saxon_accounting')
@api.model
def get_values(self):
res = super(ResConfigSettings, self).get_values()
params = self.env['ir.config_parameter'].sudo()
customer_credit_limit = params.get_param('customer_credit_limit',
default=False)
res.update(customer_credit_limit=customer_credit_limit)
return res
def set_values(self):
super(ResConfigSettings, self).set_values()
self.env['ir.config_parameter'].sudo().set_param(
"customer_credit_limit",
self.customer_credit_limit)

113
base_accounting_kit/models/res_partner.py

@ -0,0 +1,113 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import date, timedelta
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
invoice_list = fields.One2many('account.move', 'partner_id',
string="Invoice Details",
readonly=True,
domain=(
[('payment_state', '=', 'not_paid'),
('move_type', '=', 'out_invoice')]))
total_due = fields.Monetary(compute='_compute_for_followup', store=False,
readonly=True)
next_reminder_date = fields.Date(compute='_compute_for_followup',
store=False, readonly=True)
total_overdue = fields.Monetary(compute='_compute_for_followup',
store=False, readonly=True)
followup_status = fields.Selection(
[('in_need_of_action', 'In need of action'),
('with_overdue_invoices', 'With overdue invoices'),
('no_action_needed', 'No action needed')],
string='Followup status',
)
def _compute_for_followup(self):
"""
Compute the fields 'total_due', 'total_overdue' , 'next_reminder_date' and 'followup_status'
"""
for record in self:
total_due = 0
total_overdue = 0
today = fields.Date.today()
for am in record.invoice_list:
if am.company_id == self.env.company:
amount = am.amount_residual
total_due += amount
is_overdue = today > am.invoice_date_due if am.invoice_date_due else today > am.date
if is_overdue:
total_overdue += amount or 0
min_date = record.get_min_date()
action = record.action_after()
if min_date:
date_reminder = min_date + timedelta(days=action)
if date_reminder:
record.next_reminder_date = date_reminder
else:
date_reminder = today
record.next_reminder_date = date_reminder
if total_overdue > 0 and date_reminder > today:
followup_status = "with_overdue_invoices"
elif total_due > 0 and date_reminder <= today:
followup_status = "in_need_of_action"
else:
followup_status = "no_action_needed"
record.total_due = total_due
record.total_overdue = total_overdue
record.followup_status = followup_status
def get_min_date(self):
today = date.today()
for this in self:
if this.invoice_list:
min_list = this.invoice_list.mapped('invoice_date_due')
while False in min_list:
min_list.remove(False)
return min(min_list)
else:
return today
def get_delay(self):
delay = """select id,delay from followup_line where followup_id =
(select id from account_followup where company_id = %s)
order by delay limit 1"""
self._cr.execute(delay, [self.env.company.id])
record = self._cr.dictfetchall()
return record
def action_after(self):
lines = self.env['followup.line'].search([(
'followup_id.company_id', '=', self.env.company.id)])
if lines:
record = self.get_delay()
for i in record:
return i['delay']

35
base_accounting_kit/report/__init__.py

@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import general_ledger_report
from . import account_report_common_account
from . import report_partner_ledger
from . import report_tax
from . import report_trial_balance
from . import report_aged_partner
from . import report_journal_audit
from . import report_financial
from . import cash_flow_report
from . import account_bank_book
from . import account_cash_book
from . import account_day_book
from . import account_asset_report
from . import multiple_invoice_report

86
base_accounting_kit/report/account_asset_report.py

@ -0,0 +1,86 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models, tools
class AssetAssetReport(models.Model):
_name = "asset.asset.report"
_description = "Assets Analysis"
_auto = False
name = fields.Char(string='Year', required=False, readonly=True)
date = fields.Date(readonly=True)
depreciation_date = fields.Date(string='Depreciation Date', readonly=True)
asset_id = fields.Many2one('account.asset.asset', string='Asset', readonly=True)
asset_category_id = fields.Many2one('account.asset.category', string='Asset category', readonly=True)
partner_id = fields.Many2one('res.partner', string='Partner', readonly=True)
state = fields.Selection([('draft', 'Draft'), ('open', 'Running'), ('close', 'Close')], string='Status', readonly=True)
depreciation_value = fields.Float(string='Amount of Depreciation Lines', readonly=True)
installment_value = fields.Float(string='Amount of Installment Lines', readonly=True)
move_check = fields.Boolean(string='Posted', readonly=True)
installment_nbr = fields.Integer(string='# of Installment Lines', readonly=True)
depreciation_nbr = fields.Integer(string='# of Depreciation Lines', readonly=True)
gross_value = fields.Float(string='Gross Amount', readonly=True)
posted_value = fields.Float(string='Posted Amount', readonly=True)
unposted_value = fields.Float(string='Unposted Amount', readonly=True)
company_id = fields.Many2one('res.company', string='Company', readonly=True)
def init(self):
tools.drop_view_if_exists(self._cr, 'asset_asset_report')
self._cr.execute("""
create or replace view asset_asset_report as (
select
min(dl.id) as id,
dl.name as name,
dl.depreciation_date as depreciation_date,
a.date as date,
(CASE WHEN dlmin.id = min(dl.id)
THEN a.value
ELSE 0
END) as gross_value,
dl.amount as depreciation_value,
dl.amount as installment_value,
(CASE WHEN dl.move_check
THEN dl.amount
ELSE 0
END) as posted_value,
(CASE WHEN NOT dl.move_check
THEN dl.amount
ELSE 0
END) as unposted_value,
dl.asset_id as asset_id,
dl.move_check as move_check,
a.category_id as asset_category_id,
a.partner_id as partner_id,
a.state as state,
count(dl.*) as installment_nbr,
count(dl.*) as depreciation_nbr,
a.company_id as company_id
from account_asset_depreciation_line dl
left join account_asset_asset a on (dl.asset_id=a.id)
left join (select min(d.id) as id,ac.id as ac_id from account_asset_depreciation_line as d inner join account_asset_asset as ac ON (ac.id=d.asset_id) group by ac_id) as dlmin on dlmin.ac_id=a.id
where a.active is true
group by
dl.amount,dl.asset_id,dl.depreciation_date,dl.name,
a.date, dl.move_check, a.state, a.category_id, a.partner_id, a.company_id,
a.value, a.id, a.salvage_value, dlmin.id
)""")

77
base_accounting_kit/report/account_asset_report_views.xml

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="action_account_asset_report_pivot">
<field name="name">asset.asset.report.pivot</field>
<field name="model">asset.asset.report</field>
<field name="arch" type="xml">
<pivot string="Assets Analysis" disable_linking="True">
<field name="asset_category_id" type="row"/>
<field name="gross_value" type="measure"/>
<field name="unposted_value" type="measure"/>
</pivot>
</field>
</record>
<record model="ir.ui.view" id="action_account_asset_report_graph">
<field name="name">asset.asset.report.graph</field>
<field name="model">asset.asset.report</field>
<field name="arch" type="xml">
<graph string="Assets Analysis">
<field name="asset_category_id" type="row"/>
<field name="gross_value" type="measure"/>
<field name="unposted_value" type="measure"/>
</graph>
</field>
</record>
<record id="view_asset_asset_report_search" model="ir.ui.view">
<field name="name">asset.asset.report.search</field>
<field name="model">asset.asset.report</field>
<field name="arch" type="xml">
<search string="Assets Analysis">
<field name="date"/>
<field name="depreciation_date"/>
<filter string="Draft" name="draft" domain="[('state','=','draft')]" help="Assets in draft state"/>
<filter string="Running" name="running" domain="[('state','=','open')]" help="Assets in running state"/>
<filter string="Not archived" name="only_active" domain="[('asset_id.active','=', True)]"/>
<separator/>
<filter string="Posted" name="posted" domain="[('move_check','=',True)]" help="Posted depreciation lines" context="{'unposted_value_visible': 0}"/>
<field name="asset_id"/>
<field name="asset_category_id"/>
<group expand="0" string="Extended Filters...">
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group expand="1" string="Group By">
<filter string="Asset" name="asset" context="{'group_by':'asset_id'}"/>
<filter string="Asset Category" name="asset_category" context="{'group_by':'asset_category_id'}"/>
<filter string="Company" name="company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator/>
<filter string="Purchase Month" name="purchase_month" help="Date of asset purchase"
context="{'group_by':'date:month'}"/>
<filter string="Depreciation Month" name="deprecation_month" help="Date of depreciation"
context="{'group_by':'depreciation_date:month'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_asset_asset_report">
<field name="name">Assets Analysis</field>
<field name="res_model">asset.asset.report</field>
<field name="view_mode">graph,pivot</field>
<field name="search_view_id" ref="view_asset_asset_report_search"/>
<field name="domain">[('asset_category_id.type', '=', 'purchase')]</field>
<field name="context">{'search_default_only_active': 1}</field>
<field name="help" type="html">
<p>
From this report, you can have an overview on all depreciations. The
search bar can also be used to personalize your assets depreciation reporting.
</p>
</field>
</record>
<menuitem name="Assets" action="action_asset_asset_report"
id="menu_action_asset_asset_report"
parent="account.account_reports_management_menu" sequence="21"/>
</odoo>

176
base_accounting_kit/report/account_bank_book.py

@ -0,0 +1,176 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import time
from odoo import models, api, _
from odoo.exceptions import UserError
class ReportBankBook(models.AbstractModel):
_name = 'report.base_accounting_kit.report_bank_book'
_description = 'Bank Book Report'
def _get_account_move_entry(self, accounts, init_balance, sortby,
display_account):
cr = self.env.cr
move_line = self.env['account.move.line']
move_lines = {x: [] for x in accounts.ids}
# Prepare initial sql query and Get the initial move lines
if init_balance:
init_tables, init_where_clause, init_where_params = move_line.with_context(
date_from=self.env.context.get('date_from'), date_to=False,
initial_bal=True)._query_get()
init_wheres = [""]
if init_where_clause.strip():
init_wheres.append(init_where_clause.strip())
init_filters = " AND ".join(init_wheres)
filters = init_filters.replace('account_move_line__move_id',
'm').replace('account_move_line',
'l')
sql = ("""SELECT 0 AS lid, l.account_id AS account_id, \
'' AS ldate, '' AS lcode, 0.0 AS amount_currency, \
'' AS lref, 'Initial Balance' AS lname, \
COALESCE(SUM(l.debit),0.0) AS debit, \
COALESCE(SUM(l.credit),0.0) AS credit, \
COALESCE(SUM(l.debit),0) - COALESCE(SUM(l.credit), 0) as balance, \
'' AS lpartner_id,\
'' AS move_name, '' AS mmove_id, '' AS currency_code,\
NULL AS currency_id,\
'' AS invoice_id, '' AS invoice_type, '' AS invoice_number,\
'' AS partner_name\
FROM account_move_line l\
LEFT JOIN account_move m ON (l.move_id=m.id)\
LEFT JOIN res_currency c ON (l.currency_id=c.id)\
LEFT JOIN res_partner p ON (l.partner_id=p.id)\
JOIN account_journal j ON (l.journal_id=j.id)\
WHERE l.account_id IN %s""" + filters + ' GROUP BY l.account_id')
params = (tuple(accounts.ids),) + tuple(init_where_params)
cr.execute(sql, params)
for row in cr.dictfetchall():
move_lines[row.pop('account_id')].append(row)
sql_sort = 'l.date, l.move_id'
if sortby == 'sort_journal_partner':
sql_sort = 'j.code, p.name, l.move_id'
# Prepare sql query base on selected parameters from wizard
tables, where_clause, where_params = move_line._query_get()
wheres = [""]
if where_clause.strip():
wheres.append(where_clause.strip())
filters = " AND ".join(wheres)
filters = filters.replace('account_move_line__move_id', 'm').replace(
'account_move_line', 'l')
# Get move lines base on sql query and Calculate the total
# balance of move lines
sql = ('''SELECT l.id AS lid, l.account_id \
AS account_id, l.date AS ldate, j.code AS lcode,\
l.currency_id, l.amount_currency, l.ref AS lref, l.name AS lname,\
COALESCE(l.debit,0) AS debit, \
COALESCE(l.credit,0) AS credit, \
COALESCE(SUM(l.debit),0) - COALESCE(SUM(l.credit), 0) AS balance,\
m.name AS move_name, c.symbol AS \
currency_code, p.name AS partner_name\
FROM account_move_line l\
JOIN account_move m ON (l.move_id=m.id)\
LEFT JOIN res_currency c ON (l.currency_id=c.id)\
LEFT JOIN res_partner p ON (l.partner_id=p.id)\
JOIN account_journal j ON (l.journal_id=j.id)\
JOIN account_account acc ON (l.account_id = acc.id) \
WHERE l.account_id IN %s ''' + filters + ''' GROUP BY \
l.id, l.account_id, l.date, j.code, l.currency_id, \
l.amount_currency, l.ref, l.name, m.name, \
c.symbol, p.name ORDER BY ''' + sql_sort)
params = (tuple(accounts.ids),) + tuple(where_params)
cr.execute(sql, params)
for row in cr.dictfetchall():
balance = 0
for line in move_lines.get(row['account_id']):
balance += line['debit'] - line['credit']
row['balance'] += balance
move_lines[row.pop('account_id')].append(row)
# Calculate the debit, credit and balance for Accounts
account_res = []
for account in accounts:
currency = account.currency_id and \
account.currency_id or account.company_id.currency_id
res = dict((fn, 0.0) for fn in ['credit', 'debit', 'balance'])
res['code'] = account.code
res['name'] = account.name
res['move_lines'] = move_lines[account.id]
for line in res.get('move_lines'):
res['debit'] += line['debit']
res['credit'] += line['credit']
res['balance'] = line['balance']
if display_account == 'all':
account_res.append(res)
if display_account == 'movement' and res.get('move_lines'):
account_res.append(res)
if display_account == 'not_zero' and not currency.is_zero(
res['balance']):
account_res.append(res)
return account_res
@api.model
def _get_report_values(self, docids, data=None):
if not data.get('form') or not self.env.context.get('active_model'):
raise UserError(
_("Form content is missing, this report cannot be printed."))
model = self.env.context.get('active_model')
docs = self.env[model].browse(self.env.context.get('active_ids', []))
init_balance = data['form'].get('initial_balance', True)
sortby = data['form'].get('sortby', 'sort_date')
display_account = 'movement'
codes = []
if data['form'].get('journal_ids', False):
codes = [journal.code for journal in
self.env['account.journal'].search(
[('id', 'in', data['form']['journal_ids'])])]
account_ids = data['form']['account_ids']
accounts = self.env['account.account'].search(
[('id', 'in', account_ids)])
if not accounts:
journals = self.env['account.journal'].search([('type', '=', 'bank')])
accounts = []
for journal in journals:
accounts.append(journal.company_id.account_journal_payment_credit_account_id.id)
accounts = self.env['account.account'].search([('id', 'in', accounts)])
accounts_res = self.with_context(data['form'].get('used_context', {}))._get_account_move_entry(
accounts,
init_balance,
sortby,
display_account)
return {
'doc_ids': docids,
'doc_model': model,
'data': data['form'],
'docs': docs,
'time': time,
'Accounts': accounts_res,
'print_journal': codes,
}

134
base_accounting_kit/report/account_bank_book_view.xml

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_bank_book">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="12"/>
<t t-set="data_report_header_spacing" t-value="9"/>
<t t-set="data_report_dpi" t-value="110"/>
<t t-call="web.internal_layout">
<div class="page">
<h2><span t-esc="env.company.name"/>: Bank Book Report
</h2>
<div class="row">
<div class="col-xs-4" style="width:40%;">
<strong>Journals:</strong>
<p t-esc="', '.join([ lt or '' for lt in print_journal ])"/>
</div>
<div class="col-xs-4" style="width:30%;">
<strong>Display Account</strong>
<p>
<span t-if="data['display_account'] == 'all'">All accounts'</span>
<span t-if="data['display_account'] == 'movement'">With movements</span>
<span t-if="data['display_account'] == 'not_zero'">With balance not equal to zero</span>
</p>
</div>
<div class="col-xs-4" style="width:30%;">
<strong>Target Moves:</strong>
<p t-if="data['target_move'] == 'all'">All Entries</p>
<p t-if="data['target_move'] == 'posted'">All Posted Entries</p>
</div>
</div>
<br/>
<div class="row">
<div style="width:70%;">
<strong>Sorted By:</strong>
<p t-if="data['sortby'] == 'sort_date'">Date</p>
<p t-if="data['sortby'] == 'sort_journal_partner'">Journal and Partner</p>
</div>
<div style="width:30%;">
<t t-if="data['date_from']">
<strong>Date from :</strong>
<span t-esc="data['date_from']"/>
<br/>
</t>
<t t-if="data['date_to']">
<strong>Date to :</strong>
<span t-esc="data['date_to']"/>
</t>
</div>
</div>
<br/>
<table class="table table-condensed">
<thead>
<tr class="text-center">
<th>Date</th>
<th>JRNL</th>
<th>Partner</th>
<th>Ref</th>
<th>Move</th>
<th>Entry Label</th>
<th>Debit</th>
<th>Credit</th>
<th>Balance</th>
<th groups="base.group_multi_currency">Currency</th>
</tr>
</thead>
<tbody>
<t t-foreach="Accounts" t-as="account">
<tr style="font-weight: bold;">
<td colspan="6">
<span style="color: white;" t-esc="'..'"/>
<span t-esc="account['code']"/>
<span t-esc="account['name']"/>
</td>
<td class="text-right">
<span t-esc="account['debit']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="account['credit']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="account['balance']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td groups="base.group_multi_currency"/>
</tr>
<tr t-foreach="account['move_lines']" t-as="line">
<td>
<span t-esc="line['ldate']"/>
</td>
<td>
<span t-esc="line['lcode']"/>
</td>
<td>
<span t-esc="line['partner_name']"/>
</td>
<td>
<span t-if="line['lref']" t-esc="line['lref']"/>
</td>
<td>
<span t-esc="line['move_name']"/>
</td>
<td>
<span t-esc="line['lname']"/>
</td>
<td class="text-right">
<span t-esc="line['debit']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="line['credit']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="line['balance']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td t-if="line['amount_currency']" class="text-right" groups="base.group_multi_currency">
<span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/>
<span t-esc="line['currency_code'] if line['amount_currency'] > 0.00 else ''"/>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>
</odoo>

167
base_accounting_kit/report/account_cash_book.py

@ -0,0 +1,167 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import time
from odoo import models, api, _
from odoo.exceptions import UserError
class ReportCashBook(models.AbstractModel):
_name = 'report.base_accounting_kit.report_cash_book'
_description = 'Cash Book Report'
def _get_account_move_entry(self, accounts, init_balance, sortby,
display_account):
cr = self.env.cr
move_line = self.env['account.move.line']
move_lines = {x: [] for x in accounts.ids}
# Prepare initial sql query and Get the initial move lines
if init_balance:
init_tables, init_where_clause, init_where_params = move_line.with_context(
date_from=self.env.context.get('date_from'), date_to=False,
initial_bal=True)._query_get()
init_wheres = [""]
if init_where_clause.strip():
init_wheres.append(init_where_clause.strip())
init_filters = " AND ".join(init_wheres)
filters = init_filters.replace('account_move_line__move_id',
'm').replace('account_move_line',
'l')
sql = ("""SELECT 0 AS lid, l.account_id AS account_id, '' AS ldate, '' AS lcode, 0.0 AS amount_currency, '' AS lref, 'Initial Balance' AS lname, COALESCE(SUM(l.debit),0.0) AS debit, COALESCE(SUM(l.credit),0.0) AS credit, COALESCE(SUM(l.debit),0) - COALESCE(SUM(l.credit), 0) as balance, '' AS lpartner_id,\
'' AS move_name, '' AS mmove_id, '' AS currency_code,\
NULL AS currency_id,\
'' AS invoice_id, '' AS invoice_type, '' AS invoice_number,\
'' AS partner_name\
FROM account_move_line l\
LEFT JOIN account_move m ON (l.move_id=m.id)\
LEFT JOIN res_currency c ON (l.currency_id=c.id)\
LEFT JOIN res_partner p ON (l.partner_id=p.id)\
JOIN account_journal j ON (l.journal_id=j.id)\
WHERE l.account_id IN %s""" + filters + ' GROUP BY l.account_id')
params = (tuple(accounts.ids),) + tuple(init_where_params)
cr.execute(sql, params)
for row in cr.dictfetchall():
move_lines[row.pop('account_id')].append(row)
sql_sort = 'l.date, l.move_id'
if sortby == 'sort_journal_partner':
sql_sort = 'j.code, p.name, l.move_id'
# Prepare sql query base on selected parameters from wizard
tables, where_clause, where_params = move_line._query_get()
wheres = [""]
if where_clause.strip():
wheres.append(where_clause.strip())
filters = " AND ".join(wheres)
filters = filters.replace('account_move_line__move_id', 'm').replace(
'account_move_line', 'l')
if not accounts:
journals = self.env['account.journal'].search([('type', '=', 'cash')])
accounts = []
for journal in journals:
accounts.append(journal.company_id.account_journal_payment_credit_account_id.id)
accounts = self.env['account.account'].search([('id','in',accounts)])
# Get move lines base on sql query and Calculate the total balance of move lines
sql = ('''SELECT l.id AS lid, l.account_id AS account_id, l.date AS ldate, j.code AS lcode, l.currency_id, l.amount_currency, l.ref AS lref, l.name AS lname, COALESCE(l.debit,0) AS debit, COALESCE(l.credit,0) AS credit, COALESCE(SUM(l.debit),0) - COALESCE(SUM(l.credit), 0) AS balance,\
m.name AS move_name, c.symbol AS currency_code, p.name AS partner_name\
FROM account_move_line l\
JOIN account_move m ON (l.move_id=m.id)\
LEFT JOIN res_currency c ON (l.currency_id=c.id)\
LEFT JOIN res_partner p ON (l.partner_id=p.id)\
JOIN account_journal j ON (l.journal_id=j.id)\
JOIN account_account acc ON (l.account_id = acc.id) \
WHERE l.account_id IN %s ''' + filters + ''' GROUP BY l.id, l.account_id, l.date, j.code, l.currency_id, l.amount_currency, l.ref, l.name, m.name, c.symbol, p.name ORDER BY ''' + sql_sort)
params = (tuple(accounts.ids),) + tuple(where_params)
cr.execute(sql, params)
for row in cr.dictfetchall():
balance = 0
for line in move_lines.get(row['account_id']):
balance += line['debit'] - line['credit']
row['balance'] += balance
move_lines[row.pop('account_id')].append(row)
# Calculate the debit, credit and balance for Accounts
account_res = []
for account in accounts:
currency = account.currency_id and account.currency_id or account.company_id.currency_id
res = dict((fn, 0.0) for fn in ['credit', 'debit', 'balance'])
res['code'] = account.code
res['name'] = account.name
res['move_lines'] = move_lines[account.id]
for line in res.get('move_lines'):
res['debit'] += line['debit']
res['credit'] += line['credit']
res['balance'] = line['balance']
if display_account == 'all':
account_res.append(res)
if display_account == 'movement' and res.get('move_lines'):
account_res.append(res)
if display_account == 'not_zero' and not currency.is_zero(
res['balance']):
account_res.append(res)
return account_res
@api.model
def _get_report_values(self, docids, data=None):
if not data.get('form') or not self.env.context.get('active_model'):
raise UserError(
_("Form content is missing, this report cannot be printed."))
model = self.env.context.get('active_model')
docs = self.env[model].browse(
self.env.context.get('active_ids', []))
init_balance = data['form'].get('initial_balance', True)
sortby = data['form'].get('sortby', 'sort_date')
display_account = 'movement'
codes = []
if data['form'].get('journal_ids', False):
codes = [journal.code for journal in
self.env['account.journal'].search(
[('id', 'in', data['form']['journal_ids'])])]
account_ids = data['form']['account_ids']
accounts = self.env['account.account'].search(
[('id', 'in', account_ids)])
if not accounts:
journals = self.env['account.journal'].search([('type', '=', 'cash')])
accounts = []
for journal in journals:
accounts.append(journal.company_id.account_journal_payment_credit_account_id.id)
accounts = self.env['account.account'].search([('id', 'in', accounts)])
accounts_res = self.with_context(
data['form'].get('used_context', {}))._get_account_move_entry(
accounts,
init_balance,
sortby,
display_account)
return {
'doc_ids': docids,
'doc_model': model,
'data': data['form'],
'docs': docs,
'time': time,
'Accounts': accounts_res,
'print_journal': codes,
}

108
base_accounting_kit/report/account_cash_book_view.xml

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_cash_book">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="12"/>
<t t-set="data_report_header_spacing" t-value="9"/>
<t t-set="data_report_dpi" t-value="110"/>
<t t-call="web.internal_layout">
<div class="page">
<h2><span t-esc="env.company.name"/>: Cash Book Report</h2>
<div class="row">
<div class="col-xs-4" style="width:40%;">
<strong>Journals:</strong>
<p t-esc="', '.join([ lt or '' for lt in print_journal ])"/>
</div>
<div class="col-xs-4" style="width:30%;">
<strong>Display Account</strong>
<p>
<span t-if="data['display_account'] == 'all'">All accounts'</span>
<span t-if="data['display_account'] == 'movement'">With movements</span>
<span t-if="data['display_account'] == 'not_zero'">With balance not equal to zero</span>
</p>
</div>
<div class="col-xs-4" style="width:30%;">
<strong>Target Moves:</strong>
<p t-if="data['target_move'] == 'all'">All Entries</p>
<p t-if="data['target_move'] == 'posted'">All Posted Entries</p>
</div>
</div>
<br/>
<div class="row">
<div style="width:70%;">
<strong>Sorted By:</strong>
<p t-if="data['sortby'] == 'sort_date'">Date</p>
<p t-if="data['sortby'] == 'sort_journal_partner'">Journal and Partner</p>
</div>
<div style="width:30%;">
<t t-if="data['date_from']"><strong>Date from :</strong> <span t-esc="data['date_from']"/><br/></t>
<t t-if="data['date_to']"><strong>Date to :</strong> <span t-esc="data['date_to']"/></t>
</div>
</div>
<br/>
<table class="table table-condensed">
<thead>
<tr class="text-center">
<th>Date</th>
<th>JRNL</th>
<th>Partner</th>
<th>Ref</th>
<th>Move</th>
<th>Entry Label</th>
<th>Debit</th>
<th>Credit</th>
<th>Balance</th>
<th groups="base.group_multi_currency">Currency</th>
</tr>
</thead>
<tbody>
<t t-foreach="Accounts" t-as="account">
<tr style="font-weight: bold;">
<td colspan="6">
<span style="color: white;" t-esc="'..'"/>
<span t-esc="account['code']"/>
<span t-esc="account['name']"/>
</td>
<td class="text-right">
<span t-esc="account['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="account['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="account['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td groups="base.group_multi_currency"/>
</tr>
<tr t-foreach="account['move_lines']" t-as="line">
<td><span t-esc="line['ldate']"/></td>
<td><span t-esc="line['lcode']"/></td>
<td><span t-esc="line['partner_name']"/></td>
<td><span t-if="line['lref']" t-esc="line['lref']"/></td>
<td><span t-esc="line['move_name']"/></td>
<td><span t-esc="line['lname']"/></td>
<td class="text-right">
<span t-esc="line['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="line['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td t-if="line['amount_currency']" class="text-right" groups="base.group_multi_currency">
<span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/>
<span t-esc="line['currency_code'] if line['amount_currency'] > 0.00 else ''"/>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>
</odoo>

125
base_accounting_kit/report/account_day_book.py

@ -0,0 +1,125 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from datetime import timedelta, datetime
from odoo import models, api, _
from odoo.exceptions import UserError
class DayBookPdfReport(models.AbstractModel):
_name = 'report.base_accounting_kit.day_book_report_template'
_description = 'Day Book Report'
def _get_account_move_entry(self, accounts, form_data, pass_date):
cr = self.env.cr
move_line = self.env['account.move.line']
tables, where_clause, where_params = move_line._query_get()
wheres = [""]
if where_clause.strip():
wheres.append(where_clause.strip())
if form_data['target_move'] == 'posted':
target_move = "AND m.state = 'posted'"
else:
target_move = ''
sql = ('''
SELECT l.id AS lid, acc.name as accname, l.account_id AS account_id, l.date AS ldate, j.code AS lcode, l.currency_id,
l.amount_currency, l.ref AS lref, l.name AS lname, COALESCE(l.debit,0) AS debit, COALESCE(l.credit,0) AS credit,
COALESCE(SUM(l.debit),0) - COALESCE(SUM(l.credit), 0) AS balance,
m.name AS move_name, c.symbol AS currency_code, p.name AS partner_name
FROM account_move_line l
JOIN account_move m ON (l.move_id=m.id)
LEFT JOIN res_currency c ON (l.currency_id=c.id)
LEFT JOIN res_partner p ON (l.partner_id=p.id)
JOIN account_journal j ON (l.journal_id=j.id)
JOIN account_account acc ON (l.account_id = acc.id)
WHERE l.account_id IN %s AND l.journal_id IN %s ''' + target_move + ''' AND l.date = %s
GROUP BY l.id, l.account_id, l.date,
j.code, l.currency_id, l.amount_currency, l.ref, l.name, m.name, c.symbol, p.name , acc.name
ORDER BY l.date DESC
''')
params = (
tuple(accounts.ids), tuple(form_data['journal_ids']), pass_date)
cr.execute(sql, params)
data = cr.dictfetchall()
res = {}
debit = credit = balance = 0.00
for line in data:
debit += line['debit']
credit += line['credit']
balance += line['balance']
res['debit'] = debit
res['credit'] = credit
res['balance'] = balance
res['lines'] = data
return res
@api.model
def _get_report_values(self, docids, data=None):
if not data.get('form') or not self.env.context.get('active_model'):
raise UserError(
_("Form content is missing, this report cannot be printed."))
model = self.env.context.get('active_model')
docs = self.env[model].browse(
self.env.context.get('active_ids', []))
form_data = data['form']
codes = []
if data['form'].get('journal_ids', False):
codes = [journal.code for journal in
self.env['account.journal'].search(
[('id', 'in', data['form']['journal_ids'])])]
active_acc = data['form']['account_ids']
accounts = self.env['account.account'].search(
[('id', 'in', active_acc)]) if data['form']['account_ids'] else \
self.env['account.account'].search([])
date_start = datetime.strptime(form_data['date_from'],
'%Y-%m-%d').date()
date_end = datetime.strptime(form_data['date_to'], '%Y-%m-%d').date()
days = date_end - date_start
dates = []
record = []
for i in range(days.days + 1):
dates.append(date_start + timedelta(days=i))
for head in dates:
pass_date = str(head)
accounts_res = self.with_context(
data['form'].get('used_context', {}))._get_account_move_entry(
accounts, form_data, pass_date)
if accounts_res['lines']:
record.append({
'date': head,
'debit': accounts_res['debit'],
'credit': accounts_res['credit'],
'balance': accounts_res['balance'],
'child_lines': accounts_res['lines']
})
return {
'doc_ids': docids,
'doc_model': model,
'data': data['form'],
'docs': docs,
'time': time,
'Accounts': record,
'print_journal': codes,
}

115
base_accounting_kit/report/account_day_book_view.xml

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="day_book_report_template">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="12"/>
<t t-set="data_report_header_spacing" t-value="9"/>
<t t-set="data_report_dpi" t-value="110"/>
<t t-call="web.internal_layout">
<div class="page">
<h2><span t-esc="env.company.name"/>: Day Book Report
</h2>
<div class="row mt32" style="margin-bottom:3%;">
<div class="col-7">
<strong>Journals:</strong>
<p t-esc="', '.join([ lt or '' for lt in print_journal ])"/>
</div>
<div class="col-2">
<strong>Target Moves:</strong>
<p t-if="data['target_move'] == 'all'">All Entries</p>
<p t-if="data['target_move'] == 'posted'">All Posted Entries</p>
</div>
<div class="col-3">
<t t-if="data['date_from']">
<strong>Date from :</strong>
<span t-esc="data['date_from']"/>
<br/>
</t>
<t t-if="data['date_to']">
<strong>Date to :</strong>
<span t-esc="data['date_to']"/>
</t>
</div>
</div>
<table class="table table-condensed">
<thead>
<tr class="text-center">
<th>Date</th>
<th>JRNL</th>
<th>Partner</th>
<th>Ref</th>
<th>Move</th>
<th>Entry Label</th>
<th>Debit</th>
<th>Credit</th>
<th>Balance</th>
<th groups="base.group_multi_currency">Currency</th>
</tr>
</thead>
<tbody>
<t t-foreach="Accounts" t-as="account">
<tr style="font-weight: bold;background: #ededed;">
<td colspan="6">
<span style="color: white;" t-esc="'..'"/>
<span t-esc="account['date']"/>
</td>
<td class="text-right">
<span t-esc="account['debit']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="account['credit']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="account['balance']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td groups="base.group_multi_currency"/>
</tr>
<tr t-foreach="account['child_lines']" t-as="line">
<td>
<span t-esc="line['ldate']"/>
</td>
<td>
<span t-esc="line['lcode']"/>
</td>
<td>
<span t-esc="line['partner_name']"/>
</td>
<td>
<span t-if="line['lref']" t-esc="line['lref']"/>
</td>
<td>
<span t-esc="line['move_name']"/>
</td>
<td>
<span t-esc="line['lname']"/>
</td>
<td class="text-right">
<span t-esc="line['debit']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="line['credit']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="line['balance']"
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
</td>
<td t-if="line['amount_currency']" class="text-right" groups="base.group_multi_currency">
<span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/>
<span t-esc="line['currency_code'] if line['amount_currency'] > 0.00 else ''"/>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>
</odoo>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save