Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/commercially_launched

This commit is contained in:
mgw
2025-03-20 15:44:11 +08:00
8 changed files with 94 additions and 9 deletions

View File

@@ -26,4 +26,12 @@ class SfQualityPoint(models.Model):
if self.test_type_id.name == '出厂检验报告':
if self.measure_on != 'product':
raise ValidationError('出厂检验报告的测量对象必须为产品')
@api.onchange('measure_on')
def _onchange_measure_on(self):
"""
如果measure_on的值变了则清空test_type_id的值
"""
if self.measure_on != 'product':
self.test_type_id = False