[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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user