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
4403fcef
Commit
4403fcef
authored
Apr 12, 2025
by
赵言乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改推送逻辑
parent
2dde4842
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
sdddl_project/wizard/inherit_result_put_warehose_wizard.py
+19
-4
No files found.
sdddl_project/wizard/inherit_result_put_warehose_wizard.py
View file @
4403fcef
...
@@ -12,10 +12,17 @@ _logger = logging.getLogger(__name__)
...
@@ -12,10 +12,17 @@ _logger = logging.getLogger(__name__)
class
InheritRokeResultPutWarehouseWizard
(
models
.
TransientModel
):
class
InheritRokeResultPutWarehouseWizard
(
models
.
TransientModel
):
_inherit
=
"roke.result.put.warehouse.wizard"
_inherit
=
"roke.result.put.warehouse.wizard"
@api.model
def
confirm
(
self
):
def
default_get
(
self
,
field_names
):
"""确认入库"""
move_list
=
[]
for
line
in
self
.
line_ids
:
line_val
=
self
.
_get_move_line_val
(
line
)
move_list
.
append
(
line_val
)
self
.
env
[
"roke.production.result.move"
]
.
create
(
move_list
)
# 推送
if
self
.
_context
.
get
(
'active_model'
)
!=
"roke.production.result"
:
if
self
.
_context
.
get
(
'active_model'
)
!=
"roke.production.result"
:
return
super
(
InheritRokeResultPutWarehouseWizard
,
self
)
.
default_get
(
field_names
)
return
super
(
InheritRokeResultPutWarehouseWizard
,
self
)
.
confirm
(
)
_logger
.
info
(
f
"数据: self._context.get('active_ids'): {self._context.get('active_ids')}"
)
_logger
.
info
(
f
"数据: self._context.get('active_ids'): {self._context.get('active_ids')}"
)
results
=
self
.
env
[
'roke.production.result'
]
.
browse
(
self
.
_context
.
get
(
'active_ids'
))
results
=
self
.
env
[
'roke.production.result'
]
.
browse
(
self
.
_context
.
get
(
'active_ids'
))
new_results
=
[]
new_results
=
[]
...
@@ -92,4 +99,12 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
...
@@ -92,4 +99,12 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
finally
:
finally
:
cur
.
close
()
cur
.
close
()
conn
.
close
()
conn
.
close
()
return
super
(
InheritRokeResultPutWarehouseWizard
,
self
)
.
default_get
(
field_names
)
return
super
(
InheritRokeResultPutWarehouseWizard
,
self
)
.
confirm
()
def
_get_move_line_val
(
self
,
line
):
return
{
"warehouse_id"
:
self
.
warehouse_id
.
id
,
"result_id"
:
line
.
result_id
.
id
,
"product_state_id"
:
line
.
product_state_id
.
id
,
"qty"
:
line
.
stock_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