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
910b7ac4
Commit
910b7ac4
authored
Nov 29, 2024
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改问题
parent
b06b9625
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletions
+9
-1
jzjx_project/controllers/inherit_production.py
+1
-1
jzjx_project/models/inherit_production_task.py
+7
-0
jzjx_project/views/inherit_roke_production_task.xml
+1
-0
No files found.
jzjx_project/controllers/inherit_production.py
View file @
910b7ac4
...
@@ -116,7 +116,7 @@ class JzjxRokeRefixAutoWorkOrder(http.Controller):
...
@@ -116,7 +116,7 @@ class JzjxRokeRefixAutoWorkOrder(http.Controller):
v
.
generate_access_token
()
v
.
generate_access_token
()
url
=
f
"/web/image/{v.id}?access_token={v.access_token}&unique={str(fields.Datetime.now().timestamp())}"
url
=
f
"/web/image/{v.id}?access_token={v.access_token}&unique={str(fields.Datetime.now().timestamp())}"
data_list
.
append
(
url
)
data_list
.
append
(
url
)
return
{
"code"
:
0
,
"message"
:
"获取成功!"
,
"data"
:
data_list
}
return
{
"code"
:
0
,
"message"
:
"获取成功!"
,
"data"
:
data_list
,
"note"
:
record_id
.
note
or
""
}
@http.route
(
'/roke/mes/work_time/get'
,
type
=
'json'
,
auth
=
"user"
,
csrf
=
False
,
cors
=
'*'
)
@http.route
(
'/roke/mes/work_time/get'
,
type
=
'json'
,
auth
=
"user"
,
csrf
=
False
,
cors
=
'*'
)
def
get_work_time
(
self
):
def
get_work_time
(
self
):
...
...
jzjx_project/models/inherit_production_task.py
View file @
910b7ac4
...
@@ -20,6 +20,13 @@ class InheritProductionTask(models.Model):
...
@@ -20,6 +20,13 @@ class InheritProductionTask(models.Model):
press_riveting_qty
=
fields
.
Float
(
string
=
"压铆零部件数"
,
default
=
0
)
press_riveting_qty
=
fields
.
Float
(
string
=
"压铆零部件数"
,
default
=
0
)
bending_qty
=
fields
.
Float
(
string
=
"折弯零部件数"
,
default
=
0
)
bending_qty
=
fields
.
Float
(
string
=
"折弯零部件数"
,
default
=
0
)
work_order_hours
=
fields
.
Float
(
string
=
"总报工时"
,
compute
=
"_compute_work_order_hours"
)
@api.depends
(
'work_order_ids'
)
def
_compute_work_order_hours
(
self
):
for
record
in
self
:
record
.
work_order_hours
=
sum
(
record
.
work_order_ids
.
mapped
(
"work_hours"
))
def
upload_task
(
self
):
def
upload_task
(
self
):
"""
"""
上传任务 TODO 任务数量取计划数还是计划数-完成数?上传一次后还能再上传不?多个加工文件时,上传第一个还是最后一个?
上传任务 TODO 任务数量取计划数还是计划数-完成数?上传一次后还能再上传不?多个加工文件时,上传第一个还是最后一个?
...
...
jzjx_project/views/inherit_roke_production_task.xml
View file @
910b7ac4
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
</xpath>
</xpath>
<xpath
expr=
"//field[@name='pass_rate']"
position=
"after"
>
<xpath
expr=
"//field[@name='pass_rate']"
position=
"after"
>
<field
name=
"UploadMsg"
readonly=
"1"
/>
<field
name=
"UploadMsg"
readonly=
"1"
/>
<field
name=
"work_order_hours"
readonly=
"1"
/>
</xpath>
</xpath>
<xpath
expr=
"//field[@name='type']"
position=
"after"
>
<xpath
expr=
"//field[@name='type']"
position=
"after"
>
<field
name=
"spare_parts_qty"
/>
<field
name=
"spare_parts_qty"
/>
...
...
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