1.优化分配工厂时材料型号获取方式为采购和外协时未有供应商返回提示

2.修复质量标准去掉审核按钮显示
This commit is contained in:
jinling.yang
2024-03-15 16:59:51 +08:00
parent df42932630
commit d5a1a82c72
6 changed files with 22 additions and 55 deletions

View File

@@ -11,26 +11,3 @@ class SfQualityPoint(models.Model):
"('product', 'consu')), '|', ('company_id', '=', False), ('company_id', '=', company_id)]", help=
"Quality Point will apply to every selected Products.")
check_state = fields.Selection([
('enable', '启用'),
('close', '关闭')
], string='审核状态', default='close')
# 审核
def action_check(self):
self.check_state = 'enable'
# picking_type_ids = fields.Many2many(
# 'stock.picking.type', string='执行节点', required=True, check_company=True)
class ResQualityAlertTeam(models.Model):
_inherit = 'quality.alert.team'
check_state = fields.Selection([
('enable', '启用'),
('close', '关闭')
], string='审核状态', default='close')
# 审核
def action_check(self):
self.check_state = 'enable'

View File

@@ -39,13 +39,6 @@
<field name="model">quality.point</field>
<field name="inherit_id" ref="quality.quality_point_view_form"/>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<field name="check_state" invisible="1"/>
<button name="action_check" string="审核" type="object"
attrs="{'invisible': [('check_state','=', 'enable')]}"
groups="sf_base.group_quality_director"
class="oe_highlight"/>
</xpath>
<!-- <xpath expr="//sheet//group//group//field[@name='title']" position="replace"> -->
<!-- <field name="title" class="custom_required" required="1"/> -->
<!-- </xpath> -->
@@ -67,26 +60,10 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='measure_on']" position="attributes">
<attribute name="class">custom_required</attribute>
</xpath>
<xpath expr="//field[@name='measure_frequency_type']" position="attributes">
<attribute name="class">custom_required</attribute>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="quality_alert_team_view_form_inherit_sf">
<field name="name">quality.alert.team.form.inherit.sf</field>
<field name="model">quality.alert.team</field>
<field name="inherit_id" ref="quality_control.quality_alert_team_view_form"/>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<field name="check_state" invisible="1"/>
<button name="action_check" string="审核" type="object"
attrs="{'invisible': [('check_state','=', 'enable')]}"
groups="sf_base.group_quality_director"
class="oe_highlight"/>
</xpath>
</field>
</record>
</odoo>