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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
7733f1cf
Commit
7733f1cf
authored
Jan 14, 2015
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simulation/builders: add PreviousCausalityMovementGroup
parent
56f1bcd1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
222 additions
and
0 deletions
+222
-0
bt5/erp5_base/ActionTemplateItem/portal_types/Previous%20Causality%20Movement%20Group/view.xml
...al_types/Previous%20Causality%20Movement%20Group/view.xml
+79
-0
bt5/erp5_base/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+1
-0
bt5/erp5_base/PortalTypeTemplateItem/portal_types/Previous%20Causality%20Movement%20Group.xml
.../portal_types/Previous%20Causality%20Movement%20Group.xml
+82
-0
bt5/erp5_base/bt/template_action_path_list
bt5/erp5_base/bt/template_action_path_list
+1
-0
bt5/erp5_base/bt/template_portal_type_allowed_content_type_list
...p5_base/bt/template_portal_type_allowed_content_type_list
+1
-0
bt5/erp5_base/bt/template_portal_type_id_list
bt5/erp5_base/bt/template_portal_type_id_list
+1
-0
product/ERP5/Document/PreviousCausalityMovementGroup.py
product/ERP5/Document/PreviousCausalityMovementGroup.py
+57
-0
No files found.
bt5/erp5_base/ActionTemplateItem/portal_types/Previous%20Causality%20Movement%20Group/view.xml
0 → 100644
View file @
7733f1cf
<?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_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view
</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>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
View
</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}/MovementGroup_view
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_base/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
7733f1cf
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
<item>
Parent Delivery Property Movement Group
</item>
<item>
Parent Delivery Property Movement Group
</item>
<item>
Parent Explanation Movement Group
</item>
<item>
Parent Explanation Movement Group
</item>
<item>
Predicate
</item>
<item>
Predicate
</item>
<item>
Previous Causality Movement Group
</item>
<item>
Property Assignment Movement Group
</item>
<item>
Property Assignment Movement Group
</item>
<item>
Property Grouping Movement Group
</item>
<item>
Property Grouping Movement Group
</item>
<item>
Property Movement Group
</item>
<item>
Property Movement Group
</item>
...
...
bt5/erp5_base/PortalTypeTemplateItem/portal_types/Previous%20Causality%20Movement%20Group.xml
0 → 100644
View file @
7733f1cf
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Base Type"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
acquire_local_roles
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
content_icon
</string>
</key>
<value>
<string>
document_icon.gif
</string>
</value>
</item>
<item>
<key>
<string>
content_meta_type
</string>
</key>
<value>
<string>
ERP5 Causality Movement Group
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The purpose of MovementGroup is to define how movements are grouped,\n
and how values are updated from simulation movements.\n
</string>
</value>
</item>
<item>
<key>
<string>
factory
</string>
</key>
<value>
<string>
addCausalityMovementGroup
</string>
</value>
</item>
<item>
<key>
<string>
filter_content_types
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<tuple>
<string>
movement_group
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Previous Causality Movement Group
</string>
</value>
</item>
<item>
<key>
<string>
init_script
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
permission
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
PreviousCausalityMovementGroup
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
type_mixin
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_base/bt/template_action_path_list
View file @
7733f1cf
...
@@ -77,6 +77,7 @@ Person | person_detailed_report
...
@@ -77,6 +77,7 @@ Person | person_detailed_report
Person | terminate_career
Person | terminate_career
Person | view
Person | view
Preference | base_preference
Preference | base_preference
Previous Causality Movement Group | view
Property Assignment Movement Group | view
Property Assignment Movement Group | view
Property Grouping Movement Group | view
Property Grouping Movement Group | view
Property Movement Group | view
Property Movement Group | view
...
...
bt5/erp5_base/bt/template_portal_type_allowed_content_type_list
View file @
7733f1cf
...
@@ -18,6 +18,7 @@ Delivery Builder | Parent Delivery Category Movement Group
...
@@ -18,6 +18,7 @@ Delivery Builder | Parent Delivery Category Movement Group
Delivery Builder | Parent Delivery Property Movement Group
Delivery Builder | Parent Delivery Property Movement Group
Delivery Builder | Parent Explanation Movement Group
Delivery Builder | Parent Explanation Movement Group
Delivery Builder | Predicate
Delivery Builder | Predicate
Delivery Builder | Previous Causality Movement Group
Delivery Builder | Property Assignment Movement Group
Delivery Builder | Property Assignment Movement Group
Delivery Builder | Property Grouping Movement Group
Delivery Builder | Property Grouping Movement Group
Delivery Builder | Property Movement Group
Delivery Builder | Property Movement Group
...
...
bt5/erp5_base/bt/template_portal_type_id_list
View file @
7733f1cf
...
@@ -43,6 +43,7 @@ Parent Delivery Property Movement Group
...
@@ -43,6 +43,7 @@ Parent Delivery Property Movement Group
Parent Explanation Movement Group
Parent Explanation Movement Group
Person
Person
Person Module
Person Module
Previous Causality Movement Group
Property Assignment Movement Group
Property Assignment Movement Group
Property Grouping Movement Group
Property Grouping Movement Group
Property Movement Group
Property Movement Group
...
...
product/ERP5/Document/PreviousCausalityMovementGroup.py
0 → 100644
View file @
7733f1cf
##############################################################################
#
# Copyright (c) 2015 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from
Products.ERP5.Document.FirstCausalityMovementGroup
import
\
FirstCausalityMovementGroup
from
zLOG
import
LOG
class
PreviousCausalityMovementGroup
(
FirstCausalityMovementGroup
):
"""
Group by previous causality. For movements going to Sale Invoices,
the previous causality is SPL
"""
meta_type
=
'ERP5 Previous Causality Movement Group'
portal_type
=
'Previous Causality Movement Group'
causality_portal_type
=
'Sale Packing List'
def
test
(
self
,
movement
,
property_dict
,
**
kw
):
"""Compare explanation to now if it is possible to update delivery"""
explanation
=
property_dict
.
get
(
'_explanation'
,
''
)
if
movement
==
movement
.
getDeliveryValue
():
# We are at delivery level, check if the explanation is part of the causality
delivery
=
movement
if
explanation
in
delivery
.
getCausalityList
():
return
True
,
{}
else
:
return
False
,
{}
raise
NotImplementedError
(
"What should we do ?"
)
def
_getPropertyDict
(
self
,
movement
,
**
kw
):
property_dict
=
super
(
PreviousCausalityMovementGroup
,
self
).
\
_getPropertyDict
(
movement
,
**
kw
)
return
property_dict
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