Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/commercially_launched
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user