acc_project.py
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8 -*-
import logging
from odoo import api, SUPERUSER_ID, fields, models, _
from odoo.http import request
import logging
import xlrd
from collections import Counter
import re
import datetime
import pytz
from odoo.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
# from datetime import datetime
# from ..controllers.common import localizeStrTime
from odoo.exceptions import UserError, ValidationError
_logger = logging.getLogger(__name__)
class AccProjectTask(models.Model):
"""
库存移动继承
"""
_inherit = "project.task"
task_start = fields.Date(string=u'开始日期')
class AccProjectProject(models.Model):
"""
库存移动继承
"""
_inherit = "project.project"
project_code = fields.Char(string=u'项目号')
equipment = fields.Char(string=u'需求设备名称&数量')
delivery_time = fields.Date(string='交货期')
priority_level = fields.Selection([('commonly', '一般'), ('urgent', '紧急')], '优先级', default='commonly')
machine_design = fields.Char(string='机械设计人员')
electrical_design = fields.Char(string='电气设计人员')
software_design = fields.Char(string='软件设计人员')
# design_sdate = fields.Date(string='设计开始日期')
# design_edate = fields.Date(string='设计结束日期')
# purchase_sdate = fields.Date(string='采购开始日期')
# purchase_edate = fields.Date(string='采购结束日期')
design_date = fields.Char(string='设计起止日期')
purchase_date = fields.Char(string='采购起止日期')
assembling_date = fields.Char(string='装配起止日期')
send_date = fields.Date(string='发货日期')
debugging_date = fields.Char(string='调试起止日期')
note = fields.Char(string='备注')