From 8fd27ac3144746c926c0b9de550cf8db26ec59a7 Mon Sep 17 00:00:00 2001 From: KaySar12 Date: Thu, 20 Mar 2025 11:17:41 +0700 Subject: [PATCH] update --- setup/delete_records.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setup/delete_records.py b/setup/delete_records.py index 300568081..a694d5fea 100755 --- a/setup/delete_records.py +++ b/setup/delete_records.py @@ -34,7 +34,9 @@ def parse_arguments(): parser.add_argument("db_name", help="Database name") parser.add_argument("base_model", help="Model to delete records from") parser.add_argument("--host", default=DEFAULT_HOST, help="Odoo server host") - parser.add_argument("--port", type=int, default=DEFAULT_PORT, help="Odoo server port") + parser.add_argument( + "--port", type=int, default=DEFAULT_PORT, help="Odoo server port" + ) parser.add_argument("--username", default=DEFAULT_USERNAME, help="Odoo username") parser.add_argument("--password", default=DEFAULT_PASSWORD, help="Odoo password") parser.add_argument("--domain", default=DEFAULT_DOMAIN, help="Domain filter") @@ -200,7 +202,9 @@ def delete_batch(odoo, batch, model_name, related_models, process_id, force, sof def main(): """Orchestrate the deletion process.""" args = parse_arguments() - odoo = connect_to_odoo(args.host, args.port, args.db_name, args.username, args.password) + odoo = connect_to_odoo( + args.host, args.port, args.db_name, args.username, args.password + ) domain = parse_domain(args.domain) model = odoo.env[args.base_model] @@ -243,4 +247,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main()