# -*- coding: utf-8 -*-
# class qingjia(models.Model):
# _name = 'qingjia.qingjia'
# name = fields.Char()
# value = fields.Integer()
# value2 = fields.Float(compute="_value_pc", store=True)
# description = fields.Text()
#
# @api.depends('value')
# def _value_pc(self):
# self.value2 = float(self.value) / 100
from odoo import models, fields, api
class qingjiadan(models.Model):
WORKFLOW_STATE_SELECTION = [
('draft', '草稿'),
('confirm', '待审批'),
('complete', '已完成')
]
_name = 'qingjia.qingjiadan'
name = fields.Char(string="申请人")
days = fields.Integer(string="天数")
startdate = fields.Date(string="开始日期")
reason = fields.Text(string="请假事由")
state = fields.Selection(WORKFLOW_STATE_SELECTION,
default='draft',
string='状态',
readonly=True)
@api.multi
def do_confirm(self):
self.state = 'confirm'
return True
@api.multi
def do_complete(self):
self.state = 'complete'
return True
ensky.
- 粉丝: 29
- 资源: 46
最新资源
- CBT 3847-1999 船用扁圆形焊接钢法兰.pdf
- CBZ 27-1980 船体结构低温焊接.pdf
- CBT 3962-2005 船用焊接异径铜法兰.pdf
- CBZ 258-1989 铝合金船体氩弧焊接工艺规程.pdf
- CBZ 69-1986 铸钢艉柱手工焊接工艺.pdf
- CBZ 66-1987 铜板的焊接.pdf
- CBZ 802-2007 陶质衬垫CO2单面焊焊接工艺.pdf
- CBZ 801-2007 熔嘴电渣焊焊接工艺.pdf
- CBZ39-1987_焊接材料的验收、存放和使用.pdf
- CBZ124-1998_潜艇921A等钢结构焊接技术要求.pdf
- CBZ126-1998潜艇耐压船体可拆板切割、装配和焊接技术要求.pdf
- CECS 330-2013 钢结构焊接热处理技术规程.pdf
- CJT 32-2004 液化石油气钢瓶焊接工艺评定.pdf
- C-HRA-1镍基合金的焊接工艺性能研究.pdf
- CMT焊接在堆焊(包覆)镍基耐蚀合金层中的应用.pdf
- CNG高压储罐焊接制造质量保证.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈