summaryrefslogtreecommitdiff
path: root/addons/account_check_printing/models
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2019-07-10 14:59:37 +0200
committerAdrian Torres <adt@odoo.com>2019-07-17 14:13:12 +0200
commit4b38cc6590abcb58a0ca102a06063eb3db7ac1f4 (patch)
treecfd11739fc6b4c0cb4b23b54cc6badad4bf5c55e /addons/account_check_printing/models
parentf6fdde96bddfedf8764cd8a73089e44340d476ae (diff)
[REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
Diffstat (limited to 'addons/account_check_printing/models')
-rw-r--r--addons/account_check_printing/models/account_journal.py3
-rw-r--r--addons/account_check_printing/models/account_payment.py4
-rw-r--r--addons/account_check_printing/models/chart_template.py1
3 files changed, 0 insertions, 8 deletions
diff --git a/addons/account_check_printing/models/account_journal.py b/addons/account_check_printing/models/account_journal.py
index 76bcef6412a..433e00c55e8 100644
--- a/addons/account_check_printing/models/account_journal.py
+++ b/addons/account_check_printing/models/account_journal.py
@@ -47,7 +47,6 @@ class AccountJournal(models.Model):
rec._create_check_sequence()
return rec
- @api.multi
@api.returns('self', lambda value: value.id)
def copy(self, default=None):
rec = super(AccountJournal, self).copy(default)
@@ -82,7 +81,6 @@ class AccountJournal(models.Model):
'outbound_payment_method_ids': [(4, check_printing.id, None)],
})
- @api.multi
def get_journal_dashboard_datas(self):
domain_checks_to_print = [
('journal_id', '=', self.id),
@@ -94,7 +92,6 @@ class AccountJournal(models.Model):
num_checks_to_print=len(self.env['account.payment'].search(domain_checks_to_print))
)
- @api.multi
def action_checks_to_print(self):
return {
'name': _('Checks to Print'),
diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py
index 3ba1be801f5..fdf0ecdf726 100644
--- a/addons/account_check_printing/models/account_payment.py
+++ b/addons/account_check_printing/models/account_payment.py
@@ -50,7 +50,6 @@ class AccountPayment(models.Model):
if len(communication) > 60:
raise ValidationError(_("A check memo cannot exceed 60 characters."))
- @api.multi
def post(self):
res = super(AccountPayment, self).post()
payment_method_check = self.env.ref('account_check_printing.account_payment_method_check')
@@ -59,7 +58,6 @@ class AccountPayment(models.Model):
payment.check_number = sequence.next_by_id()
return res
- @api.multi
def print_checks(self):
""" Check that the recordset is valid, set the payments state to sent and call print_checks() """
# Since this method can be called via a client_action_multi, we need to make sure the received records are what we expect
@@ -94,11 +92,9 @@ class AccountPayment(models.Model):
self.filtered(lambda r: r.state == 'draft').post()
return self.do_print_checks()
- @api.multi
def unmark_sent(self):
self.write({'state': 'posted'})
- @api.multi
def do_print_checks(self):
""" This method is a hook for l10n_xx_check_printing modules to implement actual check printing capabilities """
raise UserError(_("You have to choose a check layout. For this, go in Apps, search for 'Checks layout' and install one."))
diff --git a/addons/account_check_printing/models/chart_template.py b/addons/account_check_printing/models/chart_template.py
index 708c2d8249e..35c101873fb 100644
--- a/addons/account_check_printing/models/chart_template.py
+++ b/addons/account_check_printing/models/chart_template.py
@@ -6,7 +6,6 @@ from odoo import api, models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
- @api.multi
def _create_bank_journals(self, company, acc_template_ref):
'''
When system automatically creates journals of bank and cash type when CoA is being installed