Skip to content
Extraits de code Groupes Projets
Valider fbf7d7da rédigé par Julien - Le Filament's avatar Julien - Le Filament
Parcourir les fichiers

[FIX] get only delivery prm

parent 8ba8b3cd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -8,7 +8,7 @@
<field name="inherit_id" ref="oacc.acc_operation_form_view" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="clés de répartition" name="keys">
<page string="Clés de répartition" name="keys">
<field name="keys_repartition_ids" mode="tree">
<tree create="0">
<field name="date_send" />
......
......@@ -72,9 +72,9 @@ class AccRepartitionKeysWizard(models.TransientModel):
except (ValueError, IndexError) as exc:
raise UserError(_("Fichier de répartitions au mauvais format")) from exc
counter_list_from_operation = (
self.env["acc.counter.period"]
._get_periods_from_interval(
counter_list_from_operation = self.env[
"acc.counter.period"
]._get_periods_from_interval(
[("acc_operation_id", "=", self.operation_id.id)],
datetime.strptime(
entry_file_handler.get_min_date(), "%d-%m-%Y %H:%M"
......@@ -83,10 +83,12 @@ class AccRepartitionKeysWizard(models.TransientModel):
entry_file_handler.get_max_date(), "%d-%m-%Y %H:%M"
).date(),
)
.mapped("acc_counter_id.name")
)
entry_file_handler.operation_counter_list = counter_list_from_operation
entry_file_handler.operation_counter_list = [
period.acc_counter_id.name
for period in counter_list_from_operation
if period.prm_type == "delivery"
]
try:
file_check_result = entry_file_handler.check()
except (ValueError, IndexError) as exc:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter