mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Move fields mandate_required and export_ascii from payment mode to payment method
Display chatter on payment orders Several small usability improvements
This commit is contained in:
@@ -28,7 +28,9 @@ class SaleOrder(models.Model):
|
||||
@api.onchange('payment_mode_id')
|
||||
def payment_mode_change(self):
|
||||
"""Select by default the first valid mandate of the partner"""
|
||||
if self.payment_mode_id.mandate_required and self.partner_id:
|
||||
if (
|
||||
self.payment_mode_id.payment_method_id.mandate_required and
|
||||
self.partner_id):
|
||||
mandates = self.env['account.banking.mandate'].search([
|
||||
('state', '=', 'valid'),
|
||||
('partner_id', '=', self.commercial_partner_id.id),
|
||||
|
||||
Reference in New Issue
Block a user