Browse Source

Jun 30 : [IMP] Updated 'base_accounting_kit'

pull/280/head
AjmalCybro 2 years ago
parent
commit
e7f3f06e2d
  1. 14
      base_accounting_kit/README.rst
  2. 9
      base_accounting_kit/__manifest__.py
  3. 10
      base_accounting_kit/doc/RELEASE_NOTES.md
  4. 1
      base_accounting_kit/models/__init__.py
  5. 13
      base_accounting_kit/models/account_account.py
  6. 2
      base_accounting_kit/models/account_asset.py
  7. 24
      base_accounting_kit/models/account_dashboard.py
  8. 4
      base_accounting_kit/models/account_journal.py
  9. 11
      base_accounting_kit/models/account_move.py
  10. 4
      base_accounting_kit/models/account_payment.py
  11. 2
      base_accounting_kit/models/credit_limit.py
  12. 32
      base_accounting_kit/models/multiple_invoice.py
  13. 60
      base_accounting_kit/models/multiple_invoice_layout.py
  14. 31
      base_accounting_kit/models/payment_matching.py
  15. 9
      base_accounting_kit/models/product_template.py
  16. 25
      base_accounting_kit/models/recurring_payments.py
  17. 6
      base_accounting_kit/models/res_config_settings.py
  18. 18
      base_accounting_kit/models/res_partner.py
  19. 50
      base_accounting_kit/report/account_asset_report.py
  20. 2
      base_accounting_kit/report/account_bank_book.py
  21. 2
      base_accounting_kit/report/account_cash_book.py
  22. 2
      base_accounting_kit/report/account_day_book.py
  23. 1
      base_accounting_kit/report/account_report_common_account.py
  24. 1
      base_accounting_kit/report/cash_flow_report.py
  25. 1
      base_accounting_kit/report/general_ledger_report.py
  26. 32
      base_accounting_kit/report/multiple_invoice_report.py
  27. 12
      base_accounting_kit/report/report_aged_partner.py
  28. 38
      base_accounting_kit/report/report_financial.py
  29. 9
      base_accounting_kit/report/report_journal_audit.py
  30. 1
      base_accounting_kit/report/report_partner_ledger.py
  31. 10
      base_accounting_kit/report/report_tax.py
  32. 1
      base_accounting_kit/report/report_trial_balance.py
  33. BIN
      base_accounting_kit/static/description/assets/icons/logo.png
  34. 0
      base_accounting_kit/static/description/images/xlsx_image.png
  35. 111
      base_accounting_kit/static/description/index.html
  36. 9
      base_accounting_kit/views/account_asset_templates.xml
  37. 18
      base_accounting_kit/views/assets.xml
  38. 1
      base_accounting_kit/wizard/__init__.py
  39. 84
      base_accounting_kit/wizard/account_bank_book_wizard.py
  40. 26
      base_accounting_kit/wizard/account_cash_book_wizard.py
  41. 69
      base_accounting_kit/wizard/account_day_book_wizard.py
  42. 18
      base_accounting_kit/wizard/account_lock_date.py
  43. 11
      base_accounting_kit/wizard/account_report_common_partner.py
  44. 5
      base_accounting_kit/wizard/aged_partner.py
  45. 1
      base_accounting_kit/wizard/aged_partner.xml
  46. 16
      base_accounting_kit/wizard/asset_depreciation_confirmation_wizard.py
  47. 34
      base_accounting_kit/wizard/asset_modify.py
  48. 42
      base_accounting_kit/wizard/cash_flow_report.py
  49. 77
      base_accounting_kit/wizard/financial_report.py
  50. 19
      base_accounting_kit/wizard/general_ledger.py
  51. 10
      base_accounting_kit/wizard/journal_audit.py
  52. 10
      base_accounting_kit/wizard/partner_ledger.py
  53. 1
      base_accounting_kit/wizard/tax_report.py
  54. 9
      base_accounting_kit/wizard/trial_balance.py

14
base_accounting_kit/README.rst

@ -1,5 +1,9 @@
Accounting Kit
==============
.. image:: https://img.shields.io/badge/licence-LGPL--3-green.svg
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Odoo 15 Full Accounting Kit
===========================
* Full accounting kit for Odoo 15 community editions
Installation
@ -10,7 +14,7 @@ Installation
License
-------
General Public License, Version 3 (LGPL v3).
(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html)
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html)
Company
-------
@ -36,6 +40,9 @@ Bugs are tracked on GitHub Issues. In case of trouble, please check there if you
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 https://www.cybrosys.com
@ -43,4 +50,3 @@ For support and more information, please visit https://www.cybrosys.com
Further information
===================
HTML Description: `<static/description/index.html>`__

9
base_accounting_kit/__manifest__.py

@ -19,10 +19,9 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Odoo 15 Full Accounting Kit',
'version': '15.0.2.2.4',
'version': '15.0.2.2.5',
'category': 'Accounting',
'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs',
'summary': """ Asset and Budget Management,
@ -50,7 +49,8 @@
'website': "https://www.cybrosys.com",
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'depends': ['base', 'account', 'sale', 'account_check_printing', 'base_account_budget'],
'depends': ['base', 'account', 'sale', 'account_check_printing',
'base_account_budget'],
'data': [
'security/ir.model.access.csv',
'security/security.xml',
@ -61,7 +61,6 @@
'data/account_asset_data.xml',
'data/recurring_entry_cron.xml',
'data/multiple_invoice_data.xml',
'views/assets.xml',
'views/dashboard_views.xml',
'views/reports_config_view.xml',
'views/accounting_menu.xml',
@ -77,7 +76,6 @@
'wizard/asset_modify_views.xml',
'views/account_asset_views.xml',
'views/account_move_views.xml',
'views/account_asset_templates.xml',
'views/product_template_views.xml',
'views/payment_matching.xml',
'views/multiple_invoice_layout_view.xml',
@ -125,7 +123,6 @@
'base_accounting_kit/static/lib/Chart.min.js',
'base_accounting_kit/static/lib/Chart.js',
'base_accounting_kit/static/lib/bootstrap-toggle-master/js/bootstrap-toggle.min.js',
],
'web.assets_qweb': [
'base_accounting_kit/static/src/xml/template.xml',

10
base_accounting_kit/doc/RELEASE_NOTES.md

@ -3,14 +3,13 @@
#### 06.10.2021
#### Version 15.0.1.0.0
#### ADD
- Initial commit for Odoo 15 accounting
- Initial commit for Odoo 15 Full Accounting Kit
#### 20.11.2021
#### Version 15.0.2.0.1
#### ADD
- Added specific user group for Accounting Dashboard view.
#### 14.01.2022
#### Version 15.0.2.0.2
#### FIX
@ -24,4 +23,9 @@
#### 28.04.2023
#### Version 15.0.2.2.4
#### FIX
- asset closing issue is fixed
- asset closing issue is fixed
#### 27.06.2023
#### Version 15.0.2.2.5
#### REF
- Refactor code and remove unused files

1
base_accounting_kit/models/__init__.py

@ -1,4 +1,3 @@
#############################################################################
# -*- coding: utf-8 -*-
#############################################################################
#

13
base_accounting_kit/models/account_account.py

@ -19,21 +19,21 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from odoo import api, models, fields, _
from odoo.exceptions import UserError
class CashFlow(models.Model):
_inherit = 'account.account'
def get_cash_flow_ids(self):
cash_flow_id = self.env.ref('base_accounting_kit.account_financial_report_cash_flow0')
def _domain_cash_flow_type(self):
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)
cash_flow_type = fields.Many2one(
'account.financial.report', string="Cash Flow type",
domain=_domain_cash_flow_type)
@api.onchange('cash_flow_type')
def onchange_cash_flow_type(self):
@ -42,7 +42,6 @@ class CashFlow(models.Model):
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

2
base_accounting_kit/models/account_asset.py

@ -19,10 +19,8 @@
# 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, _

24
base_accounting_kit/models/account_dashboard.py

@ -1,12 +1,30 @@
# -*- 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/>.
#
#############################################################################
import calendar
import datetime
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import models, api
from odoo import api, models
from odoo.http import request

4
base_accounting_kit/models/account_journal.py

@ -20,7 +20,7 @@
#
#############################################################################
from odoo import models, api
from odoo import api, models
class AccountJournal(models.Model):
@ -46,4 +46,4 @@ class AccountJournal(models.Model):
'type': 'ir.actions.client',
'tag': 'manual_reconciliation_view',
'context': action_context,
}
}

11
base_accounting_kit/models/account_move.py

@ -19,13 +19,10 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from odoo.addons.base.models import decimal_precision as dp
from odoo.exceptions import UserError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF
@ -33,9 +30,9 @@ from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF
class AccountMove(models.Model):
_inherit = 'account.move'
asset_depreciation_ids = fields.One2many('account.asset.depreciation.line',
'move_id',
string='Assets Depreciation Lines')
asset_depreciation_ids = fields.One2many(
'account.asset.depreciation.line', 'move_id',
string='Assets Depreciation Lines')
def button_cancel(self):
for move in self:
@ -44,7 +41,6 @@ class AccountMove(models.Model):
return super(AccountMove, self).button_cancel()
def post(self):
self.mapped('asset_depreciation_ids').post_lines_and_close_asset()
return super(AccountMove, self).post()
@ -67,7 +63,6 @@ class AccountMove(models.Model):
def action_post(self):
self.mapped('asset_depreciation_ids').post_lines_and_close_asset()
result = super(AccountMove, self).action_post()
for inv in self:
context = dict(self.env.context)
# Within the context of an invoice,

4
base_accounting_kit/models/account_payment.py

@ -19,7 +19,7 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api, _
from odoo import api, fields, models, _
from odoo.exceptions import UserError
@ -153,4 +153,4 @@ class AccountPaymentMethod(models.Model):
def _get_payment_method_information(self):
res = super()._get_payment_method_information()
res['pdc'] = {'mode': 'multi', 'domain': [('type', '=', 'bank')]}
return res
return res

2
base_accounting_kit/models/credit_limit.py

@ -20,7 +20,7 @@
#
#############################################################################
from odoo import models, fields, api
from odoo import api, fields, models
from odoo.exceptions import UserError
from odoo.tools.translate import _

32
base_accounting_kit/models/multiple_invoice.py

@ -1,4 +1,24 @@
# -*- 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 fields, models
@ -7,8 +27,8 @@ class MultipleInvoice(models.Model):
_name = "multiple.invoice"
_order = "sequence"
sequence = fields.Integer('Sequence No')
copy_name = fields.Char('Invoice Copy Name')
sequence = fields.Integer(string='Sequence No')
copy_name = fields.Char(string='Invoice Copy Name')
journal_id = fields.Many2one('account.journal', string="Journal")
@ -21,26 +41,20 @@ class AccountJournal(models.Model):
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')
body_text_position = fields.Selection([
('tl', 'Top Left'),
('tr', 'Top Right'),
('bl', 'Bottom Left'),
('br', 'Bottom Right'),
], default='tl')
text_align = fields.Selection([
('right', 'Right'),
('left', 'Left'),
('center', 'Center'),
], default='right')
layout = fields.Char(related="company_id.external_report_layout_id.key")
layout = fields.Char(related="company_id.external_report_layout_id.key")

60
base_accounting_kit/models/multiple_invoice_layout.py

@ -1,7 +1,25 @@
# -*- 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.modules import get_resource_path
try:
@ -24,44 +42,29 @@ class MultipleInvoiceLayout(models.TransientModel):
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)
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)
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)
@ -86,11 +89,9 @@ class MultipleInvoiceLayout(models.TransientModel):
raise_if_not_found=False)
if not template_style:
return b''
company_styles = template_style._render({
'company_ids': self.company_id,
})
return company_styles
@api.model
@ -108,16 +109,13 @@ class MultipleInvoiceLayout(models.TransientModel):
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,
@ -133,19 +131,15 @@ class MultipleInvoiceLayout(models.TransientModel):
def _get_layout_for_preview(self):
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
return self.env.context.get('report_action') or {
'type': 'ir.actions.act_window_close'}
'type': 'ir.actions.act_window_close'}

31
base_accounting_kit/models/payment_matching.py

@ -1,6 +1,26 @@
# -*- 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/>.
#
#############################################################################
import copy
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.osv import expression
@ -1175,6 +1195,9 @@ class AccountBankStatementLine(models.Model):
class ResCompany(models.Model):
_inherit = "res.company"
account_bank_reconciliation_start = fields.Date(string="Bank Reconciliation Threshold", help="""The bank reconciliation widget won't ask to reconcile payments older than this date.
This is useful if you install accounting after having used invoicing for some time and
don't want to reconcile all the past payments with bank statements.""")
account_bank_reconciliation_start = fields.Date(
string="Bank Reconciliation Threshold",
help="The bank reconciliation widget won't ask to reconcile payments "
"older than this date. This is useful if you install accounting "
"after having used invoicing for some time and don't want to "
"reconcile all the past payments with bank statements.")

9
base_accounting_kit/models/product_template.py

@ -19,15 +19,18 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
class ProductTemplate(models.Model):
_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")
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()

25
base_accounting_kit/models/recurring_payments.py

@ -19,12 +19,10 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import datetime, date
from datetime import date, datetime
from dateutil.relativedelta import relativedelta
from odoo import models, fields, api, _
from odoo.exceptions import UserError
from odoo import api, fields, models, _
class FilterRecurringEntries(models.Model):
@ -90,7 +88,8 @@ class RecurringPayments(models.Model):
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')
recurring_lines = fields.One2many(
'account.recurring.entries.line', 'tmpl_id')
@api.onchange('partner_id')
def onchange_partner_id(self):
@ -167,13 +166,11 @@ class RecurringPayments(models.Model):
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')
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')

6
base_accounting_kit/models/res_config_settings.py

@ -19,8 +19,7 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
@ -40,5 +39,4 @@ class ResConfigSettings(models.TransientModel):
def set_values(self):
super(ResConfigSettings, self).set_values()
self.env['ir.config_parameter'].sudo().set_param(
"customer_credit_limit",
self.customer_credit_limit)
"customer_credit_limit", self.customer_credit_limit)

18
base_accounting_kit/models/res_partner.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from datetime import date, timedelta
from odoo import fields, models
@ -28,12 +27,11 @@ 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')]))
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',
@ -44,8 +42,7 @@ class ResPartner(models.Model):
[('in_need_of_action', 'In need of action'),
('with_overdue_invoices', 'With overdue invoices'),
('no_action_needed', 'No action needed')],
string='Followup status',
)
string='Followup status')
def _compute_for_followup(self):
"""
@ -99,14 +96,11 @@ class ResPartner(models.Model):
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:

50
base_accounting_kit/report/account_asset_report.py

@ -1,6 +1,24 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
#############################################################################
#
# 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, tools
@ -12,19 +30,29 @@ class AssetAssetReport(models.Model):
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)
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)
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)
company_id = fields.Many2one(
'res.company', string='Company', readonly=True)
def init(self):
tools.drop_view_if_exists(self._cr, 'asset_asset_report')

2
base_accounting_kit/report/account_bank_book.py

@ -21,7 +21,7 @@
#############################################################################
from datetime import time
from odoo import models, api, _
from odoo import api, models, _
from odoo.exceptions import UserError

2
base_accounting_kit/report/account_cash_book.py

@ -21,7 +21,7 @@
#############################################################################
from datetime import time
from odoo import models, api, _
from odoo import api, models, _
from odoo.exceptions import UserError

2
base_accounting_kit/report/account_day_book.py

@ -22,7 +22,7 @@
import time
from datetime import timedelta, datetime
from odoo import models, api, _
from odoo import api, models, _
from odoo.exceptions import UserError

1
base_accounting_kit/report/account_report_common_account.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models

1
base_accounting_kit/report/cash_flow_report.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from odoo import api, models, _

1
base_accounting_kit/report/general_ledger_report.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from odoo import api, models, _

32
base_accounting_kit/report/multiple_invoice_report.py

@ -1,6 +1,25 @@
# -*- coding: utf-8 -*-
from odoo import models, api
#############################################################################
#
# 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, models
class ReportInvoiceMultiple(models.AbstractModel):
@ -10,28 +29,21 @@ class ReportInvoiceMultiple(models.AbstractModel):
@api.model
def _get_report_values(self, docids, data=None):
rslt = super()._get_report_values(docids, data)
inv = rslt['docs']
layout = inv.journal_id.company_id.external_report_layout_id.key
if layout == 'web.external_layout_boxed':
new_layout = 'base_accounting_kit.boxed'
elif layout == 'web.external_layout_bold':
new_layout = 'base_accounting_kit.bold'
elif layout == 'web.external_layout_striped':
new_layout = 'base_accounting_kit.striped'
else:
new_layout = 'base_accounting_kit.standard'
rslt['mi_type'] = inv.journal_id.multiple_invoice_type
rslt['mi_ids'] = inv.journal_id.multiple_invoice_ids
rslt['txt_position'] = inv.journal_id.text_position
rslt['body_txt_position'] = inv.journal_id.body_text_position
rslt['txt_align'] = inv.journal_id.text_align
rslt['layout'] = new_layout
rslt['report_type'] = data.get('report_type') if data else ''
return rslt
return rslt

12
base_accounting_kit/report/report_aged_partner.py

@ -19,10 +19,8 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import api, models, _
@ -287,17 +285,15 @@ class ReportAgedPartnerBalance(models.AbstractModel):
else:
account_type = ['payable', 'receivable']
movelines, total, dummy = self._get_partner_move_lines(account_type,
date_from,
target_move,
data['form'][
'period_length'])
move_lines, total, dummy = self._get_partner_move_lines(
account_type, date_from, target_move,
data['form']['period_length'])
return {
'doc_ids': self.ids,
'doc_model': model,
'data': data['form'],
'docs': docs,
'time': time,
'get_partner_lines': movelines,
'get_partner_lines': move_lines,
'get_direction': total,
}

38
base_accounting_kit/report/report_financial.py

@ -33,7 +33,7 @@ class AccountFinancialReport(models.Model):
_rec_name = 'name'
@api.depends('parent_id', 'parent_id.level')
def _get_level(self):
def _compute_level(self):
"""Returns a dictionary with key=the ID of a record and
value = the level of this
record in the tree structure."""
@ -54,35 +54,27 @@ class AccountFinancialReport(models.Model):
res += child._get_children_by_order()
return res
name = fields.Char('Report Name', required=True, translate=True)
parent_id = fields.Many2one('account.financial.report', 'Parent')
name = fields.Char(string='Report Name', required=True, translate=True)
parent_id = fields.Many2one('account.financial.report', string='Parent')
children_ids = fields.One2many(
'account.financial.report',
'parent_id',
'Account Report')
'account.financial.report', 'parent_id', string='Account Report')
sequence = fields.Integer('Sequence')
level = fields.Integer(compute='_get_level', string='Level', store=True)
level = fields.Integer(
compute='_compute_level', string='Level', store=True)
type = fields.Selection(
[('sum', 'View'),
('accounts', 'Accounts'),
('account_type', 'Account Type'),
('account_report', 'Report Value')],
'Type',
default='sum')
string='Type', default='sum')
account_ids = fields.Many2many(
'account.account',
'account_account_financial_report',
'report_line_id',
'account_id',
'Accounts')
'account.account', 'account_account_financial_report',
'report_line_id', 'account_id', string='Accounts')
account_report_id = fields.Many2one(
'account.financial.report',
'Report Value')
'account.financial.report', string='Report Value')
account_type_ids = fields.Many2many(
'account.account.type',
'account_account_financial_report_type',
'report_id', 'account_type_id',
'Account Types')
'account.account.type', 'account_account_financial_report_type',
'report_id', 'account_type_id', string='Account Types')
sign = fields.Selection(
[("-1", 'Reverse balance sign'), ("1", 'Preserve balance sign')],
'Sign on Reports', required=True, default="1",
@ -100,8 +92,7 @@ class AccountFinancialReport(models.Model):
[('no_detail', 'No detail'),
('detail_flat', 'Display children flat'),
('detail_with_hierarchy', 'Display children with hierarchy')],
'Display details',
default='detail_flat')
string='Display details', default='detail_flat')
style_overwrite = fields.Selection(
[('0', 'Automatic formatting'),
('1', 'Main Title 1 (bold, underlined)'),
@ -110,8 +101,7 @@ class AccountFinancialReport(models.Model):
('4', 'Normal Text'),
('5', 'Italic Text (smaller)'),
('6', 'Smallest Text')],
'Financial Report Style',
default='0',
string='Financial Report Style', default='0',
help="You can set up here the format you want this"
" record to be displayed. If you leave the"
" automatic formatting, it will be computed"

9
base_accounting_kit/report/report_journal_audit.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from odoo import api, models, _
@ -133,17 +132,13 @@ class ReportJournal(models.AbstractModel):
if not data.get('form'):
raise UserError(
_("Form content is missing, this report cannot be printed."))
target_move = data['form'].get('target_move', 'all')
sort_selection = data['form'].get('sort_selection', 'date')
res = {}
for journal in data['form']['journal_ids']:
res[journal] = self.with_context(
data['form'].get('used_context', {})).lines(target_move,
journal,
sort_selection,
data)
data['form'].get('used_context', {})).lines(
target_move, journal, sort_selection, data)
return {
'doc_ids': data['form']['journal_ids'],
'doc_model': self.env['account.journal'],

1
base_accounting_kit/report/report_partner_ledger.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from odoo import api, models, _

10
base_accounting_kit/report/report_tax.py

@ -19,8 +19,7 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from _datetime import datetime
from datetime import datetime
from odoo import api, models, _
from odoo.exceptions import UserError
@ -98,10 +97,9 @@ class ReportTax(models.AbstractModel):
strict_range=True)._compute_from_amls(options,
taxes)
elif options['date_from'] and options['date_to']:
self.with_context(date_from=options['date_from'],
date_to=options['date_to'],
strict_range=True)._compute_from_amls(options,
taxes)
self.with_context(
date_from=options['date_from'], date_to=options['date_to'],
strict_range=True)._compute_from_amls(options, taxes)
else:
date_to = str(datetime.today().date())
self.with_context(date_to=date_to,

1
base_accounting_kit/report/report_trial_balance.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from odoo import api, models, _

BIN
base_accounting_kit/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

0
base_accounting_kit/static/description/images/xslx_image.png → base_accounting_kit/static/description/images/xlsx_image.png

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

111
base_accounting_kit/static/description/index.html

@ -1,3 +1,17 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between" style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
</div>
</div>
</div>
</div>
<!-- HERO -->
<section class="container oe_container" style="padding: 3em 3.5rem; background-color: #fff ; border-radius: 15px;">
<div class="row">
@ -7,7 +21,7 @@
Full Accounting Kit</h1>
<p class="lead text-center" style="color: #102e42;">A full-fledged accounting kit for every
organization.</p>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 100px;" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 100px;"/>
<img class="mt-4" src="./images/hero.png" height="450px" width="auto">
</div>
</div>
@ -17,7 +31,7 @@
<section class="container oe_container" style="padding: 3em 3.5rem; background-color: #fff ;">
<div class="row" style="margin-top: 2rem;">
<div class="col-lg-12">
<div class="d-flex align-itmes-center" style=" border-bottom: 2px solid #0a1e2c; padding-bottom: 5px;">
<div class="d-flex align-items-center" style=" border-bottom: 2px solid #0a1e2c; padding-bottom: 5px;">
<img class="mr-1" src="./images/icons/update.png" style="height: 28px; width: auto;">
<h5 class="font-weight-bold "
style="font-size: 0.9375rem; font-family: Montserrat,'sans-serif'; color: #0a1e2c; margin-top: 0.3rem">
@ -83,7 +97,7 @@
</div>
<div class="col-lg-6 px-4 py-3" style="background-color: #fff;">
<h4>Overview</h4>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" />
<p style="font-size: 0.9rem; line-height: 1.6; font-family: Roboto, 'sans-serif'; color: #636e72;">
Accounting in odoo is sufficient for any organization to meet all their needs related to
accounting.
@ -115,44 +129,44 @@
<h4 class="font-weight-bold" style="color: #0a1e2c;">All Features</h4>
</div>
<div class="col-lg-4 mt-4">
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Specific User Group for Accounting
Dashboard</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Multiple Invoice Copies Option</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Reconciliation Widget</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Accounting Dashboard with all
necessary details</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Manage Customer follow-ups</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">PDC management is now in</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Accounting lock dates for Odoo 15
@ -162,40 +176,40 @@
</div>
<div class="col-lg-4 mt-4">
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Customer credit limit</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Handle Recurring payments in Odoo
</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Asset management system for Odoo
15 community edition</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Multiple Invoice Copies</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Day book, Bank book and Cash book
reports</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Financial reports</p>
@ -205,37 +219,37 @@
<div class="col-lg-4 mt-4">
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Trial balance report</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Journal audit report</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">General ledger report</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Partner ledger report</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Aged partner balance</p>
</div>
<div class="px-3 pt-3 my-2 d-flex align-itmes-center"
<div class="px-3 pt-3 my-2 d-flex align-items-center"
style="background-color: #fff; border: 1px solid #d5d5d5; border-radius: 5px;">
<i class="fa fa-check-circle mt-1 mr-2 deep-1" style="color: #27ae60; font-size: 1.3rem;"></i>
<p style="color: #102e42; font-weight: 500; margin-top: 1px;">Tax reports</p>
@ -253,7 +267,7 @@
<div class="deep-2"
style="background-color: #fff; background-image: url('./images/yellow-pattern.png'); background-position: bottom; background-size: cover; background-repeat: no-repeat ; padding: 2rem 2.5rem; border-radius: 15px;">
<h5 style="font-family: Montserrat, 'sans-serif';">Arabic RTL Support</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" />
<p class="lead" style="font-style: Roboto, 'sans-serif'; color: #636e72; font-size: 0.9125rem;">
Added Translations for Arabic.
</p>
@ -264,7 +278,7 @@
<div class="deep-2"
style="background-color: #fff; background-image: url('./images/blue-pattern.png'); background-position: bottom; background-size: cover; background-repeat: no-repeat ; padding: 2rem 2.5rem; border-radius: 15px;">
<h5 style="font-family: Montserrat, 'sans-serif';">Multiple Language Support</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" />
<p class="lead" style="font-style: Roboto, 'sans-serif'; color: #636e72; font-size: 0.9125rem;">
Added Translations for German,Spanish,French,Ukrainian,Chinese.
</p>
@ -280,7 +294,7 @@
<div class="row">
<div class="col-lg-7 d-flex flex-column justify-content-center">
<h5 style="font-family: Montserrat, 'sans-serif';">Detailed Dashboard</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" />
<p class="lead" style="font-style: Roboto, 'sans-serif'; color: #636e72; font-size: 0.9125rem;">
The Dashboard support report overview for Invoices,Income/Expense,Aged and for other
Reports
@ -303,7 +317,7 @@
<div class="deep-2"
style="height: 450px; background-color: #fff; background-image: url('./images/yellow-pattern.png'); background-position: bottom; background-size: cover; background-repeat: no-repeat ; padding: 2rem 2.5rem; border-radius: 15px;">
<h5 style="font-family: Montserrat, 'sans-serif';">Accounting Dashboard</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" />
<p class="lead" style="font-style: Roboto, 'sans-serif'; color: #636e72; font-size: 0.9125rem;">
Accounting Dashboard that supports shows reports overview.
</p>
@ -314,7 +328,7 @@
<div class="deep-2"
style="height: 450px; background-color: #fff; background-image: url('./images/red-pattern.png'); background-position: bottom; background-size: cover; background-repeat: no-repeat ; padding: 2rem 2.5rem; border-radius: 15px;">
<h5 style="font-family: Montserrat, 'sans-serif';">Customer Follow-Ups</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" />
<p class="lead" style="font-style: Roboto, 'sans-serif'; color: #636e72; font-size: 0.9125rem;">
Set up customer follow-ups.
</p>
@ -325,7 +339,7 @@
<div class="deep-2"
style="height: 450px; background-color: #fff; background-image: url('./images/blue-pattern.png'); background-position: bottom; background-size: cover; background-repeat: no-repeat ; padding: 2rem 2.5rem; border-radius: 15px;">
<h5 style="font-family: Montserrat, 'sans-serif';">Recurring Templates</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px; margin-left: 0" />
<p class="lead" style="font-style: Roboto, 'sans-serif'; color: #636e72; font-size: 0.9125rem;">
Used for recurring payments.
</p>
@ -338,79 +352,76 @@
</section>
<!-- END OF FEATURE BLOCKS -->
</div>
<!-- REPORT SECTION -->
<section class="container oe_container mt-4">
<div class="row" style="display: flex;">
<div class="col-lg-12 my-4">
<h5 class="text-center" style="font-family: Montserrat, 'sans-serif';">Comprehensive Reports</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" />
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-1.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Invoice</h6>
<hr style="border: 2px solid #27ae60; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-2.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Bank Book Report</h6>
<hr style="border: 2px solid #f39c12; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-3.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Cash Book Report</h6>
<hr style="border: 2px solid #c0392b; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-4.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Day Book Reporting</h6>
<hr style="border: 2px solid #8e44ad; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-5.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Cash Flow Statement</h6>
<hr style="border: 2px solid #0984e3; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-6.png" height="300px" width="auto">
<h6 class="mt-4 text-center">General Ledger</h6>
<hr style="border: 2px solid #e84393; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-7.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Profit and Loss</h6>
<hr style="border: 2px solid #f39c12; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-8.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Balance Sheet</h6>
<hr style="border: 2px solid #27ae60; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-9.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Trial Balance</h6>
<hr style="border: 2px solid #c0392b; width: 50px; margin-top: 5px;">
<p class="text-center" style="color: #636e72; font-size: 0.9rem"></p>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center align-itmes-center">
<div class="col-lg-6 d-flex flex-column justify-content-center align-items-center">
<img class="img img-fluid" src="./images/report-10.png" height="300px" width="auto">
<h6 class="mt-4 text-center">Tax Invoice Journal</h6>
<hr style="background:#0984e3; border: 2px solid #6c5ce7; width: 50px; margin-top: 5px;">
@ -425,7 +436,7 @@
<section class="oe_container mt-4" style="padding:2rem 3rem 1rem">
<h5 class="text-center" style="font-family: Montserrat, 'sans-serif';">Screenshots</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" />
<section class="oe_container">
<div id="demo" class="row carousel slide mb32" data-ride="carousel">
<div class="carousel-inner">
@ -610,7 +621,7 @@
<section class="oe_container mt-4" style="padding:2rem 3rem 1rem">
<h5 class="text-center" style="font-family: Montserrat, 'sans-serif';">Suggested Products</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
@ -636,7 +647,7 @@
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./images/xslx_image.png">
src="./images/xlsx_image.png">
</div>
</a></div>
</div>
@ -683,7 +694,7 @@
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h5 class="text-center" style="font-family: Montserrat, 'sans-serif';">Our Services</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" />
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
@ -780,14 +791,14 @@
</div>
</div>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h5 class="text-center" style="font-family: Montserrat, 'sans-serif';">Our Industries</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" />
</div>
<div class="col-lg-3">
@ -902,7 +913,7 @@
</div>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
@ -910,7 +921,7 @@
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h5 class="text-center" style="font-family: Montserrat, 'sans-serif';">Need Help?</h5>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" ;>
<hr style="background-color: #0984e3; border: 2px solid #0984e3; width: 50px;" />
</div>
</div>

9
base_accounting_kit/views/account_asset_templates.xml

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- <template id="assets_backend" name="account assets" inherit_id="web.assets_backend">-->
<!-- <xpath expr="." position="inside">-->
<!-- <link rel="stylesheet" href="/base_accounting_kit/static/src/scss/account_asset.scss"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/src/js/account_asset.js"/>-->
<!-- </xpath>-->
<!-- </template>-->
</odoo>

18
base_accounting_kit/views/assets.xml

@ -1,18 +0,0 @@
<odoo>
<!-- <template id="assets_invoice_dashboard" name="Invoice Dashboard" inherit_id="web.assets_backend">-->
<!-- <xpath expr="." position="inside">-->
<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet"/>-->
<!-- <link rel="stylesheet" type="text/scss" href="/base_accounting_kit/static/src/scss/style.scss"/>-->
<!-- <link rel="stylesheet" type="text/scss" href="/base_accounting_kit/static/lib/bootstrap-toggle-master/css/bootstrap-toggle.min.css"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/src/js/account_dashboard.js"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/src/js/payment_model.js"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/src/js/payment_render.js"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/src/js/payment_matching.js"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/lib/Chart.bundle.js"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/lib/Chart.bundle.min.js"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/lib/Chart.min.js"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/lib/Chart.js"/>-->
<!-- <script type="text/javascript" src="/base_accounting_kit/static/lib/bootstrap-toggle-master/js/bootstrap-toggle.min.js"/>-->
<!-- </xpath>-->
<!-- </template>-->
</odoo>

1
base_accounting_kit/wizard/__init__.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.

84
base_accounting_kit/wizard/account_bank_book_wizard.py

@ -21,7 +21,7 @@
#############################################################################
from datetime import date
from odoo import models, fields, api, _
from odoo import api, fields, models, _
from odoo.exceptions import UserError
@ -29,12 +29,12 @@ class BankBookWizard(models.TransientModel):
_name = 'account.bank.book.report'
_description = 'Account Bank Book Report'
company_id = fields.Many2one('res.company', string='Company',
readonly=True,
default=lambda self: self.env.company)
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries')], string='Target Moves', required=True,
default='posted')
company_id = fields.Many2one(
'res.company', string='Company', readonly=True,
default=lambda self: self.env.company)
target_move = fields.Selection(
[('posted', 'All Posted Entries'), ('all', 'All Entries')],
string='Target Moves', required=True, default='posted')
date_from = fields.Date(string='Start Date', default=date.today(),
required=True)
date_to = fields.Date(string='End Date', default=date.today(),
@ -47,27 +47,27 @@ class BankBookWizard(models.TransientModel):
[('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')],
string='Sort by',
required=True, default='sort_date')
initial_balance = fields.Boolean(string='Include Initial Balances',
help='If you selected date, this field allow you to add a row to display the amount of debit/credit/balance that precedes the filter you\'ve set.')
initial_balance = fields.Boolean(
string='Include Initial Balances',
help='If you selected date, this field allow you to add a row to '
'display the amount of debit/credit/balance that precedes the '
'filter you\'ve set.')
def _get_default_account_ids(self):
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.append(
journal.company_id.account_journal_payment_credit_account_id.id)
return accounts
account_ids = fields.Many2many('account.account',
'account_report_bankbook_account_rel',
'report_id', 'account_id',
'Accounts',
default=_get_default_account_ids)
journal_ids = fields.Many2many('account.journal',
'account_report_bankbook_journal_rel',
'account_id', 'journal_id',
string='Journals', required=True,
default=lambda self: self.env[
'account.journal'].search([]))
account_ids = fields.Many2many(
'account.account', 'account_report_bankbook_account_rel', 'report_id',
'account_id', string='Accounts', default=_get_default_account_ids)
journal_ids = fields.Many2many(
'account.journal', 'account_report_bankbook_journal_rel', 'account_id',
'journal_id', string='Journals', required=True,
default=lambda self: self.env['account.journal'].search([]))
@api.onchange('account_ids')
def onchange_account_ids(self):
@ -81,31 +81,31 @@ class BankBookWizard(models.TransientModel):
return {'domain': domain}
def _build_contexts(self, 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
return result
return {
'journal_ids': data.get('form', {}).get(
'journal_ids', False) or False,
'state': data.get('form', {}).get('target_move', '') or '',
'date_from': data.get('form', {}).get('date_from', False) or False,
'date_to': data.get('form', {}).get('date_to', False) or False,
'strict_range': True if data.get('form', {}).get(
'date_from', False) else False
}
def check_report(self):
self.ensure_one()
if self.initial_balance and not self.date_from:
raise UserError(_("You must choose a Start Date"))
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',
'display_account',
'account_ids', 'sortby', 'initial_balance'])[0]
data = {
'ids': self.env.context.get('active_ids', []),
'model': self.env.context.get('active_model', 'ir.ui.menu'),
'form': self.read(
['date_from', 'date_to', 'journal_ids', 'target_move',
'display_account', 'account_ids', 'sortby',
'initial_balance'])[0]
}
used_context = self._build_contexts(data)
data['form']['used_context'] = dict(used_context,
lang=self.env.context.get(
'lang') or 'en_US')
data['form']['used_context'] = dict(
used_context, lang=self.env.context.get('lang') or 'en_US')
return self.env.ref(
'base_accounting_kit.action_report_bank_book').report_action(self,
data=data)
'base_accounting_kit.action_report_bank_book').report_action(
self, data=data)

26
base_accounting_kit/wizard/account_cash_book_wizard.py

@ -21,7 +21,7 @@
#############################################################################
from datetime import date
from odoo import models, fields, api, _
from odoo import api, fields, models, _
from odoo.exceptions import UserError
@ -32,9 +32,9 @@ class CashBookWizard(models.TransientModel):
company_id = fields.Many2one('res.company', string='Company',
readonly=True,
default=lambda self: self.env.company)
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries')], string='Target Moves', required=True,
default='posted')
target_move = fields.Selection(
[('posted', 'All Posted Entries'), ('all', 'All Entries')],
string='Target Moves', required=True, default='posted')
date_from = fields.Date(string='Start Date', default=date.today(),
required=True)
date_to = fields.Date(string='End Date', default=date.today(),
@ -57,17 +57,13 @@ class CashBookWizard(models.TransientModel):
accounts.append(journal.company_id.account_journal_payment_credit_account_id.id)
return accounts
account_ids = fields.Many2many('account.account',
'account_report_cashbook_account_rel',
'report_id', 'account_id',
'Accounts',
default=_get_default_account_ids)
journal_ids = fields.Many2many('account.journal',
'account_report_cashbook_journal_rel',
'account_id', 'journal_id',
string='Journals', required=True,
default=lambda self: self.env[
'account.journal'].search([]))
account_ids = fields.Many2many(
'account.account', 'account_report_cashbook_account_rel', 'report_id',
'account_id', string='Accounts', default=_get_default_account_ids)
journal_ids = fields.Many2many(
'account.journal', 'account_report_cashbook_journal_rel', 'account_id',
'journal_id', string='Journals', required=True,
default=lambda self: self.env['account.journal'].search([]))
@api.onchange('account_ids')
def onchange_account_ids(self):

69
base_accounting_kit/wizard/account_day_book_wizard.py

@ -21,57 +21,52 @@
#############################################################################
from datetime import date
from odoo import models, fields
from odoo import fields, models
class DayBookWizard(models.TransientModel):
_name = 'account.day.book.report'
_description = 'Account Day Book Report'
company_id = fields.Many2one('res.company', string='Company',
readonly=True,
default=lambda self: self.env.company)
journal_ids = fields.Many2many('account.journal', string='Journals',
required=True,
default=lambda self: self.env[
'account.journal'].search([]))
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries')], string='Target Moves', required=True,
default='posted')
account_ids = fields.Many2many('account.account',
'account_report_daybook_account_rel',
'report_id', 'account_id',
'Accounts')
company_id = fields.Many2one(
'res.company', string='Company', readonly=True,
default=lambda self: self.env.company)
journal_ids = fields.Many2many(
'account.journal', string='Journals', required=True,
default=lambda self: self.env['account.journal'].search([]))
target_move = fields.Selection(
[('posted', 'All Posted Entries'), ('all', 'All Entries')],
string='Target Moves', required=True, default='posted')
account_ids = fields.Many2many(
'account.account', 'account_report_daybook_account_rel', 'report_id',
'account_id', string='Accounts')
date_from = fields.Date(string='Start Date', default=date.today(),
required=True)
date_to = fields.Date(string='End Date', default=date.today(),
required=True)
def _build_contexts(self, 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
return result
return {
'journal_ids': data.get('form', {}).get(
'journal_ids', False) or False,
'state': data.get('form', {}).get('target_move', '') or '',
'date_from': data.get('form', {}).get('date_from', False) or False,
'date_to': data.get('form', {}).get('date_to', False) or False,
'strict_range': True if data.get('form', {}).get(
'date_from', False) else False
}
def check_report(self):
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',
'account_ids'])[0]
data = {
'ids': self.env.context.get('active_ids', []),
'model': self.env.context.get('active_model', 'ir.ui.menu'),
'form': self.read(['date_from', 'date_to', 'journal_ids',
'target_move', 'account_ids'])[0]
}
used_context = self._build_contexts(data)
data['form']['used_context'] = dict(used_context,
lang=self.env.context.get(
'lang') or 'en_US')
data['form']['used_context'] = dict(
used_context, lang=self.env.context.get('lang') or 'en_US')
return self.env.ref(
'base_accounting_kit.day_book_pdf_report').report_action(self,
data=data)
'base_accounting_kit.day_book_pdf_report').report_action(
self, data=data)

18
base_accounting_kit/wizard/account_lock_date.py

@ -29,14 +29,16 @@ class AccountUpdateLockDate(models.TransientModel):
company_id = fields.Many2one(comodel_name='res.company', string="Company",
required=True)
period_lock_date = fields.Date(string="Lock Date for Non-Advisers",
help="Only users with the 'Adviser' role can edit accounts prior to "
"and inclusive of this date. Use it for period locking inside an "
"open fiscal year, for example.")
fiscalyear_lock_date = fields.Date(string="Lock Date",
help="No users, including Advisers, can edit accounts prior to and "
"inclusive of this date. Use it for fiscal year locking for "
"example.")
period_lock_date = fields.Date(
string="Lock Date for Non-Advisers",
help="Only users with the 'Adviser' role can edit accounts prior to"
"and inclusive of this date. Use it for period locking inside an "
"open fiscal year, for example.")
fiscalyear_lock_date = fields.Date(
string="Lock Date",
help="No users, including Advisers, can edit accounts prior to and "
"inclusive of this date. Use it for fiscal year locking for "
"example.")
@api.model
def default_get(self, field_list):

11
base_accounting_kit/wizard/account_report_common_partner.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
@ -28,12 +27,10 @@ class AccountingCommonPartnerReport(models.TransientModel):
_description = 'Account Common Partner Report'
_inherit = "account.common.report"
result_selection = fields.Selection([('customer', 'Receivable Accounts'),
('supplier', 'Payable Accounts'),
('customer_supplier',
'Receivable and Payable Accounts')
], string="Partner's", required=True,
default='customer')
result_selection = fields.Selection(
[('customer', 'Receivable Accounts'), ('supplier', 'Payable Accounts'),
('customer_supplier', 'Receivable and Payable Accounts')],
string="Partner's", required=True, default='customer')
def pre_print_report(self, data):
data['form'].update(self.read(['result_selection'])[0])

5
base_accounting_kit/wizard/aged_partner.py

@ -19,9 +19,7 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import time
from dateutil.relativedelta import relativedelta
from odoo import fields, models, _
@ -40,7 +38,6 @@ class AccountAgedTrialBalance(models.TransientModel):
date_from = fields.Date(default=lambda *a: time.strftime('%Y-%m-%d'))
def _print_report(self, data):
res = {}
data = self.pre_print_report(data)
data['form'].update(self.read(['period_length'])[0])
@ -49,9 +46,7 @@ class AccountAgedTrialBalance(models.TransientModel):
raise UserError(_('You must set a period length greater than 0.'))
if not data['form']['date_from']:
raise UserError(_('You must set a start date.'))
start = data['form']['date_from']
for i in range(5)[::-1]:
stop = start - relativedelta(days=period_length - 1)
res[str(i)] = {

1
base_accounting_kit/wizard/aged_partner.xml

@ -13,7 +13,6 @@
<field name="result_selection" widget="radio"/>
<field name="target_move" widget="radio"/>
</group>
<!-- <field name="journal_ids" required="0" invisible="1"/>-->
<footer>
<button name="check_report" string="Print" type="object" default_focus="1" class="oe_highlight"/>
<button string="Cancel" class="btn btn-default" special="cancel"/>

16
base_accounting_kit/wizard/asset_depreciation_confirmation_wizard.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models, _
@ -27,18 +26,25 @@ class AssetDepreciationConfirmationWizard(models.TransientModel):
_name = "asset.depreciation.confirmation.wizard"
_description = "asset.depreciation.confirmation.wizard"
date = fields.Date('Account Date', required=True, help="Choose the period for which you want to automatically post the depreciation lines of running assets", default=fields.Date.context_today)
date = fields.Date(
'Account Date', required=True, default=fields.Date.context_today,
help="Choose the period for which you want to automatically post the "
"depreciation lines of running assets")
def asset_compute(self):
self.ensure_one()
context = self._context
created_move_ids = self.env['account.asset.asset'].compute_generated_entries(self.date, asset_type=context.get('asset_type'))
created_move_ids = self.env[
'account.asset.asset'].compute_generated_entries(
self.date, asset_type=context.get('asset_type'))
return {
'name': _('Created Asset Moves') if context.get('asset_type') == 'purchase' else _('Created Revenue Moves'),
'name': _('Created Asset Moves') if context.get(
'asset_type') == 'purchase' else _('Created Revenue Moves'),
'view_mode': 'tree,form',
'res_model': 'account.move',
'view_id': False,
'domain': "[('id','in',[" + ','.join(str(id) for id in created_move_ids) + "])]",
'domain': "[('id','in',[" + ','.join(
str(id) for id in created_move_ids) + "])]",
'type': 'ir.actions.act_window',
}

34
base_accounting_kit/wizard/asset_modify.py

@ -19,10 +19,10 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from lxml import etree
from odoo import api, fields, models, _
from odoo.addons.base.models.ir_ui_view import (
transfer_field_to_modifiers, transfer_node_to_modifiers, transfer_modifiers_to_node,
)
@ -42,29 +42,36 @@ class AssetModify(models.TransientModel):
_description = 'Modify Asset'
name = fields.Text(string='Reason', required=True)
method_number = fields.Integer(string='Number of Depreciations', required=True)
method_number = fields.Integer(
string='Number of Depreciations', required=True)
method_period = fields.Integer(string='Period Length')
method_end = fields.Date(string='Ending date')
asset_method_time = fields.Char(compute='_get_asset_method_time', string='Asset Method Time', readonly=True)
asset_method_time = fields.Char(
compute='_get_asset_method_time', string='Asset Method Time',
readonly=True)
def _get_asset_method_time(self):
if self.env.context.get('active_id'):
asset = self.env['account.asset.asset'].browse(self.env.context.get('active_id'))
asset = self.env['account.asset.asset'].browse(
self.env.context.get('active_id'))
self.asset_method_time = asset.method_time
@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False):
result = super(AssetModify, self).fields_view_get(view_id, view_type, toolbar=toolbar, submenu=submenu)
result = super(AssetModify, self).fields_view_get(
view_id, view_type, toolbar=toolbar, submenu=submenu)
asset_id = self.env.context.get('active_id')
active_model = self.env.context.get('active_model')
if active_model == 'account.asset.asset' and asset_id:
asset = self.env['account.asset.asset'].browse(asset_id)
doc = etree.XML(result['arch'])
if asset.method_time == 'number' and doc.xpath("//field[@name='method_end']"):
if asset.method_time == 'number' and doc.xpath(
"//field[@name='method_end']"):
node = doc.xpath("//field[@name='method_end']")[0]
node.set('invisible', '1')
setup_modifiers(node, result['fields']['method_end'])
elif asset.method_time == 'end' and doc.xpath("//field[@name='method_number']"):
elif asset.method_time == 'end' and doc.xpath(
"//field[@name='method_number']"):
node = doc.xpath("//field[@name='method_number']")[0]
node.set('invisible', '1')
setup_modifiers(node, result['fields']['method_number'])
@ -85,7 +92,8 @@ class AssetModify(models.TransientModel):
if 'method_end' in fields and asset.method_time == 'end':
res.update({'method_end': asset.method_end})
if self.env.context.get('active_id'):
active_asset = self.env['account.asset.asset'].browse(self.env.context.get('active_id'))
active_asset = self.env['account.asset.asset'].browse(
self.env.context.get('active_id'))
res['asset_method_time'] = active_asset.method_time
return res
@ -107,8 +115,12 @@ class AssetModify(models.TransientModel):
}
asset.write(asset_vals)
asset.compute_depreciation_board()
tracked_fields = self.env['account.asset.asset'].fields_get(['method_number', 'method_period', 'method_end'])
changes, tracking_value_ids = asset._mail_track(tracked_fields, old_values)
tracked_fields = self.env['account.asset.asset'].fields_get(
['method_number', 'method_period', 'method_end'])
changes, tracking_value_ids = asset._mail_track(
tracked_fields, old_values)
if changes:
asset.message_post(subject=_('Depreciation board modified'), body=self.name, tracking_value_ids=tracking_value_ids)
asset.message_post(
subject=_('Depreciation board modified'), body=self.name,
tracking_value_ids=tracking_value_ids)
return {'type': 'ir.actions.act_window_close'}

42
base_accounting_kit/wizard/cash_flow_report.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, fields, models
@ -39,27 +38,30 @@ class AccountingReport(models.TransientModel):
return reports and reports[0] or False
enable_filter = fields.Boolean(string='Enable Comparison')
account_report_id = fields.Many2one('account.financial.report',
string='Account Reports',
required=True,
default=_get_account_report)
label_filter = fields.Char(string='Column Label',
help="This label will be displayed on report to show the balance"
" computed for the given comparison filter.")
account_report_id = fields.Many2one(
'account.financial.report', string='Account Reports', required=True,
default=_get_account_report)
label_filter = fields.Char(
string='Column Label',
help="This label will be displayed on report to show the balance "
"computed for the given comparison filter.")
filter_cmp = fields.Selection(
[('filter_no', 'No Filters'), ('filter_date', 'Date')],
string='Filter by', required=True, default='filter_no')
date_from_cmp = fields.Date(string='Date Start')
date_to_cmp = fields.Date(string='Date End')
debit_credit = fields.Boolean(string='Display Debit/Credit Columns',
help="This option allows you to get more details about the way your balances are computed. Because it is space consuming, we do not allow to use it while doing a comparison.")
debit_credit = fields.Boolean(
string='Display Debit/Credit Columns',
help="This option allows you to get more details about the way your "
"balances are computed. Because it is space consuming, we do not "
"allow to use it while doing a comparison.")
def _build_comparison_context(self, 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 = {
'journal_ids': data.get('form', {}).get(
'journal_ids', False) or False,
'state': data.get('form', {}).get('target_move', '') or '',
}
if data['form']['filter_cmp'] == 'filter_date':
result['date_from'] = data['form']['date_from_cmp']
result['date_to'] = data['form']['date_to_cmp']
@ -69,10 +71,9 @@ class AccountingReport(models.TransientModel):
# @api.multi
def check_report(self):
res = super(AccountingReport, self).check_report()
data = {}
data['form'] = self.read(
data = {'form': self.read(
['account_report_id', 'date_from_cmp', 'date_to_cmp',
'journal_ids', 'filter_cmp', 'target_move'])[0]
'journal_ids', 'filter_cmp', 'target_move'])[0]}
for field in ['account_report_id']:
if isinstance(data['form'][field], tuple):
data['form'][field] = data['form'][field][0]
@ -86,6 +87,5 @@ class AccountingReport(models.TransientModel):
'account_report_id', 'enable_filter', 'label_filter',
'target_move'])[0])
return self.env.ref(
'base_accounting_kit.action_report_cash_flow').report_action(self,
data=data,
config=False)
'base_accounting_kit.action_report_cash_flow').report_action(
self, data=data, config=False)

77
base_accounting_kit/wizard/financial_report.py

@ -21,7 +21,7 @@
#############################################################################
import re
from odoo import api, models, fields
from odoo import api, fields, models
class FinancialReport(models.TransientModel):
@ -29,11 +29,9 @@ class FinancialReport(models.TransientModel):
_inherit = "account.common.report"
_description = "Financial Reports"
view_format = fields.Selection([
('vertical', 'Vertical'),
('horizontal', 'Horizontal')],
default='vertical',
string="Format")
view_format = fields.Selection([('vertical', 'Vertical'),
('horizontal', 'Horizontal')],
default='vertical', string="Format")
@api.model
def _get_account_report(self):
@ -45,29 +43,18 @@ class FinancialReport(models.TransientModel):
('name', 'ilike', menu)])
return reports and reports[0] or False
enable_filter = fields.Boolean(
string='Enable Comparison',
default=False)
enable_filter = fields.Boolean(string='Enable Comparison', default=False)
account_report_id = fields.Many2one(
'account.financial.report',
string='Account Reports',
required=True)
'account.financial.report', string='Account Reports', required=True)
date_from = fields.Date(string='Start Date')
date_to = fields.Date(string='End Date')
debit_credit = fields.Boolean(
string='Display Debit/Credit Columns',
default=True,
help="This option allows you to"
" get more details about the "
"way your balances are computed."
" Because it is space consuming,"
" we do not allow to use it "
"while doing a comparison.")
string='Display Debit/Credit Columns', default=True,
help="This option allows you to get more details about the way your "
"balances are computed. Because it is space consuming, we do not "
"allow to use it while doing a comparison.")
company_id = fields.Many2one(
'res.company',
string='Company',
index=True,
'res.company', string='Company', index=True,
default=lambda self: self.env.company.id)
def view_report_pdf(self):
@ -75,18 +62,17 @@ class FinancialReport(models.TransientModel):
from the wizard. Based on the values provided in the wizard, this
function will print pdf report"""
self.ensure_one()
data = dict()
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', 'enable_filter', 'debit_credit', 'date_to',
'account_report_id', 'target_move', 'view_format',
'company_id'])[0]
data = {
'ids': self.env.context.get('active_ids', []),
'model': self.env.context.get('active_model', 'ir.ui.menu'),
'form': self.read(
['date_from', 'enable_filter', 'debit_credit', 'date_to',
'account_report_id', 'target_move', 'view_format',
'company_id'])[0]
}
used_context = self._build_contexts(data)
data['form']['used_context'] = dict(
used_context,
lang=self.env.context.get('lang') or 'en_US')
used_context, lang=self.env.context.get('lang') or 'en_US')
report_lines = self.get_account_lines(data['form'])
# find the journal items of these accounts
journal_items = self.find_journal_items(report_lines, data['form'])
@ -137,8 +123,7 @@ class FinancialReport(models.TransientModel):
res = {}
for account in accounts:
res[account.id] = dict((fn, 0.0)
for fn in mapping.keys())
res[account.id] = dict((fn, 0.0) for fn in mapping.keys())
if accounts:
tables, where_clause, where_params = (
self.env['account.move.line']._query_get())
@ -150,10 +135,8 @@ class FinancialReport(models.TransientModel):
filters = " AND ".join(wheres)
request = ("SELECT account_id as id, " +
', '.join(mapping.values()) +
" FROM " + tables +
" WHERE account_id IN %s " +
filters +
" GROUP BY account_id")
" FROM " + tables + " WHERE account_id IN %s " +
filters + " GROUP BY account_id")
params = (tuple(accounts._ids),) + tuple(where_params)
self.env.cr.execute(request, params)
for row in self.env.cr.dictfetchall():
@ -181,15 +164,14 @@ class FinancialReport(models.TransientModel):
res[report.id]['account'] = self._compute_account_balance(
report.account_ids
)
for value in \
res[report.id]['account'].values():
for value in res[report.id]['account'].values():
for field in fields:
res[report.id][field] += value.get(field)
elif report.type == 'account_type':
# it's the sum the leaf accounts
# with such an account type
accounts = self.env['account.account'].search([
('user_type_id', 'in', report.account_type_ids.ids)])
('user_type_id', 'in', report.account_type_ids.ids)])
res[report.id]['account'] = self._compute_account_balance(
accounts)
for value in res[report.id]['account'].values():
@ -223,20 +205,17 @@ class FinancialReport(models.TransientModel):
res[report_id]['comp_bal'] = value['balance']
report_acc = res[report_id].get('account')
if report_acc:
for account_id, val in \
comparison_res[report_id].get('account').items():
for account_id, val in comparison_res[report_id].get(
'account').items():
report_acc[account_id]['comp_bal'] = val['balance']
for report in child_reports:
r_name = str(report.name)
# r_name = r_name.replace(" ", "-") + "-"
r_name = re.sub('[^0-9a-zA-Z]+', '', r_name)
if report.parent_id:
p_name = str(report.parent_id.name)
p_name = re.sub('[^0-9a-zA-Z]+', '', p_name) + str(
report.parent_id.id)
# p_name = p_name.replace(" ", "-") +
# "-" + str(report.parent_id.id)
else:
p_name = False
vals = {
@ -280,8 +259,6 @@ class FinancialReport(models.TransientModel):
# financial reports for Assets, liabilities...)
flag = False
account = self.env['account.account'].browse(account_id)
# new_r_name = str(report.name)
# new_r_name = new_r_name.replace(" ", "-") + "-"
vals = {
'account': account.id,
'a_id': account.code + re.sub('[^0-9a-zA-Z]+', 'acnt',

19
base_accounting_kit/wizard/general_ledger.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models, _
from odoo.exceptions import UserError
@ -29,19 +28,17 @@ class AccountReportGeneralLedger(models.TransientModel):
_name = "account.report.general.ledger"
_description = "General Ledger Report"
initial_balance = fields.Boolean(string='Include Initial Balances',
help='If you selected date, this field '
'allow you to add a row to display '
'the amount of debit/credit/balance '
'that precedes the filter you\'ve '
'set.')
initial_balance = fields.Boolean(
string='Include Initial Balances',
help='If you selected date, this field allow you to add a row to '
'display the amount of debit/credit/balance that precedes the '
'filter you\'ve set.')
sortby = fields.Selection(
[('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')],
string='Sort by', required=True, default='sort_date')
journal_ids = fields.Many2many('account.journal',
'account_report_general_ledger_journal_rel',
'account_id', 'journal_id',
string='Journals', required=True)
journal_ids = fields.Many2many(
'account.journal', 'account_report_general_ledger_journal_rel',
'account_id', 'journal_id', string='Journals', required=True)
def _print_report(self, data):
data = self.pre_print_report(data)

10
base_accounting_kit/wizard/journal_audit.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
@ -31,11 +30,10 @@ class AccountPrintJournal(models.TransientModel):
sort_selection = fields.Selection(
[('date', 'Date'), ('move_name', 'Journal Entry Number')],
'Entries Sorted by', required=True, default='move_name')
journal_ids = fields.Many2many('account.journal', string='Journals',
required=True,
default=lambda self: self.env[
'account.journal'].search(
[('type', 'in', ['sale', 'purchase'])]))
journal_ids = fields.Many2many(
'account.journal', string='Journals', required=True,
default=lambda self: self.env['account.journal'].search(
[('type', 'in', ['sale', 'purchase'])]))
def _print_report(self, data):
data = self.pre_print_report(data)

10
base_accounting_kit/wizard/partner_ledger.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
@ -28,10 +27,11 @@ class AccountPartnerLedger(models.TransientModel):
_inherit = "account.common.partner.report"
_description = "Account Partner Ledger"
amount_currency = fields.Boolean("With Currency",
help="It adds the currency column on report if the "
"currency differs from the company currency.")
reconciled = fields.Boolean('Reconciled Entries')
amount_currency = fields.Boolean(
string="With Currency",
help="It adds the currency column on report if the currency differs "
"from the company currency.")
reconciled = fields.Boolean(string='Reconciled Entries')
def _print_report(self, data):
data = self.pre_print_report(data)

1
base_accounting_kit/wizard/tax_report.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models

9
base_accounting_kit/wizard/trial_balance.py

@ -19,7 +19,6 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import fields, models
@ -28,11 +27,9 @@ class AccountBalanceReport(models.TransientModel):
_name = 'account.balance.report'
_description = 'Trial Balance Report'
journal_ids = fields.Many2many('account.journal',
'account_balance_report_journal_rel',
'account_id', 'journal_id',
string='Journals', required=True,
default=[])
journal_ids = fields.Many2many(
'account.journal', 'account_balance_report_journal_rel', 'account_id',
'journal_id', string='Journals', required=True, default=[])
def _print_report(self, data):
data = self.pre_print_report(data)

Loading…
Cancel
Save