Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ekaterina
erp5
Commits
4694e125
Commit
4694e125
authored
Jan 04, 2018
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mrp: show production planning also on ressources
parent
577da5f3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
256 additions
and
3 deletions
+256
-3
bt5/erp5_mrp/ActionTemplateItem/portal_types/Component/resource_view_manufacturing_gantt.xml
...tal_types/Component/resource_view_manufacturing_gantt.xml
+81
-0
bt5/erp5_mrp/ActionTemplateItem/portal_types/Product/resource_view_manufacturing_gantt.xml
...ortal_types/Product/resource_view_manufacturing_gantt.xml
+81
-0
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ManufacturingOrderModule_getGanttConfigurationDict.py
...mrp/ManufacturingOrderModule_getGanttConfigurationDict.py
+15
-0
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ManufacturingOrderModule_getGanttConfigurationDict.xml
...rp/ManufacturingOrderModule_getGanttConfigurationDict.xml
+62
-0
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ManufacturingOrderModule_viewGantt/manufacturing_gantt.xml
...anufacturingOrderModule_viewGantt/manufacturing_gantt.xml
+1
-1
bt5/erp5_mrp/bt/template_action_path_list
bt5/erp5_mrp/bt/template_action_path_list
+2
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_manufacturing_gantt_js.js
...web_page_module/gadget_officejs_manufacturing_gantt_js.js
+14
-2
No files found.
bt5/erp5_mrp/ActionTemplateItem/portal_types/Component/resource_view_manufacturing_gantt.xml
0 → 100644
View file @
4694e125
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_action
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
resource_view_manufacturing_gantt
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
2.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Manufacturing Gantt
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/ManufacturingOrderModule_viewGantt
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_mrp/ActionTemplateItem/portal_types/Product/resource_view_manufacturing_gantt.xml
0 → 100644
View file @
4694e125
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_action
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
resource_view_manufacturing_gantt
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
2.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Manufacturing Gantt
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/ManufacturingOrderModule_viewGantt
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ManufacturingOrderModule_getGanttConfigurationDict.py
0 → 100644
View file @
4694e125
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
NegatedQuery
configuration_dict
=
{
'portal_type'
:
[
"Manufacturing Order"
,
"Manufacturing Execution"
]}
portal
=
context
.
getPortalObject
()
if
context
.
getPortalType
()
in
portal
.
getPortalResourceTypeList
():
# only show production related to current resource
delivery_uid_set
=
set
()
for
line
in
portal
.
portal_catalog
(
portal_type
=
"Manufacturing Execution Line"
,
query
=
NegatedQuery
(
Query
(
simulation_state
=
[
"draft"
,
"cancelled"
,
"delivered"
])),
default_resource_uid
=
context
.
getUid
(),
select_dict
=
{
"parent_uid"
:
None
}):
delivery_uid_set
.
add
(
line
.
parent_uid
)
# to make sure to filter even if nothing match
delivery_uid_set
.
add
(
0
)
configuration_dict
[
"delivery_uid_list"
]
=
[
x
for
x
in
delivery_uid_set
]
return
configuration_dict
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ManufacturingOrderModule_getGanttConfigurationDict.xml
0 → 100644
View file @
4694e125
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ManufacturingOrderModule_getGanttConfigurationDict
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ManufacturingOrderModule_viewGantt/manufacturing_gantt.xml
View file @
4694e125
...
...
@@ -115,7 +115,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:
{\'portal_type\': ["Manufacturing Order", "Manufacturing Execution"],}
</string>
</value>
<value>
<string>
python:
here.ManufacturingOrderModule_getGanttConfigurationDict()
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_mrp/bt/template_action_path_list
View file @
4694e125
Component | resource_view_manufacturing_gantt
Manufacturing Execution Cell | view
Manufacturing Execution Line | option_view
Manufacturing Execution Line | quantity_view
...
...
@@ -22,6 +23,7 @@ Manufacturing Order | production_order_operation_consumption
Manufacturing Order | profile_view
Manufacturing Order | view
Manufacturing Order | view_stock
Product | resource_view_manufacturing_gantt
Production Order Cell | view
Production Order Line | jump_to_transformation
Production Order Line | price_view
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_manufacturing_gantt_js.js
View file @
4694e125
...
...
@@ -57,10 +57,14 @@
.
push
(
function
(
gantt_widget
)
{
// First search all production report not finished to find out the
// list of production orders still having work on them
var
query
;
var
query
,
delivery_uid_list
;
gadget
.
property_dict
.
gantt_widget
=
gantt_widget
;
console
.
log
(
"
gantt_widget
"
,
gantt_widget
);
query
=
'
portal_type:="Manufacturing Execution" AND NOT simulation_state: ("draft", "cancelled", "delivered")
'
;
delivery_uid_list
=
option_dict
.
delivery_uid_list
;
if
((
delivery_uid_list
!==
undefined
)
&&
(
delivery_uid_list
.
length
>
0
))
{
query
=
query
+
'
AND uid: (
'
+
delivery_uid_list
.
join
(
'
,
'
)
+
'
)
'
;
}
return
gadget
.
jio_allDocs
({
query
:
query
,
limit
:
10000
,
...
...
@@ -69,8 +73,11 @@
});
})
.
push
(
function
(
delivery_list
)
{
// try to search for other manufacturing execution having same causality as
// other manufacturing execution already found
var
causality_uid_list
=
[
0
],
// Initiliaze with 0 to make sure to have at least one uid to search for
i
,
delivery
,
query
,
empty_causality_delivery_list
=
[];
i
,
delivery
,
query
,
empty_causality_delivery_list
=
[],
delivery_uid_list
;
delivery_list
=
delivery_list
.
data
.
rows
;
for
(
i
=
0
;
i
<
delivery_list
.
length
;
i
=
i
+
1
)
{
...
...
@@ -86,6 +93,11 @@
query
=
'
portal_type:="Manufacturing Execution" AND causality_uid: (
'
+
causality_uid_list
.
join
(
'
,
'
)
+
'
) AND NOT simulation_state: ("draft", "cancelled")
'
;
console
.
log
(
"
QUERY
"
,
query
);
gadget
.
property_dict
.
empty_causality_delivery_list
=
empty_causality_delivery_list
;
delivery_uid_list
=
option_dict
.
delivery_uid_list
;
// No need to get more
if
((
delivery_uid_list
!==
undefined
)
&&
(
delivery_uid_list
.
length
>
0
))
{
query
=
query
+
'
AND uid: (
'
+
delivery_uid_list
.
join
(
'
,
'
)
+
'
)
'
;
}
return
gadget
.
jio_allDocs
({
query
:
query
,
limit
:
10000
,
...
...
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