Skip to content

Commit f67b9d9

Browse files
committed
[17.0][FIX] stock_quant_package_dimension: make uom_name field compute
1 parent 0db5d38 commit f67b9d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stock_quant_package_dimension/models/stock_quant_package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class StockQuantPackage(models.Model):
6161
weight_uom_name = fields.Char(
6262
# Same as product.packing
6363
string="Weight unit of measure label",
64-
readonly=True,
64+
compute="_compute_weight_uom_name",
6565
)
6666

6767
volume_uom_id = fields.Many2one(
@@ -84,7 +84,7 @@ class StockQuantPackage(models.Model):
8484
readonly=True,
8585
)
8686

87-
@api.depends("weight_uom_id.name")
87+
@api.depends("weight_uom_id", "weight_uom_id.name")
8888
def _compute_weight_uom_name(self):
8989
# Don't use a related here as the original default value
9090
# causes warnings (Redundant default on related fields are not wanted)

0 commit comments

Comments
 (0)