account
This commit is contained in:
3
accountant/models/__init__.py
Normal file
3
accountant/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from . import account_move
|
||||
from . import chart_template
|
||||
from . import res_company
|
||||
9
accountant/models/account_move.py
Normal file
9
accountant/models/account_move.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
_inherit = 'account.move'
|
||||
|
||||
def _get_invoice_in_payment_state(self):
|
||||
# OVERRIDE to enable the 'in_payment' state on invoices.
|
||||
return 'in_payment'
|
||||
8
accountant/models/chart_template.py
Normal file
8
accountant/models/chart_template.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountChartTemplate(models.AbstractModel):
|
||||
_inherit = 'account.chart.template'
|
||||
|
||||
def _post_load_data(self, template_code, company, template_data):
|
||||
super()._post_load_data(template_code, company, template_data)
|
||||
13
accountant/models/res_company.py
Normal file
13
accountant/models/res_company.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_inherit = 'res.company'
|
||||
|
||||
account_tax_return_journal_id = fields.Many2one(
|
||||
comodel_name='account.journal',
|
||||
inverse='_inverse_account_tax_return_journal_id',
|
||||
)
|
||||
|
||||
def _inverse_account_tax_return_journal_id(self):
|
||||
self.account_tax_return_journal_id.show_on_dashboard = True
|
||||
Reference in New Issue
Block a user