[IMP] account: Extract payment methods into their own file

The account payment file being quite big already,
and the payment methods being modified in another
task (2414749) we'll extract them into their own
file to make it easier to work with them

closes odoo/odoo#70937

Related: odoo/enterprise#18367
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
Nicolas (vin)
2021-05-18 07:52:08 +00:00
parent 41438824f7
commit 4db958989e
3 changed files with 15 additions and 11 deletions
+1
View File
@@ -16,6 +16,7 @@ from . import account_analytic_default
from . import account_partial_reconcile
from . import account_full_reconcile
from . import account_payment
from . import account_payment_method
from . import account_bank_statement
from . import chart_template
from . import account_analytic_line
-11
View File
@@ -4,17 +4,6 @@ from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError
class AccountPaymentMethod(models.Model):
_name = "account.payment.method"
_description = "Payment Methods"
_order = 'sequence'
name = fields.Char(required=True, translate=True)
code = fields.Char(required=True) # For internal identification
payment_type = fields.Selection([('inbound', 'Inbound'), ('outbound', 'Outbound')], required=True)
sequence = fields.Integer(help='Used to order Methods in the form view', default=10)
class AccountPayment(models.Model):
_name = "account.payment"
_inherits = {'account.move': 'move_id'}
@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
class AccountPaymentMethod(models.Model):
_name = "account.payment.method"
_description = "Payment Methods"
_order = 'sequence'
name = fields.Char(required=True, translate=True)
code = fields.Char(required=True) # For internal identification
payment_type = fields.Selection([('inbound', 'Inbound'), ('outbound', 'Outbound')], required=True)
sequence = fields.Integer(help='Used to order Methods in the form view', default=10)