37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
from odoo import models, fields
|
|
|
|
|
|
class SfQualityPoint(models.Model):
|
|
_inherit = 'quality.point'
|
|
|
|
product_ids = fields.Many2many(
|
|
'product.product', string='适用产品',
|
|
domain="[('type', 'in', "
|
|
"('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'
|