Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
3e5c45a5
Commit
3e5c45a5
authored
May 23, 2025
by
guibin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加车间工作时间配置
parent
73acc600
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
6 deletions
+99
-6
tht_project/__manifest__.py
+4
-2
tht_project/models/__init__.py
+3
-2
tht_project/models/plant_working_time_config.py
+19
-0
tht_project/security/ir.model.access.csv
+2
-2
tht_project/views/menus.xml
+12
-0
tht_project/views/plant_working_time_config.xml
+59
-0
No files found.
tht_project/__manifest__.py
View file @
3e5c45a5
# -*- coding: utf-8 -*-
{
'name'
:
"
tht_project
"
,
'name'
:
"
融科-天合堂
"
,
'summary'
:
"""
Short (1 phrase/line) summary of the module's purpose, used as
...
...
@@ -20,13 +20,15 @@
'version'
:
'0.1'
,
# any module necessary for this one to work correctly
'depends'
:
[
'
base
'
],
'depends'
:
[
'
roke_mes_three_colour_light
'
],
# always loaded
'data'
:
[
# 'security/ir.model.access.csv',
'views/views.xml'
,
'views/templates.xml'
,
'views/plant_working_time_config.xml'
,
'views/menus.xml'
,
],
# only loaded in demonstration mode
'demo'
:
[
...
...
tht_project/models/__init__.py
View file @
3e5c45a5
# -*- coding: utf-8 -*-
from
.
import
models
\ No newline at end of file
from
.
import
models
from
.
import
plant_working_time_config
\ No newline at end of file
tht_project/models/plant_working_time_config.py
0 → 100644
View file @
3e5c45a5
from
odoo
import
api
,
fields
,
models
class
PlantWorkingTimeConfig
(
models
.
Model
):
_name
=
"plant.working.time.config"
_description
=
"车间工作时间配置"
plant_id
=
fields
.
Many2one
(
"roke.plant"
,
string
=
"车间"
)
start_time
=
fields
.
Float
(
string
=
"开始时间"
,
default
=
"0"
)
end_time
=
fields
.
Float
(
string
=
"结束时间"
,
default
=
"0"
)
color
=
fields
.
Selection
([
(
'red'
,
'红'
),
(
'yellow'
,
'黄'
),
(
'green'
,
'绿'
),
(
'blue'
,
'蓝'
),
(
'gray'
,
'灰'
)
],
string
=
"颜色"
)
wait_time
=
fields
.
Float
(
string
=
"等待时间"
)
\ No newline at end of file
tht_project/security/ir.model.access.csv
View file @
3e5c45a5
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_tht_project_tht_project,tht_project.tht_project,model_tht_project_tht_project,base.group_user,1,1,1,1
\ No newline at end of file
access_plant_working_time_config_group_user,plant_working_time_config group_user,model_plant_working_time_config,base.group_user,1,1,1,1
\ No newline at end of file
tht_project/views/menus.xml
0 → 100644
View file @
3e5c45a5
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem
id=
"menu_plant_working_time_config"
name=
"车间工作时间配置"
action=
"tht_project.action_plant_working_time_config"
parent=
"roke_mes_three_colour_light.roke_three_color_light_iframe_device_monitor_menu"
sequence=
"40"
groups=
"base.group_system"
/>
</odoo>
\ No newline at end of file
tht_project/views/plant_working_time_config.xml
0 → 100644
View file @
3e5c45a5
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record
id=
"view_plant_working_time_config_tree"
model=
"ir.ui.view"
>
<field
name=
"name"
>
view_plant_working_time_config_tree
</field>
<field
name=
"model"
>
plant.working.time.config
</field>
<field
name=
"arch"
type=
"xml"
>
<tree>
<field
name=
"plant_id"
/>
<field
name=
"start_time"
widget=
"float_time"
/>
<field
name=
"end_time"
widget=
"float_time"
/>
</tree>
</field>
</record>
<record
id=
"view_plant_working_time_config_form"
model=
"ir.ui.view"
>
<field
name=
"name"
>
view_plant_working_time_config_form
</field>
<field
name=
"model"
>
plant.working.time.config
</field>
<field
name=
"arch"
type=
"xml"
>
<form>
<group
col=
"3"
>
<group>
<field
name=
"plant_id"
/>
</group>
<group>
<field
name=
"start_time"
widget=
"float_time"
/>
</group>
<group>
<field
name=
"end_time"
widget=
"float_time"
/>
</group>
</group>
<notebook>
<page
string=
"停机规则设置"
>
<div
class=
"mb16"
style=
"display: flex; flex-direction: row; align-items: center;"
>
<div
class=
"ml16"
style=
"width: 150px"
>
<field
name=
"color"
/>
</div>
<span
class=
"ml16"
>
色下连续超过
</span>
<div
class=
"ml16"
style=
"width: 150px"
>
<field
name=
"wait_time"
/>
</div>
<span
class=
"ml16"
>
分钟,页面展示停机状态。
</span>
</div>
</page>
</notebook>
</form>
</field>
</record>
<record
id=
"action_plant_working_time_config"
model=
"ir.actions.act_window"
>
<field
name=
"name"
>
车间工作时间配置
</field>
<field
name=
"res_model"
>
plant.working.time.config
</field>
<field
name=
"view_mode"
>
tree,form
</field>
<field
name=
"type"
>
ir.actions.act_window
</field>
<field
name=
"domain"
>
[]
</field>
<field
name=
"context"
>
{}
</field>
</record>
</odoo>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment