diff --git a/odex25_accounting/custom_account_payment/models/account_payment.py b/odex25_accounting/custom_account_payment/models/account_payment.py index 247e2e34a..f53c0ab47 100644 --- a/odex25_accounting/custom_account_payment/models/account_payment.py +++ b/odex25_accounting/custom_account_payment/models/account_payment.py @@ -5,27 +5,27 @@ class AccountPayment(models.Model): _inherit = 'account.payment' destination_journal_id = fields.Many2one(comodel_name='account.journal') - available_account_receiving_method_ids = fields.Many2many('account.payment.method.line', compute="_compute_available_account_receiving_method_ids") - account_receiving_method_id = fields.Many2one( - 'account.payment.method.line', - string="Receiving Method", - default=False - ) + # available_account_receiving_method_ids = fields.Many2many('account.payment.method.line', compute="_compute_available_account_receiving_method_ids") + # account_receiving_method_id = fields.Many2one( + # 'account.payment.method.line', + # string="Receiving Method", + # default=False + # ) paired_internal_transfer_payment_id = fields.Many2one('account.payment', help="When an internal transfer is posted, a paired payment is created. " "They are cross referenced trough this field", copy=False) - @api.depends('destination_journal_id') - def _compute_available_account_receiving_method_ids(self): - AccountPaymentMethodLine = self.env['account.payment.method.line'].sudo() - for rec in self: - rec.available_account_receiving_method_ids = AccountPaymentMethodLine.search([('id', 'in', self.destination_journal_id.outbound_payment_method_line_ids.ids)]) + # @api.depends('destination_journal_id') + # def _compute_available_account_receiving_method_ids(self): + # AccountPaymentMethodLine = self.env['account.payment.method.line'].sudo() + # for rec in self: + # rec.available_account_receiving_method_ids = AccountPaymentMethodLine.search([('id', 'in', self.destination_journal_id.outbound_payment_method_line_ids.ids)]) - @api.onchange('destination_journal_id') - def _onchange_destination_journal_id(self): - self.account_receiving_method_id = False + # @api.onchange('destination_journal_id') + # def _onchange_destination_journal_id(self): + # self.account_receiving_method_id = False def action_post(self): res = super(AccountPayment, self).action_post() diff --git a/odex25_accounting/custom_account_payment/views/account_payment.xml b/odex25_accounting/custom_account_payment/views/account_payment.xml index dc0577ac4..af8953c58 100644 --- a/odex25_accounting/custom_account_payment/views/account_payment.xml +++ b/odex25_accounting/custom_account_payment/views/account_payment.xml @@ -10,7 +10,7 @@ - +