From 79793410ea61c1da919092294cf69d7b98bdad84 Mon Sep 17 00:00:00 2001 From: SilvioC2C Date: Wed, 17 Apr 2024 12:16:16 +0200 Subject: [PATCH] fixup! improve fields' ``help`` messages --- .../models/res_company.py | 12 +++++++++--- .../models/stock_warehouse.py | 10 ++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/stock_warehouse_calendar_orderpoint/models/res_company.py b/stock_warehouse_calendar_orderpoint/models/res_company.py index d702d162c066..afed9524796e 100644 --- a/stock_warehouse_calendar_orderpoint/models/res_company.py +++ b/stock_warehouse_calendar_orderpoint/models/res_company.py @@ -10,11 +10,15 @@ class ResCompany(models.Model): orderpoint_calendar_id = fields.Many2one( comodel_name="resource.calendar", string="Reordering Calendar", - help="Calendar used to compute the lead date of reordering rules", + help="Calendar used to compute the lead date of reordering rules\n" + "This value will be used as default value for new warehouses linked to this" + " company", ) orderpoint_on_workday = fields.Boolean( string="Schedule the lead date on workday only", - help="Postpone the lead date to the first available workday", + help="Postpone the lead date to the first available workday\n" + "This value will be used as default value for new warehouses linked to this" + " company", ) orderpoint_on_workday_policy = fields.Selection( [ @@ -30,6 +34,8 @@ class ResCompany(models.Model): "* skip non-workdays: compute the order date consuming lead delay days only on" " (eg: run action on Friday with 2 days lead delay -> skip Saturday and Sunday" " -> start consuming lead days on Monday as first lead day -> the result is" - " Tuesday)\n", + " Tuesday)\n" + "This value will be used as default value for new warehouses linked to this" + " company", default="skip_to_first_workday", # Retro-compatible default value ) diff --git a/stock_warehouse_calendar_orderpoint/models/stock_warehouse.py b/stock_warehouse_calendar_orderpoint/models/stock_warehouse.py index 5f5c3a66f8e1..23e9f03b2e32 100644 --- a/stock_warehouse_calendar_orderpoint/models/stock_warehouse.py +++ b/stock_warehouse_calendar_orderpoint/models/stock_warehouse.py @@ -11,15 +11,13 @@ class StockWarehouse(models.Model): comodel_name="resource.calendar", string="Reordering Calendar", default=lambda o: o._default_orderpoint_calendar_id(), - help="Calendar used to scheduled the execution of reordering rules", + help="Calendar used to compute the lead date of reordering rules", ) orderpoint_on_workday = fields.Boolean( string="Reordering on Workday", default=lambda o: o._default_orderpoint_on_workday(), - help=( - "Postpone the lead date to the first available workday. " - "This is based on the Working Hours calendar." - ), + help="Postpone the lead date to the first available workday based on the" + " Working Hours calendar", ) orderpoint_on_workday_policy = fields.Selection( [ @@ -36,7 +34,7 @@ class StockWarehouse(models.Model): "* skip non-workdays: compute the order date consuming lead delay days only on" " (eg: run action on Friday with 2 days lead delay -> skip Saturday and Sunday" " -> start consuming lead days on Monday as first lead day -> the result is" - " Tuesday)\n", + " Tuesday)", ) def _default_orderpoint_calendar_id(self):