Browse Source

Jul 31 [UPDT]: Updated 'base_accounting_kit'

pull/280/head
AjmalCybro 2 years ago
parent
commit
1a2e0237d8
  1. 9
      base_accounting_kit/__manifest__.py
  2. 1
      base_accounting_kit/wizard/__init__.py
  3. 44
      base_accounting_kit/wizard/account_payment_register.py
  4. 23
      base_accounting_kit/wizard/account_payment_register_wizard_views.xml

9
base_accounting_kit/__manifest__.py

@ -16,12 +16,9 @@
# #
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE # You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program. # (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{ {
'name': 'Odoo 15 Full Accounting Kit', 'name': 'Odoo 15 Full Accounting Kit',
'version': '15.0.2.2.5', 'version': '15.0.2.2.6',
'category': 'Accounting', 'category': 'Accounting',
'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs', 'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs',
'summary': """ Asset and Budget Management, 'summary': """ Asset and Budget Management,
@ -72,6 +69,7 @@
'views/recurring_payments_view.xml', 'views/recurring_payments_view.xml',
'views/account_followup.xml', 'views/account_followup.xml',
'views/followup_report.xml', 'views/followup_report.xml',
'wizard/account_payment_register_wizard_views.xml',
'wizard/asset_depreciation_confirmation_wizard_views.xml', 'wizard/asset_depreciation_confirmation_wizard_views.xml',
'wizard/asset_modify_views.xml', 'wizard/asset_modify_views.xml',
'views/account_asset_views.xml', 'views/account_asset_views.xml',
@ -135,3 +133,6 @@
'auto_install': False, 'auto_install': False,
'application': True, 'application': True,
} }
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################

1
base_accounting_kit/wizard/__init__.py

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

44
base_accounting_kit/wizard/account_payment_register.py

@ -0,0 +1,44 @@
# -*- 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 models, fields
from odoo.exceptions import ValidationError
class AccountPaymentRegister(models.TransientModel):
_inherit = 'account.payment.register'
effective_date = fields.Date('Effective Date',
help='Effective date of PDC', copy=False,
default=False)
bank_reference = fields.Char(copy=False)
cheque_reference = fields.Char(copy=False)
def _create_payment_vals_from_wizard(self):
res = super(AccountPaymentRegister,
self)._create_payment_vals_from_wizard()
res.update({'effective_date': self.effective_date,
'cheque_reference': self.cheque_reference,
'bank_reference': self.bank_reference})
if not res['effective_date'] and self.payment_method_code == 'pdc':
raise ValidationError("Please choose an Effective Date.")
return res

23
base_accounting_kit/wizard/account_payment_register_wizard_views.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_account_payment_register_form" model="ir.ui.view">
<field name="model">account.payment.register</field>
<field name="inherit_id"
ref="account.view_account_payment_register_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='payment_date']"
position="after">
<field name="effective_date"
attrs="{'invisible': [('payment_method_code', '!=', 'pdc')]}"/>
</xpath>
<xpath expr="//field[@name='partner_bank_id']"
position="after">
<field name="bank_reference"/>
</xpath>
<xpath expr="//field[@name='partner_bank_id']"
position="after">
<field name="cheque_reference"/>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save