diff --git a/account_stock_situation/models/config_settings.py b/account_stock_situation/models/config_settings.py index e55efb2b..2fb1ed6b 100644 --- a/account_stock_situation/models/config_settings.py +++ b/account_stock_situation/models/config_settings.py @@ -26,25 +26,18 @@ def __default_account_purchase_stock_domain(self): comodel_name="account.account", readonly=False, related="company_id.account_purchase_stock_id", - domain=[("code", "ilike", lambda s: s.account_purchase_stock_domain)], ) account_stock_id = fields.Many2one( comodel_name="account.account", readonly=False, related="company_id.account_stock_id", - domain=[("code", "ilike", lambda s: s.account_stock_domain)], - ) - account_stock_domain = fields.Char(default=__default_account_stock_domain) - account_purchase_stock_domain = fields.Char( - default=__default_account_purchase_stock_domain ) + account_stock_help = fields.Text(compute="_compute_account_stock_help") - def _account_stock_domain(self, kind=None): - "Other localisations maybe completed here" - if "l10n_fr" in self.env.registry: - if not kind: - return "355%00" - elif kind == "purchase": - return "603%" - else: - return "%" + def _compute_account_stock_help(self, kind=None): + for rec in self: + name = "" + if "l10n_fr" in self.env.registry._init_modules: + name = "Compte de stock: '355...'" + name += "Compte de stock d'achat: '603...'" + rec.account_stock_help = name diff --git a/account_stock_situation/views/config_settings.xml b/account_stock_situation/views/config_settings.xml index 16a0de8b..86816a22 100644 --- a/account_stock_situation/views/config_settings.xml +++ b/account_stock_situation/views/config_settings.xml @@ -2,11 +2,10 @@ res.config.settings - - + - -

Valorisation de Stock Valuation

+ +

Stock Valuation

@@ -46,12 +45,17 @@
+
+
+ Aide +
+ +
+
+
Stock account -
- Stock account -
@@ -60,11 +64,8 @@
Purchase stock account -
- Stock account -
- +