sf-询价单-新增状态及修改未审批的提示语句
This commit is contained in:
@@ -21,7 +21,8 @@ class jikimo_purchase_tier_validation(models.Model):
|
||||
def button_confirm(self):
|
||||
for record in self:
|
||||
if record.need_validation and record.validation_status != 'validated':
|
||||
raise ValidationError(_('请先完成审批!'))
|
||||
raise ValidationError(_('此操作需要至少对一条记录进行审批。'
|
||||
'请发起审批申请。'))
|
||||
return super().button_confirm()
|
||||
|
||||
# def button_confirm(self):
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header/button[@name='button_cancel']" position="replace">
|
||||
</xpath>
|
||||
<xpath expr="//header/field[@name='state']" position="replace">
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,sent,to approve, approved, purchase" readonly="1"/>
|
||||
</xpath>
|
||||
|
||||
|
||||
<xpath expr="//header/button[last()]" position="after">
|
||||
<button name="button_cancel" states="draft,to approve,sent,purchase" string="取消" type="object" data-hotkey="x" />
|
||||
|
||||
Reference in New Issue
Block a user