From d300de48235d4297fc214fee06acc5de05530545 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 | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/account_payment_mode/views/account_payment_mode.xml b/account_payment_mode/views/account_payment_mode.xml index aa67cb2ec..a7ecd70f2 100644 --- a/account_payment_mode/views/account_payment_mode.xml +++ b/account_payment_mode/views/account_payment_mode.xml @@ -11,12 +11,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 a938cc7c6..d01d4ff31 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 5d699245e..83bd71e0c 100644 --- a/account_payment_order/views/account_payment_order.xml +++ b/account_payment_order/views/account_payment_order.xml @@ -98,6 +98,8 @@ account.payment.order + +