Browse Source

[IMP] Functional and view improvements 'base_accounting_kit'

pull/134/merge
Ajmalcybrosys 6 years ago
parent
commit
74a9f1d7f6
  1. 16
      base_accounting_kit/__manifest__.py
  2. 8
      base_accounting_kit/data/account_pdc_data.xml
  3. 4
      base_accounting_kit/models/account_account.py
  4. 17
      base_accounting_kit/models/account_asset.py
  5. 29
      base_accounting_kit/models/account_followup.py
  6. 9
      base_accounting_kit/models/account_journal.py
  7. 4
      base_accounting_kit/models/account_move.py
  8. 1
      base_accounting_kit/models/recurring_payments.py
  9. 1
      base_accounting_kit/report/account_asset_report.py
  10. 1
      base_accounting_kit/report/account_bank_book.py
  11. 1
      base_accounting_kit/report/account_cash_book.py
  12. 1
      base_accounting_kit/report/account_day_book.py
  13. 3
      base_accounting_kit/report/account_report_common_account.py
  14. 1
      base_accounting_kit/report/cash_flow_report.py
  15. 1
      base_accounting_kit/report/general_ledger_report.py
  16. 1
      base_accounting_kit/report/report_aged_partner.py
  17. 1
      base_accounting_kit/report/report_journal_audit.py
  18. 1
      base_accounting_kit/report/report_partner_ledger.py
  19. 1
      base_accounting_kit/report/report_tax.py
  20. 1
      base_accounting_kit/report/report_trial_balance.py
  21. 7
      base_accounting_kit/security/ir.model.access.csv
  22. 12
      base_accounting_kit/security/security.xml
  23. 21
      base_accounting_kit/views/accounting_menu.xml
  24. 16
      base_accounting_kit/views/credit_limit_view.xml
  25. 4
      base_accounting_kit/views/followup_report.xml
  26. 1
      base_accounting_kit/wizard/__init__.py
  27. 6
      base_accounting_kit/wizard/account_bank_book_wizard.py
  28. 2
      base_accounting_kit/wizard/account_bank_book_wizard_view.xml
  29. 6
      base_accounting_kit/wizard/account_cash_book_wizard.py
  30. 2
      base_accounting_kit/wizard/account_cash_book_wizard_view.xml
  31. 4
      base_accounting_kit/wizard/account_day_book_wizard.py
  32. 2
      base_accounting_kit/wizard/account_day_book_wizard_view.xml
  33. 38
      base_accounting_kit/wizard/account_report_common_account.py
  34. 4
      base_accounting_kit/wizard/cash_flow_report.py
  35. 6
      base_accounting_kit/wizard/financial_report.py
  36. 2
      base_accounting_kit/wizard/journal_audit.py
  37. 2
      base_accounting_kit/wizard/recurring_payments.py
  38. 17
      base_accounting_kit/wizard/recurring_payments_wizard.xml
  39. 1
      hr_payroll_account_community/static/description/index.html

16
base_accounting_kit/__manifest__.py

@ -22,13 +22,13 @@
{
'name': 'Odoo 13 Full Accounting Kit',
'version': '13.0.1.4.2',
'version': '13.0.2.4.1',
'category': 'Accounting',
'summary': """ Asset and Budget Management,
Accounting Reports, PDC, Lock dates,
Credit Limit, Follow Ups,
Day-Bank-Cash book reports.""",
'description': """
'summary': """ Asset and Budget Management,
Accounting Reports, PDC, Lock dates,
Credit Limit, Follow Ups,
Day-Bank-Cash book reports.""",
'description': """
Odoo 13 Accounting,Accounting Reports, Odoo 13 Accounting
PDF Reports, Asset Management, Budget Management,
Customer Credit Limit, Recurring Payment,
@ -47,7 +47,7 @@
'depends': ['base', 'account', 'sale', 'account_check_printing'],
'data': [
'security/ir.model.access.csv',
'security/account_asset_security.xml',
'security/security.xml',
'data/account_financial_report_data.xml',
'data/cash_flow_data.xml',
'data/account_pdc_data.xml',
@ -100,4 +100,4 @@
'installable': True,
'auto_install': False,
'application': True,
}
}

8
base_accounting_kit/data/account_pdc_data.xml

@ -13,7 +13,13 @@
<field name="payment_type">outbound</field>
</record>
<!--<function model="account.journal" name="_enable_check_printing_on_bank_journals"/>-->
<function model="account.journal" name="_enable_pdc_on_bank_journals"/>
<!-- decimal precision for account -->
<record forcecreate="True" id="decimal_account" model="decimal.precision">
<field name="name">Account</field>
<field name="digits" eval="3"/>
</record>
</data>
</odoo>

4
base_accounting_kit/models/account_account.py

@ -46,6 +46,4 @@ class CashFlow(models.Model):
if self._origin.cash_flow_type.ids:
for rec in self._origin.cash_flow_type:
# remove old record
rec.write({
'account_ids': [(3, self._origin.id)]
})
rec.write({'account_ids': [(3, self._origin.id)]})

17
base_accounting_kit/models/account_asset.py

@ -53,13 +53,11 @@ class AccountAssetCategory(models.Model):
string='Depreciation Entries: Expense Account',
required=True, domain=[
('internal_type', '=', 'other'), ('deprecated', '=', False)],
oldname='account_income_recognition_id',
help="Account used in the periodical entries, to record a part of the asset as expense.")
journal_id = fields.Many2one('account.journal', string='Journal',
required=True)
company_id = fields.Many2one('res.company', string='Company',
required=True, default=lambda self: self.env[
'res.company']._company_default_get('account.asset.category'))
required=True, default=lambda self: self.env.user.company_id)
method = fields.Selection(
[('linear', 'Linear'), ('degressive', 'Degressive')],
string='Computation Method', required=True, default='linear',
@ -122,8 +120,7 @@ class AccountAssetAsset(models.Model):
code = fields.Char(string='Reference', size=32, readonly=True,
states={'draft': [('readonly', False)]})
value = fields.Float(string='Gross Value', required=True, readonly=True,
digits=0, states={'draft': [('readonly', False)]},
oldname='purchase_value')
digits=0, states={'draft': [('readonly', False)]})
currency_id = fields.Many2one('res.currency', string='Currency',
required=True, readonly=True,
states={'draft': [('readonly', False)]},
@ -132,9 +129,7 @@ class AccountAssetAsset(models.Model):
company_id = fields.Many2one('res.company', string='Company',
required=True, readonly=True,
states={'draft': [('readonly', False)]},
default=lambda self: self.env[
'res.company']._company_default_get(
'account.asset.asset'))
default=lambda self: self.env.user.company_id)
note = fields.Text()
category_id = fields.Many2one('account.asset.category', string='Category',
required=True, change_default=True,
@ -142,8 +137,7 @@ class AccountAssetAsset(models.Model):
states={'draft': [('readonly', False)]})
date = fields.Date(string='Date', required=True, readonly=True,
states={'draft': [('readonly', False)]},
default=fields.Date.context_today,
oldname="purchase_date")
default=fields.Date.context_today)
state = fields.Selection(
[('draft', 'Draft'), ('open', 'Running'), ('close', 'Close')],
'Status', required=True, copy=False, default='draft',
@ -348,9 +342,6 @@ class AccountAssetAsset(models.Model):
# purchase month in other cases
if self.method_period >= 12:
if self.company_id.fiscalyear_last_month:
print(self.company_id.fiscalyear_last_month)
print(self.company_id.fiscalyear_last_day)
print(self.date)
asset_date = date(year=int(self.date.year),
month=int(
self.company_id.fiscalyear_last_month),

29
base_accounting_kit/models/account_followup.py

@ -20,7 +20,7 @@
#
#############################################################################
from odoo import fields, api, models, _
from odoo import fields, models
class Followup(models.Model):
@ -28,14 +28,12 @@ class Followup(models.Model):
_description = 'Account Follow-up'
_rec_name = 'name'
followup_line_ids = fields.One2many('followup.line', 'followup_id', 'Follow-up', copy=True)
followup_line_ids = fields.One2many('followup.line', 'followup_id',
'Follow-up', copy=True)
company_id = fields.Many2one('res.company', 'Company',
default=lambda self: self.env['res.company']._company_default_get(
'account_followup.followup'))
default=lambda self: self.env.user.company_id)
name = fields.Char(related='company_id.name', readonly=True)
_sql_constraints = [('company_uniq', 'unique(company_id)', 'Only one follow-up per company is allowed')]
class FollowupLine(models.Model):
_name = 'followup.line'
@ -43,22 +41,11 @@ class FollowupLine(models.Model):
_order = 'delay'
name = fields.Char('Follow-Up Action', required=True, translate=True)
sequence = fields.Integer(help="Gives the sequence order when displaying a list of follow-up lines.")
sequence = fields.Integer(
help="Gives the sequence order when displaying a list of follow-up lines.")
delay = fields.Integer('Due Days', required=True,
help="The number of days after the due date of the invoice"
" to wait before sending the reminder."
" Could be negative if you want to send a polite alert beforehand.")
followup_id = fields.Many2one('account.followup', 'Follow Ups', ondelete="cascade")
_sql_constraints = [('days_uniq', 'unique(followup_id, delay)', 'Days of the follow-up levels must be different')]
@api.constrains('description')
def _check_description(self):
for line in self:
if line.description:
try:
line.description % {'partner_name': '', 'date': '', 'user_signature': '', 'company_name': ''}
except:
raise Warning(_(
'Your description is invalid, use the right legend'
' or %% if you want to use the percent character.'))
followup_id = fields.Many2one('account.followup', 'Follow Ups',
ondelete="cascade")

9
base_accounting_kit/models/account_journal.py

@ -28,9 +28,10 @@ class AccountJournal(models.Model):
@api.depends('outbound_payment_method_ids')
def _compute_check_printing_payment_method_selected(self):
self.check_printing_payment_method_selected = any(
pm.code in ['check_printing', 'pdc'] for pm in
self.outbound_payment_method_ids)
for journal in self:
journal.check_printing_payment_method_selected = any(
pm.code in ['check_printing', 'pdc'] for pm in
journal.outbound_payment_method_ids)
@api.model
def _enable_pdc_on_bank_journals(self):
@ -42,7 +43,7 @@ class AccountJournal(models.Model):
pdcout = self.env.ref('base_accounting_kit.account_payment_method_pdc_out')
bank_journals = self.search([('type', '=', 'bank')])
for bank_journal in bank_journals:
# bank_journal._create_check_sequence()
bank_journal._create_check_sequence()
bank_journal.write({
'inbound_payment_method_ids': [(4, pdcin.id, None)],
'outbound_payment_method_ids': [(4, pdcout.id, None)],

4
base_accounting_kit/models/account_move.py

@ -90,7 +90,7 @@ class AccountInvoiceLine(models.Model):
store=True)
asset_mrr = fields.Float(string='Monthly Recurring Revenue',
compute='_get_asset_date',
readonly=True, digits=dp.get_precision('Account'),
readonly=True, digits='Account',
store=True)
@api.depends('asset_category_id', 'move_id.invoice_date')
@ -145,7 +145,7 @@ class AccountInvoiceLine(models.Model):
elif self.move_id.type == 'in_invoice' and self.asset_category_id:
self.account_id = self.asset_category_id.account_asset_id.id
@api.onchange('uom_id')
@api.onchange('product_uom_id')
def _onchange_uom_id(self):
result = super(AccountInvoiceLine, self)._onchange_uom_id()
self.onchange_asset_category_id()

1
base_accounting_kit/models/recurring_payments.py

@ -34,6 +34,7 @@ class FilterRecurringEntries(models.Model):
class RecurringPayments(models.Model):
_name = 'account.recurring.payments'
_description = 'Accounting Recurring Payment'
def _get_next_schedule(self):
if self.date:

1
base_accounting_kit/report/account_asset_report.py

@ -3,6 +3,7 @@
from odoo import api, fields, models, tools
class AssetAssetReport(models.Model):
_name = "asset.asset.report"
_description = "Assets Analysis"

1
base_accounting_kit/report/account_bank_book.py

@ -27,6 +27,7 @@ from odoo.exceptions import UserError
class ReportBankBook(models.AbstractModel):
_name = 'report.base_accounting_kit.report_bank_book'
_description = 'Bank Book Report'
def _get_account_move_entry(self, accounts, init_balance, sortby,
display_account):

1
base_accounting_kit/report/account_cash_book.py

@ -27,6 +27,7 @@ from odoo.exceptions import UserError
class ReportCashBook(models.AbstractModel):
_name = 'report.base_accounting_kit.report_cash_book'
_description = 'Cash Book Report'
def _get_account_move_entry(self, accounts, init_balance, sortby,
display_account):

1
base_accounting_kit/report/account_day_book.py

@ -28,6 +28,7 @@ from odoo.exceptions import UserError
class DayBookPdfReport(models.AbstractModel):
_name = 'report.base_accounting_kit.day_book_report_template'
_description = 'Day Book Report'
def _get_account_move_entry(self, accounts, form_data, pass_date):
cr = self.env.cr

3
base_accounting_kit/report/account_report_common_account.py

@ -30,10 +30,9 @@ class AccountCommonAccountReport(models.TransientModel):
display_account = fields.Selection(
[('all', 'All'), ('movement', 'With movements'),
('not_zero', 'With balance is not equal to 0'), ],
('not_zero', 'With balance is not equal to 0')],
string='Display Accounts', required=True, default='movement')
@api.model
def pre_print_report(self, data):
data['form'].update(self.read(['display_account'])[0])
return data

1
base_accounting_kit/report/cash_flow_report.py

@ -28,6 +28,7 @@ from odoo.exceptions import UserError
class ReportFinancial(models.AbstractModel):
_name = 'report.base_accounting_kit.report_cash_flow'
_description = 'Cash Flow Report'
def _compute_account_balance(self, accounts):
mapping = {

1
base_accounting_kit/report/general_ledger_report.py

@ -28,6 +28,7 @@ from odoo.exceptions import UserError
class ReportGeneralLedger(models.AbstractModel):
_name = 'report.base_accounting_kit.report_general_ledger'
_description = 'General Ledger Report'
def _get_account_move_entry(self, accounts, init_balance, sortby,
display_account):

1
base_accounting_kit/report/report_aged_partner.py

@ -32,6 +32,7 @@ from odoo.tools import float_is_zero
class ReportAgedPartnerBalance(models.AbstractModel):
_name = 'report.base_accounting_kit.report_agedpartnerbalance'
_description = 'Aged Partner Balance Report'
def _get_partner_move_lines(self, account_type, date_from, target_move,
period_length):

1
base_accounting_kit/report/report_journal_audit.py

@ -28,6 +28,7 @@ from odoo.exceptions import UserError
class ReportJournal(models.AbstractModel):
_name = 'report.base_accounting_kit.report_journal_audit'
_description = 'Journal Report'
def lines(self, target_move, journal_ids, sort_selection, data):
if isinstance(journal_ids, int):

1
base_accounting_kit/report/report_partner_ledger.py

@ -28,6 +28,7 @@ from odoo.exceptions import UserError
class ReportPartnerLedger(models.AbstractModel):
_name = 'report.base_accounting_kit.report_partnerledger'
_description = 'Partner Ledger Report'
def _lines(self, data, partner):
full_account = []

1
base_accounting_kit/report/report_tax.py

@ -28,6 +28,7 @@ from odoo.exceptions import UserError
class ReportTax(models.AbstractModel):
_name = 'report.base_accounting_kit.report_tax'
_description = 'Tax Report'
@api.model
def _get_report_values(self, docids, data=None):

1
base_accounting_kit/report/report_trial_balance.py

@ -28,6 +28,7 @@ from odoo.exceptions import UserError
class ReportTrialBalance(models.AbstractModel):
_name = 'report.base_accounting_kit.report_trial_balance'
_description = 'Trial Balance Report'
def _get_accounts(self, accounts, display_account):
""" compute the balance, debit and credit for the provided accounts

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

@ -1,12 +1,11 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_financial_report_user,account_fin_rep_name_user,model_account_financial_report,account.group_account_user,1,1,1,1
access_financial_report_manager,account_fin_rep_name_manager,model_account_financial_report,account.group_account_manager,1,1,1,1
access_account_report_general_ledger_user,account_account_report_general_ledger_id_user,model_account_report_general_ledger,account.group_account_user,1,1,1,1
access_account_report_general_ledger_manager,account_account_report_general_ledger_id_manager,model_account_report_general_ledger,account.group_account_manager,1,1,1,1
access_generate_recurring_entries,generate.recurring.entries.user,model_account_recurring_payments,account.group_account_user,1,1,1,1
access_generate_recurring_entries_wizard,generate.recurring.entries.user.wizard,model_recurring_payments_wizard,account.group_account_user,1,1,1,1
access_account_followup,account.followup,model_account_followup,account.group_account_manager,1,1,1,1
access_account_followup_manager,account.followup.manager,model_account_followup,account.group_account_manager,1,1,1,1
access_account_followup_user,account.followup.user,model_account_followup,account.group_account_user,1,1,1,1
access_followup_line,followup.line,model_followup_line,account.group_account_manager,1,1,0,0
access_account_followup_line_user,account.followup.line.user,model_followup_line,account.group_account_user,1,1,0,0
access_account_asset_category,account.asset.category,model_account_asset_category,account.group_account_user,1,0,0,0
access_account_asset_asset,account.asset.asset,model_account_asset_asset,account.group_account_user,1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_financial_report_user account_fin_rep_name_user model_account_financial_report account.group_account_user 1 1 1 1
3 access_financial_report_manager account_fin_rep_name_manager model_account_financial_report account.group_account_manager 1 1 1 1
access_account_report_general_ledger_user account_account_report_general_ledger_id_user model_account_report_general_ledger account.group_account_user 1 1 1 1
access_account_report_general_ledger_manager account_account_report_general_ledger_id_manager model_account_report_general_ledger account.group_account_manager 1 1 1 1
4 access_generate_recurring_entries generate.recurring.entries.user model_account_recurring_payments account.group_account_user 1 1 1 1
5 access_generate_recurring_entries_wizard access_account_followup_manager generate.recurring.entries.user.wizard account.followup.manager model_recurring_payments_wizard model_account_followup account.group_account_user account.group_account_manager 1 1 1 1
6 access_account_followup access_account_followup_user account.followup account.followup.user model_account_followup account.group_account_manager account.group_account_user 1 1 1 1
7 access_followup_line followup.line model_followup_line account.group_account_manager 1 1 0 0
8 access_account_followup_line_user account.followup.line.user model_followup_line account.group_account_user 1 1 0 0
9 access_account_asset_category account.asset.category model_account_asset_category account.group_account_user 1 0 0 0
10 access_account_asset_asset account.asset.asset model_account_asset_asset account.group_account_user 1 0 0 0
11 access_account_asset_category_manager account.asset.category model_account_asset_category account.group_account_manager 1 1 1 1

12
base_accounting_kit/security/account_asset_security.xml → base_accounting_kit/security/security.xml

@ -14,6 +14,18 @@
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<!-- Rename user group as Accountant -->
<record id="account.group_account_user" model="res.groups">
<field name="name">Accountant</field>
<field name="implied_ids" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="category_id" ref="base.module_category_accounting_accounting"/>
</record>
<!-- Rename user group as Chief Accountant -->
<record id="account.group_account_manager" model="res.groups">
<field name="name">Chief Accountant</field>
<field name="implied_ids" eval="[(3, ref('account.group_account_invoice')), (4, ref('account.group_account_user'))]"/>
<field name="category_id" ref="base.module_category_accounting_accounting"/>
</record>
</data>
</odoo>

21
base_accounting_kit/views/accounting_menu.xml

@ -1,14 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<!-- Change invoicing menu to Accounting -->
<record model="ir.ui.menu" id="account.menu_finance">
<field name="name">Accounting</field>
</record>
<menuitem id="account_reports_generic_statements" sequence="2"
<!-- Change settings invoicing menu to Accounting -->
<record id="res_config_settings_view_accounting_kit" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.kit</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<div data-key="account" position="attributes">
<attribute name="data-string">Accounting</attribute>
<attribute name="string">Accounting</attribute>
</div>
</field>
</record>
<menuitem id="account_reports_generic_statements" sequence="1"
name="Generic Statements" parent="account.menu_finance_reports"/>
<menuitem id="account_reports_partner" sequence="2"
<menuitem id="account_reports_daily_reports" sequence="2"
name="Daily Reports" parent="account.menu_finance_reports"/>
<menuitem id="account_reports_partner" sequence="3"
name="Partner Reports" parent="account.menu_finance_reports"/>
<menuitem id="account_reports_audit" sequence="3"
<menuitem id="account_reports_audit" sequence="4"
name="Audit Reports" parent="account.menu_finance_reports"/>
</data>
</odoo>

16
base_accounting_kit/views/credit_limit_view.xml

@ -31,15 +31,11 @@
<xpath expr="//header" position="after">
<div class="alert alert-info" role="alert" style="height: 40px; margin-bottom:0px;"
attrs="{'invisible':[('has_due','=',False)]}">
This Customer's due amount is
<strong>
<field name="due_amount"/>
</strong>
.
This Customer's due amount is <strong><field name="due_amount"/></strong>.
</div>
</xpath>
<xpath expr="//sheet/div[@name='button_box']" position="after">
<div class="alert alert-danger" style="height: 40px; width: 350px; margin-bottom:0px;"
<div role="alert" class="alert alert-danger" style="height: 40px; width: 350px; margin-bottom:0px;"
attrs="{'invisible':[('is_warning','=',False)]}">
This customer's <strong>warning limit</strong> has been crossed.
</div>
@ -59,15 +55,11 @@
<xpath expr="//header" position="after">
<div class="alert alert-info" role="alert" style="height: 40px; margin-bottom:0px;"
attrs="{'invisible':['|',('has_due','=',False),('type','not in',('out_invoice','out_refund','out_receipt'))]}">
This Customer's due amount is
<strong>
<field name="due_amount"/>
</strong>
.
This Customer's due amount is <strong><field name="due_amount"/></strong>.
</div>
</xpath>
<xpath expr="//sheet/div[@name='button_box']" position="after">
<div class="alert alert-danger" style="height: 40px; width: 350px; margin-bottom:0px;"
<div role="alert" class="alert alert-danger" style="height: 40px; width: 350px; margin-bottom:0px;"
attrs="{'invisible':['|',('is_warning','=',False),('type','not in',('out_invoice','out_refund','out_receipt'))]}">
This customer's <strong>warning limit</strong> has been crossed.
</div>

4
base_accounting_kit/views/followup_report.xml

@ -5,7 +5,7 @@
<field name="name">customer.statements.followup</field>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<form string="report">
<form string="report" create="false" edit="false">
<header>
<field name="followup_status" widget="statusbar"/>
</header>
@ -113,7 +113,7 @@
<menuitem id="customer_statements_menu" name="Follow-up Reports"
parent="account.menu_finance_receivables"
action="action_view_list_customer_statements" sequence="20"
groups="account.group_account_manager"/>
groups="account.group_account_user"/>
</data>
</odoo>

1
base_accounting_kit/wizard/__init__.py

@ -24,7 +24,6 @@ from . import account_bank_book_wizard
from . import account_cash_book_wizard
from . import account_day_book_wizard
from . import account_lock_date
from . import account_report_common_account
from . import account_report_common_partner
from . import aged_partner
from . import asset_depreciation_confirmation_wizard

6
base_accounting_kit/wizard/account_bank_book_wizard.py

@ -27,13 +27,13 @@ from odoo.exceptions import UserError
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.user.company_id)
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries'),
], string='Target Moves', required=True,
('all', 'All Entries')], string='Target Moves', required=True,
default='posted')
date_from = fields.Date(string='Start Date', default=date.today(),
requred=True)
@ -41,7 +41,7 @@ class BankBookWizard(models.TransientModel):
requred=True)
display_account = fields.Selection(
[('all', 'All'), ('movement', 'With movements'),
('not_zero', 'With balance is not equal to 0'), ],
('not_zero', 'With balance is not equal to 0')],
string='Display Accounts', required=True, default='movement')
sortby = fields.Selection(
[('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')],

2
base_accounting_kit/wizard/account_bank_book_wizard_view.xml

@ -38,6 +38,6 @@
</record>
<menuitem id="account_bank_book_menu" name="Bank Book" action="action_account_bank_book_view"
parent="base_accounting_kit.account_reports_generic_statements"/>
parent="base_accounting_kit.account_reports_daily_reports"/>
</data>
</odoo>

6
base_accounting_kit/wizard/account_cash_book_wizard.py

@ -27,13 +27,13 @@ from odoo.exceptions import UserError
class CashBookWizard(models.TransientModel):
_name = 'account.cash.book.report'
_description = 'Account Cash Book Report'
company_id = fields.Many2one('res.company', string='Company',
readonly=True,
default=lambda self: self.env.user.company_id)
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries'),
], string='Target Moves', required=True,
('all', 'All Entries')], string='Target Moves', required=True,
default='posted')
date_from = fields.Date(string='Start Date', default=date.today(),
requred=True)
@ -41,7 +41,7 @@ class CashBookWizard(models.TransientModel):
requred=True)
display_account = fields.Selection(
[('all', 'All'), ('movement', 'With movements'),
('not_zero', 'With balance is not equal to 0'), ],
('not_zero', 'With balance is not equal to 0')],
string='Display Accounts', required=True, default='movement')
sortby = fields.Selection(
[('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')],

2
base_accounting_kit/wizard/account_cash_book_wizard_view.xml

@ -38,6 +38,6 @@
</record>
<menuitem id="account_cash_book_menu" name="Cash Book" action="action_account_cash_book_view"
parent="base_accounting_kit.account_reports_generic_statements"/>
parent="base_accounting_kit.account_reports_daily_reports"/>
</data>
</odoo>

4
base_accounting_kit/wizard/account_day_book_wizard.py

@ -26,6 +26,7 @@ from odoo import models, fields
class DayBookWizard(models.TransientModel):
_name = 'account.day.book.report'
_description = 'Account Day Book Report'
company_id = fields.Many2one('res.company', string='Company',
readonly=True,
@ -35,8 +36,7 @@ class DayBookWizard(models.TransientModel):
default=lambda self: self.env[
'account.journal'].search([]))
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries'),
], string='Target Moves', required=True,
('all', 'All Entries')], string='Target Moves', required=True,
default='posted')
account_ids = fields.Many2many('account.account',

2
base_accounting_kit/wizard/account_day_book_wizard_view.xml

@ -35,6 +35,6 @@
</record>
<menuitem id="account_day_book_menu" name="Day Book" action="action_account_day_book_view"
parent="base_accounting_kit.account_reports_generic_statements"/>
parent="base_accounting_kit.account_reports_daily_reports"/>
</data>
</odoo>

38
base_accounting_kit/wizard/account_report_common_account.py

@ -1,38 +0,0 @@
# -*- 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
class AccountCommonAccountReport(models.TransientModel):
_name = 'account.common.account.report'
_description = 'Account Common Account Report'
_inherit = "account.common.report"
display_account = fields.Selection(
[('all', 'All'), ('movement', 'With movements'),
('not_zero', 'With balance is not equal to 0'), ],
string='Display Accounts', required=True, default='movement')
def pre_print_report(self, data):
data['form'].update(self.read(['display_account'])[0])
return data

4
base_accounting_kit/wizard/cash_flow_report.py

@ -49,8 +49,8 @@ class AccountingReport(models.TransientModel):
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='Start Date')
date_to_cmp = fields.Date(string='End Date')
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.")

6
base_accounting_kit/wizard/financial_report.py

@ -48,11 +48,6 @@ class FinancialReport(models.TransientModel):
enable_filter = fields.Boolean(
string='Enable Comparison',
default=False)
target_move = fields.Selection([
('all', 'All'),
('posted', 'Posted')],
string="Type",
default='all')
account_report_id = fields.Many2one(
'account.financial.report',
string='Account Reports',
@ -382,6 +377,7 @@ class ProfitLossPdf(models.AbstractModel):
""" Abstract model for generating PDF report value and send to template """
_name = 'report.base_accounting_kit.report_financial'
_description = 'Financial Report'
@api.model
def _get_report_values(self, docids, data=None):

2
base_accounting_kit/wizard/journal_audit.py

@ -29,7 +29,7 @@ class AccountPrintJournal(models.TransientModel):
_description = "Account Print Journal"
sort_selection = fields.Selection(
[('date', 'Date'), ('move_name', 'Journal Entry Number'), ],
[('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,

2
base_accounting_kit/wizard/recurring_payments.py

@ -29,6 +29,7 @@ from odoo.exceptions import UserError
class RecurringPaymentsWizard(models.TransientModel):
_name = 'recurring.payments.wizard'
_description = 'Recurring Payment Wizard'
recurring_lines = fields.One2many('account.recurring.entries.line', 'p_id')
date_from = fields.Date('Starting Date', default=date.today())
@ -131,6 +132,7 @@ class RecurringPaymentsWizard(models.TransientModel):
class GetAllRecurringEntries(models.TransientModel):
_name = 'account.recurring.entries.line'
_description = 'Account Recurring Entries Line'
date = fields.Date('Date')
template_name = fields.Char('Name')

17
base_accounting_kit/wizard/recurring_payments_wizard.xml

@ -50,22 +50,13 @@
<field name="target">new</field>
</record>
<!-- Create a parent menu for payments and recurring payment -->
<menuitem id="menu_action_account_payments_receivable_main" name="Payments"
parent="account.menu_finance_receivables" sequence="15"/>
<menuitem id="menu_action_account_payments_payable_main" name="Payments"
parent="account.menu_finance_payables" sequence="20"/>
<!-- Override the existing Payment menu -->
<menuitem action="account.action_account_payments" id="menu_action_account_payments_receivable"
parent="menu_action_account_payments_receivable_main" sequence="1"/>
<menuitem action="account.action_account_payments_payable" id="menu_action_account_payments_payable"
parent="menu_action_account_payments_payable_main" sequence="1"/>
<!-- Menu for recurring payment -->
<menuitem id="account_recurring_payments_child2" name="Recurring Entries"
action="action_account_recurring_payments_wizard_view"
parent="menu_action_account_payments_receivable_main" groups="account.group_account_user"/>
parent="account.menu_finance_receivables" sequence="16"
groups="account.group_account_user,account.group_account_manager"/>
<menuitem id="account_recurring_payments_child3" name="Recurring Entries"
action="action_account_recurring_payments_wizard_view"
parent="menu_action_account_payments_payable_main" groups="account.group_account_user"/>
parent="account.menu_finance_payables" sequence="20"
groups="account.group_account_user,account.group_account_manager"/>
</data>
</odoo>

1
hr_payroll_account_community/static/description/index.html

@ -0,0 +1 @@
Enables payroll accounting features in odoo 13.
Loading…
Cancel
Save