From 250b9022cf03887396cf59977728e6957c7a5787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Sainl=C3=A9ger?= Date: Thu, 19 Jan 2023 10:14:47 +0100 Subject: [PATCH] [IMP] hr-luncheon-voucher: improve allocation form creation process --- .../models/hr_lv_allocation.py | 1 + .../views/hr_lv_allocation_views.xml | 29 ++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/hr-luncheon-voucher/models/hr_lv_allocation.py b/hr-luncheon-voucher/models/hr_lv_allocation.py index 6915d0c..1be56c0 100644 --- a/hr-luncheon-voucher/models/hr_lv_allocation.py +++ b/hr-luncheon-voucher/models/hr_lv_allocation.py @@ -97,6 +97,7 @@ class LuncheonVouchersAllocation(models.Model): }, ) + @api.model_create_multi def create(self, values): res = super(LuncheonVouchersAllocation, self).create(values) res._calculate_number_acquired_lv() diff --git a/hr-luncheon-voucher/views/hr_lv_allocation_views.xml b/hr-luncheon-voucher/views/hr_lv_allocation_views.xml index c812fc2..3f6ede8 100644 --- a/hr-luncheon-voucher/views/hr_lv_allocation_views.xml +++ b/hr-luncheon-voucher/views/hr_lv_allocation_views.xml @@ -9,7 +9,8 @@ - + @@ -20,10 +21,14 @@
-
@@ -43,14 +48,18 @@
-

- +