diff --git a/partner_compassion/i18n/de.po b/partner_compassion/i18n/de.po index 682fa0a9..a042b39e 100644 --- a/partner_compassion/i18n/de.po +++ b/partner_compassion/i18n/de.po @@ -849,7 +849,7 @@ msgstr "Nachname" #. module: partner_compassion #: model:ir.model.fields,field_description:partner_compassion.field_search_bank_address_wizard__date msgid "Last time used" -msgstr "" +msgstr "Letzte Nutzung" #. module: partner_compassion #: model_terms:ir.ui.view,arch_db:partner_compassion.view_partner_form_compassion_ch @@ -1608,10 +1608,6 @@ msgstr "" msgid "Existing partner info in bank data (May be unavailable)" msgstr "Partnerinformationen in Bankdaten (können nicht verfügbar sein)" -#. module: partner_compassion -#: model:ir.model.fields,field_description:partner_compassion.field_search_bank_address_wizard__date -msgid "Last time used" -msgstr "Letzte Nutzung" #. module: partner_compassion #: code:addons/partner_compassion/wizards/search_bank_address_wizard.py:0 diff --git a/partner_compassion/i18n/fr_CH.po b/partner_compassion/i18n/fr_CH.po index fb4f43b9..d7a22a8f 100644 --- a/partner_compassion/i18n/fr_CH.po +++ b/partner_compassion/i18n/fr_CH.po @@ -848,7 +848,7 @@ msgstr "Nom de famille" #. module: partner_compassion #: model:ir.model.fields,field_description:partner_compassion.field_search_bank_address_wizard__date msgid "Last time used" -msgstr "" +msgstr "Dernière utilisation" #. module: partner_compassion #: model_terms:ir.ui.view,arch_db:partner_compassion.view_partner_form_compassion_ch @@ -1613,9 +1613,3 @@ msgstr "Infos partenaire données bancaires (peut être indisponible)" #, python-format msgid "Partner Address" msgstr "Adresse partenaire" - - -#. module: partner_compassion -#: model:ir.model.fields,field_description:partner_compassion.field_search_bank_address_wizard__date -msgid "Last time used" -msgstr "Dernière utilisation" \ No newline at end of file diff --git a/partner_compassion/views/search_bank_address_wizard.xml b/partner_compassion/views/search_bank_address_wizard.xml index b55c8f2f..18328071 100644 --- a/partner_compassion/views/search_bank_address_wizard.xml +++ b/partner_compassion/views/search_bank_address_wizard.xml @@ -7,30 +7,31 @@
-

Existing Partner info in bank data (May be unavailable)

+

Existing Partner info in bank data (May be unavailable)

- - - + + + - - + +
diff --git a/partner_compassion/wizards/search_bank_address_wizard.py b/partner_compassion/wizards/search_bank_address_wizard.py index 786e306b..3d5d85fa 100644 --- a/partner_compassion/wizards/search_bank_address_wizard.py +++ b/partner_compassion/wizards/search_bank_address_wizard.py @@ -8,9 +8,10 @@ # ############################################################################## -from odoo import _, fields, models, api import re +from odoo import _, api, fields, models + class SearchBankAddressWizard(models.TransientModel): _name = "search.bank.address.wizard" @@ -22,12 +23,12 @@ class SearchBankAddressWizard(models.TransientModel): default=lambda self: self._get_default(), ) partner_address = fields.Text( - _("Partner Address"), + "Partner Address", compute="_compute_partner_address", readonly=True, ) date = fields.Date( - _("Last time used"), + "Last time used", related="account_move.date", ) @@ -54,15 +55,15 @@ def _extract_address_from_narration(self, narration): """ Extract Postal Address from account_move.narration field """ - match = re.search(r'Postal Address\s*\(PstlAdr\):\s*(.*)', narration) + match = re.search(r"Postal Address\s*\(PstlAdr\):\s*(.*)", narration) if match: return match.group(1).strip() return "" - @api.depends('account_move.narration') + @api.depends("account_move.narration") def _compute_partner_address(self): for record in self: - narration = record.account_move.narration or '' + narration = record.account_move.narration or "" record.partner_address = self._extract_address_from_narration(narration) def change_address(self):