From df037bcb9db08521d1d3a74a0e241deafea5e9a8 Mon Sep 17 00:00:00 2001 From: Alessio Renda Date: Mon, 11 Dec 2023 15:12:15 +0100 Subject: [PATCH] [IMP] l10n_it_delivery_note: add _get_sync_fields method --- .../models/stock_delivery_note.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/l10n_it_delivery_note/models/stock_delivery_note.py b/l10n_it_delivery_note/models/stock_delivery_note.py index 5c674edef632..fcfcc5d93cf9 100644 --- a/l10n_it_delivery_note/models/stock_delivery_note.py +++ b/l10n_it_delivery_note/models/stock_delivery_note.py @@ -660,6 +660,25 @@ def _get_report_base_filename(self): self.ensure_one() return f"Delivery Note - {self.name}" + @api.model + def _get_sync_fields(self): + """ + Returns a list of fields that can be used to + synchronize the state of the Delivery Note + """ + return [ + "date", + "transport_datetime", + "transport_condition_id", + "goods_appearance_id", + "transport_reason_id", + "transport_method_id", + "gross_weight", + "net_weight", + "packages", + "volume", + ] + def update_transport_datetime(self): self.transport_datetime = datetime.datetime.now()