Skip to content

Commit d70ce28

Browse files
committed
fix(spp_metrics_core,spp_statistic): fix manifest descriptions and auto_install value
- Set auto_install to boolean True in spp_statistic_studio (was a list) - Remove non-existent fields from spp_metrics_core Fields Provided section - Fix model name reference from spp.statistic.category to spp.metric.category - Combine split domain string literals in statistic.py into one
1 parent 3ac615d commit d70ce28

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

spp_metrics_core/__manifest__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
Fields Provided
5050
---------------
5151
- **Identity**: name, label, description
52-
- **Computation**: metric_type, cel_expression, aggregation
53-
- **Presentation**: format, unit, decimal_places
52+
- **Presentation**: unit, decimal_places
5453
- **Categorization**: category_id
5554
- **Metadata**: sequence, active
5655

spp_statistic/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
Models
5555
------
5656
- ``spp.statistic``: Publishable statistic referencing a CEL variable
57-
- ``spp.statistic.category``: Organization categories for statistics
57+
- ``spp.metric.category``: Organization categories for statistics
5858
- ``spp.statistic.context``: Context-specific presentation configuration
5959
6060
Usage

spp_statistic/models/statistic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Statistic(models.Model):
3535
string="CEL Variable",
3636
required=True,
3737
ondelete="restrict",
38-
domain="[('source_type', 'in', ['aggregate', 'computed', 'field']), " "('state', '=', 'active')]",
38+
domain="[('source_type', 'in', ['aggregate', 'computed', 'field']), ('state', '=', 'active')]",
3939
help="The CEL variable that provides the computation for this statistic",
4040
)
4141
variable_accessor = fields.Char(
@@ -140,7 +140,7 @@ def _check_name_format(self):
140140
for rec in self:
141141
if not re.match(r"^[a-z][a-z0-9_]*$", rec.name):
142142
raise ValidationError(
143-
_("Statistic name '%(name)s' must be lowercase with underscores " "(e.g., 'children_under_5').")
143+
_("Statistic name '%(name)s' must be lowercase with underscores (e.g., 'children_under_5').")
144144
% {"name": rec.name}
145145
)
146146

spp_statistic_studio/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
],
2020
"installable": True,
2121
# Bridge module: auto-install when both spp_statistic and spp_studio are present
22-
"auto_install": ["spp_statistic", "spp_studio"],
22+
"auto_install": True,
2323
}

0 commit comments

Comments
 (0)