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
f72f0f46
Commit
f72f0f46
authored
Jan 15, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 新增工艺设计复制工艺文件接口
parent
5147cc98
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
sdddl_project/controllers/__init__.py
+1
-0
sdddl_project/controllers/material.py
+26
-0
No files found.
sdddl_project/controllers/__init__.py
View file @
f72f0f46
from
.
import
roke_work_order
from
.
import
roke_dws_process_design
from
.
import
inherit_production_task
from
.
import
material
sdddl_project/controllers/material.py
0 → 100644
View file @
f72f0f46
import
logging
import
pytz
from
odoo
import
models
,
fields
,
api
,
http
,
SUPERUSER_ID
,
_
_logger
=
logging
.
getLogger
(
__name__
)
class
RokeWorkstationMaterial
(
http
.
Controller
):
@http.route
(
'/roke/workstation/guidance/bulk_copy'
,
type
=
'http'
,
auth
=
"none"
,
cors
=
'*'
,
csrf
=
False
)
def
bulk_copy_roke_workstation_guidance
(
self
):
"""
工艺设计复制工艺文件接口
"""
_self
=
http
.
request
routing_line_ids
=
_self
.
jsonrequest
.
get
(
"routing_line_ids"
,
[])
document_id
=
_self
.
jsonrequest
.
get
(
"document_id"
,
False
)
if
not
routing_line_ids
or
not
document_id
:
return
{
"code"
:
1
,
"message"
:
"入参错误!请检查入参数据。"
}
line_ids
=
_self
.
env
[
"roke.routing.line"
]
.
sudo
()
.
search
([(
"id"
,
"in"
,
routing_line_ids
)])
if
not
line_ids
:
return
{
"code"
:
1
,
"message"
:
"校验失败!没有找到对应的明细数据。"
}
line_ids
.
write
({
"document_ids"
:
[(
4
,
int
(
document_id
))]
})
return
{
"code"
:
0
,
"message"
:
"复制成功"
}
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