From b9c36ec6569ecab6eb8d120ec3980575341188fc Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 22 May 2018 16:47:10 +0200 Subject: [PATCH] Several small usability improvements - when manually encoding a payment line, get company currency as default currency - Search on payment order numbers - Direct search on bank journal name in payment orders - remove widget="selection" on account.payement.mode : this object is rarely modified, so widget='selection' is not a time saver, but we miss the HTML link, which can be pretty convenient to check the configuration. --- account_payment_mode/views/account_payment_mode.xml | 5 ++--- account_payment_order/models/account_payment_line.py | 2 +- account_payment_order/views/account_payment_order.xml | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/account_payment_mode/views/account_payment_mode.xml b/account_payment_mode/views/account_payment_mode.xml index 845641479..0cdd360f3 100644 --- a/account_payment_mode/views/account_payment_mode.xml +++ b/account_payment_mode/views/account_payment_mode.xml @@ -10,12 +10,11 @@ - + + attrs="{'invisible': [('bank_account_link', '!=', 'fixed')], 'required': [('bank_account_link', '=', 'fixed')]}"/> diff --git a/account_payment_order/models/account_payment_line.py b/account_payment_order/models/account_payment_line.py index 08ffa9002..d1ad6eae9 100644 --- a/account_payment_order/models/account_payment_line.py +++ b/account_payment_order/models/account_payment_line.py @@ -119,7 +119,7 @@ class AccountPaymentLine(models.Model): self.partner_id = False self.partner_bank_id = False self.amount_currency = 0.0 - self.currency_id = False + self.currency_id = self.env.user.company_id.currency_id self.communication = False def invoice_reference_type2communication_type(self): diff --git a/account_payment_order/views/account_payment_order.xml b/account_payment_order/views/account_payment_order.xml index 37e44780b..aaa9f9912 100644 --- a/account_payment_order/views/account_payment_order.xml +++ b/account_payment_order/views/account_payment_order.xml @@ -102,7 +102,8 @@ account.payment.order - + +