Skip to content

Commit

Permalink
[4121][FIX] stock_picking_validate_jobcan: show_jobcan_wf_number (#93)
Browse files Browse the repository at this point in the history
Before this commit, visibility of jobcan_wf_number field would depend on
allocation of stock (the field would get hidden when owner stock was allocated),
which was incorrect.
  • Loading branch information
yostashiro authored Sep 6, 2024
1 parent 71b4b93 commit eac994e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion stock_picking_validate_jobcan_wf/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ def _compute_show_skip_jobcan_wf(self):
def _compute_show_jobcan_wf_number(self):
for pick in self:
pick.show_jobcan_wf_number = False
if pick.show_skip_jobcan_wf and not pick.skip_jobcan_wf:
if (
pick._is_outgoing()
and not pick._receipt_return_picking()
and not pick.skip_jobcan_wf
):
pick.show_jobcan_wf_number = True

def get_api_key(self, config):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down

0 comments on commit eac994e

Please sign in to comment.