From cb302a30b42698346aa61ef3ec45cf86977f9065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Sainl=C3=A9ger?= Date: Thu, 5 Jun 2025 09:05:45 +0200 Subject: [PATCH] [IMP] event_generate_quotation_from_registration: block field edition of event.registration.financier if the quotation is done. --- .../models/event_registration_financier.py | 4 ++++ .../views/event_registration_views.xml | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/event_generate_quotation_from_registration/models/event_registration_financier.py b/event_generate_quotation_from_registration/models/event_registration_financier.py index 67dce93..6299dae 100644 --- a/event_generate_quotation_from_registration/models/event_registration_financier.py +++ b/event_generate_quotation_from_registration/models/event_registration_financier.py @@ -17,6 +17,10 @@ class EventRegistrationFinancier(models.Model): financier_id = fields.Many2one('res.partner', string="Financeur", required=True) terms = fields.Char('Modalités') amount = fields.Monetary('Montant', currency_field="company_currency_id") + state = fields.Selection( + related='quotation_id.state', + string="Order Status", + copy=False, store=True, precompute=True) def get_product_id(self): diff --git a/event_generate_quotation_from_registration/views/event_registration_views.xml b/event_generate_quotation_from_registration/views/event_registration_views.xml index b8eebd6..095df3b 100644 --- a/event_generate_quotation_from_registration/views/event_registration_views.xml +++ b/event_generate_quotation_from_registration/views/event_registration_views.xml @@ -10,9 +10,10 @@ - - - + + + +