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
1
Merge Requests
1
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
Titouan Soulard
erp5
Commits
3eac5ebe
Commit
3eac5ebe
authored
Jan 22, 2025
by
Titouan Soulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_trade: drop useless Inventory Offset classes
parent
bbb51ff1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
354 deletions
+11
-354
bt5/erp5_trade/DocumentTemplateItem/portal_components/document.erp5.InventoryOffsetCell.py
...em/portal_components/document.erp5.InventoryOffsetCell.py
+0
-57
bt5/erp5_trade/DocumentTemplateItem/portal_components/document.erp5.InventoryOffsetCell.xml
...m/portal_components/document.erp5.InventoryOffsetCell.xml
+0
-102
bt5/erp5_trade/DocumentTemplateItem/portal_components/document.erp5.InventoryOffsetLine.py
...em/portal_components/document.erp5.InventoryOffsetLine.py
+0
-85
bt5/erp5_trade/DocumentTemplateItem/portal_components/document.erp5.InventoryOffsetLine.xml
...m/portal_components/document.erp5.InventoryOffsetLine.xml
+0
-105
bt5/erp5_trade/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+6
-0
bt5/erp5_trade/PortalTypeTemplateItem/portal_types/Inventory%20Offset%20Cell.xml
...peTemplateItem/portal_types/Inventory%20Offset%20Cell.xml
+1
-1
bt5/erp5_trade/PortalTypeTemplateItem/portal_types/Inventory%20Offset%20Line.xml
...peTemplateItem/portal_types/Inventory%20Offset%20Line.xml
+2
-2
bt5/erp5_trade/bt/template_document_id_list
bt5/erp5_trade/bt/template_document_id_list
+0
-2
bt5/erp5_trade/bt/template_portal_type_property_sheet_list
bt5/erp5_trade/bt/template_portal_type_property_sheet_list
+2
-0
No files found.
bt5/erp5_trade/DocumentTemplateItem/portal_components/document.erp5.InventoryOffsetCell.py
deleted
100644 → 0
View file @
bbb51ff1
##############################################################################
#
# Copyright (c) 2024 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability 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
# garantees and support are strongly adviced 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
erp5.component.document.DeliveryCell
import
DeliveryCell
class
InventoryOffsetCell
(
DeliveryCell
):
"""
An Inventory Offset Cell corresponds to the inventory
effective movement of a variated resource.
"""
meta_type
=
"ERP5 Inventory Offset Cell"
portal_type
=
"Inventory Offset Cell"
add_permission
=
Permissions
.
AddPortalContent
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
# Declarative properties
property_sheets
=
(
PropertySheet
.
Base
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
Amount
,
PropertySheet
.
InventoryMovement
,
PropertySheet
.
Task
,
PropertySheet
.
Movement
,
PropertySheet
.
Price
,
PropertySheet
.
Predicate
,
PropertySheet
.
MappedValue
,
PropertySheet
.
ItemAggregation
)
bt5/erp5_trade/DocumentTemplateItem/portal_components/document.erp5.InventoryOffsetCell.xml
deleted
100644 → 0
View file @
bbb51ff1
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
InventoryOffsetCell
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.InventoryOffsetCell
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/DocumentTemplateItem/portal_components/document.erp5.InventoryOffsetLine.py
deleted
100644 → 0
View file @
bbb51ff1
##############################################################################
#
# Copyright (c) 2024 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability 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
# garantees and support are strongly adviced 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
erp5.component.document.DeliveryLine
import
DeliveryLine
class
InventoryOffsetLine
(
DeliveryLine
):
"""
An Inventory Offset Line corresponds to the inventory
effective movement of a resource, by variations.
"""
meta_type
=
"ERP5 Inventory Offset Line"
portal_type
=
"Inventory Offset Line"
add_permission
=
Permissions
.
AddPortalContent
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
# Declarative properties
property_sheets
=
(
PropertySheet
.
Base
,
PropertySheet
.
XMLObject
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
Amount
,
PropertySheet
.
InventoryMovement
,
PropertySheet
.
Task
,
PropertySheet
.
Arrow
,
PropertySheet
.
Movement
,
PropertySheet
.
VariationRange
,
PropertySheet
.
ItemAggregation
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTotalQuantity'
)
def
getTotalQuantity
(
self
):
"""
Returns the quantity if no cell or the total quantity if cells
"""
if
not
self
.
hasCellContent
():
return
self
.
getQuantity
()
else
:
total_quantity
=
0.0
for
cell
in
self
.
getCellValueList
(
base_id
=
'movement'
):
if
cell
.
getQuantity
()
is
not
None
:
total_quantity
+=
cell
.
getQuantity
()
return
total_quantity
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTotalPrice'
)
def
getTotalPrice
(
self
):
"""
Returns the price if no cell or the total price if cells
"""
if
not
self
.
hasCellContent
():
return
self
.
getPrice
()
else
:
total_price
=
0.0
for
cell
in
self
.
getCellValueList
(
base_id
=
'movement'
):
if
cell
.
getPrice
()
is
not
None
:
total_price
+=
cell
.
getPrice
()
return
total_price
bt5/erp5_trade/DocumentTemplateItem/portal_components/document.erp5.InventoryOffsetLine.xml
deleted
100644 → 0
View file @
bbb51ff1
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
InventoryOffsetLine
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.InventoryOffsetLine
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 60, 2: Arguments number differs from overridden \'getTotalQuantity\' method (arguments-differ)
</string>
<string>
W: 74, 2: Arguments number differs from overridden \'getTotalPrice\' method (arguments-differ)
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
3eac5ebe
...
...
@@ -12,6 +12,12 @@
<portal_type
id=
"Internal Packing List"
>
<item>
DeliveryCausalityStateConstraint
</item>
</portal_type>
<portal_type
id=
"Inventory Offset Cell"
>
<item>
InventoryMovement
</item>
</portal_type>
<portal_type
id=
"Inventory Offset Line"
>
<item>
InventoryMovement
</item>
</portal_type>
<portal_type
id=
"Inventory Report"
>
<item>
Arrow
</item>
<item>
InventoryReport
</item>
...
...
bt5/erp5_trade/PortalTypeTemplateItem/portal_types/Inventory%20Offset%20Cell.xml
View file @
3eac5ebe
...
...
@@ -53,7 +53,7 @@
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
InventoryOffset
Cell
</string>
</value>
<value>
<string>
Delivery
Cell
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
...
...
bt5/erp5_trade/PortalTypeTemplateItem/portal_types/Inventory%20Offset%20Line.xml
View file @
3eac5ebe
...
...
@@ -35,7 +35,7 @@
</item>
<item>
<key>
<string>
init_script
</string>
</key>
<value>
<string>
Order
Line_init
</string>
</value>
<value>
<string>
Delivery
Line_init
</string>
</value>
</item>
<item>
<key>
<string>
permission
</string>
</key>
...
...
@@ -61,7 +61,7 @@
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
InventoryOffset
Line
</string>
</value>
<value>
<string>
Delivery
Line
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
...
...
bt5/erp5_trade/bt/template_document_id_list
View file @
3eac5ebe
...
...
@@ -5,8 +5,6 @@ document.erp5.ContainerLine
document.erp5.DeliveryRootSimulationRule
document.erp5.DeliverySimulationRule
document.erp5.DuplicateInventoryConstraint
document.erp5.InventoryOffsetCell
document.erp5.InventoryOffsetLine
document.erp5.OrderCell
document.erp5.OrderLine
document.erp5.OrderRootSimulationRule
...
...
bt5/erp5_trade/bt/template_portal_type_property_sheet_list
View file @
3eac5ebe
...
...
@@ -3,6 +3,8 @@ Business Process | Version
Delivery Node | DeliveryNode
Duplicate Inventory Constraint | ConstraintType
Internal Packing List | DeliveryCausalityStateConstraint
Inventory Offset Cell | InventoryMovement
Inventory Offset Line | InventoryMovement
Inventory Report | Arrow
Inventory Report | InventoryReport
Purchase Packing List | DeliveryCausalityStateConstraint
...
...
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