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
Nikola Balog
erp5
Commits
4ee585d8
Commit
4ee585d8
authored
Apr 08, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5/Document: Fix pylint warnings.
parent
d672defe
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
792 additions
and
808 deletions
+792
-808
product/ERP5/Document/DeliveryCell.py
product/ERP5/Document/DeliveryCell.py
+170
-174
product/ERP5/Document/DeliveryLine.py
product/ERP5/Document/DeliveryLine.py
+398
-403
product/ERP5/Document/InventoryCell.py
product/ERP5/Document/InventoryCell.py
+52
-54
product/ERP5/Document/InventoryLine.py
product/ERP5/Document/InventoryLine.py
+104
-106
product/ERP5/Document/OrderCell.py
product/ERP5/Document/OrderCell.py
+47
-49
product/ERP5/Document/OrderLine.py
product/ERP5/Document/OrderLine.py
+21
-22
No files found.
product/ERP5/Document/DeliveryCell.py
View file @
4ee585d8
...
@@ -35,7 +35,6 @@ from AccessControl.PermissionRole import PermissionRole
...
@@ -35,7 +35,6 @@ from AccessControl.PermissionRole import PermissionRole
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5.Document.OrderLine
import
OrderLine
from
Products.ERP5.Document.Movement
import
Movement
from
Products.ERP5.Document.Movement
import
Movement
from
Products.ERP5.Document.MappedValue
import
MappedValue
from
Products.ERP5.Document.MappedValue
import
MappedValue
from
Products.ERP5.Document.ImmobilisationMovement
import
ImmobilisationMovement
from
Products.ERP5.Document.ImmobilisationMovement
import
ImmobilisationMovement
...
@@ -45,7 +44,6 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
...
@@ -45,7 +44,6 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
A DeliveryCell allows to define specific quantities
A DeliveryCell allows to define specific quantities
for each variation of a resource in a delivery line.
for each variation of a resource in a delivery line.
"""
"""
meta_type
=
'ERP5 Delivery Cell'
meta_type
=
'ERP5 Delivery Cell'
portal_type
=
'Delivery Cell'
portal_type
=
'Delivery Cell'
isCell
=
1
isCell
=
1
...
@@ -117,16 +115,14 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
...
@@ -117,16 +115,14 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'notifyAfterUpdateRelatedContent'
)
'notifyAfterUpdateRelatedContent'
)
def
notifyAfterUpdateRelatedContent
(
self
,
previous_category_url
,
def
notifyAfterUpdateRelatedContent
(
self
,
previous_category_url
,
new_category_url
):
new_category_url
):
"""
"""
Membership Crirerions and Category List are same in DeliveryCell
Membership Crirerions and Category List are same in DeliveryCell
Must update it (or change implementation to remove data duplication)
Must update it (or change implementation to remove data duplication)
"""
"""
update_method
=
self
.
portal_categories
.
updateRelatedCategory
update_method
=
self
.
portal_categories
.
updateRelatedCategory
predicate_value
=
self
.
getPredicateValueList
()
new_predicate_value
=
[
update_method
(
c
,
previous_category_url
,
new_category_url
)
new_predicate_value
=
map
(
lambda
c
:
update_method
(
c
,
for
c
in
self
.
getPredicateValueList
()]
previous_category_url
,
new_category_url
),
predicate_value
)
self
.
_setPredicateValueList
(
new_predicate_value
)
self
.
_setPredicateValueList
(
new_predicate_value
)
# No reindex needed since uid stable
# No reindex needed since uid stable
...
...
product/ERP5/Document/DeliveryLine.py
View file @
4ee585d8
...
@@ -48,7 +48,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
...
@@ -48,7 +48,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
It may include a price (for insurance, for customs, for invoices,
It may include a price (for insurance, for customs, for invoices,
for orders)
for orders)
"""
"""
meta_type
=
'ERP5 Delivery Line'
meta_type
=
'ERP5 Delivery Line'
portal_type
=
'Delivery Line'
portal_type
=
'Delivery Line'
...
@@ -152,7 +151,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
...
@@ -152,7 +151,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
else: return quantity
else: return quantity
if fast argument is true, inventory API will be used.
if fast argument is true, inventory API will be used.
"""
"""
if
fast
:
if
fast
:
kw
=
{}
kw
=
{}
kw
[
'section_uid'
]
=
self
.
getDestinationSectionUid
()
kw
[
'section_uid'
]
=
self
.
getDestinationSectionUid
()
...
@@ -404,8 +402,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
...
@@ -404,8 +402,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
raise
ValueError
(
'No builder found'
)
raise
ValueError
(
'No builder found'
)
self
.
edit
(
quantity
=
0
)
# adoption have to 'rebuild' delivery line
self
.
edit
(
quantity
=
0
)
# adoption have to 'rebuild' delivery line
movement_type_list
=
(
delivery_builder
.
getDeliveryLinePortalType
(),
delivery_builder
.
getDeliveryCellPortalType
())
# Collect
# Collect
root_group_node
=
delivery_builder
.
collectMovement
(
root_group_node
=
delivery_builder
.
collectMovement
(
simulation_movement_list
)
simulation_movement_list
)
...
@@ -476,7 +472,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
...
@@ -476,7 +472,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
"""
"""
simulation_tool
=
self
.
getPortalObject
().
portal_simulation
simulation_tool
=
self
.
getPortalObject
().
portal_simulation
solveMovement
=
simulation_tool
.
solveMovement
solveMovement
=
simulation_tool
.
solveMovement
solve_result_list
=
[]
# accept + split
# accept + split
for
decision
in
[
q
for
q
in
decision_list
if
q
.
decision
!=
'adopt'
]:
for
decision
in
[
q
for
q
in
decision_list
if
q
.
decision
!=
'adopt'
]:
if
decision
.
decision
==
'accept'
:
if
decision
.
decision
==
'accept'
:
...
...
product/ERP5/Document/InventoryCell.py
View file @
4ee585d8
...
@@ -34,13 +34,11 @@ from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
...
@@ -34,13 +34,11 @@ from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from
Products.ERP5.Document.DeliveryCell
import
DeliveryCell
from
Products.ERP5.Document.DeliveryCell
import
DeliveryCell
class
InventoryCell
(
DeliveryCell
):
class
InventoryCell
(
DeliveryCell
):
"""
"""
An InventoryCell allows to define specific inventory
An InventoryCell allows to define specific inventory
for each variation of a resource in an inventory line.
for each variation of a resource in an inventory line.
"""
"""
meta_type
=
'ERP5 Inventory Cell'
meta_type
=
'ERP5 Inventory Cell'
portal_type
=
'Inventory Cell'
portal_type
=
'Inventory Cell'
add_permission
=
Permissions
.
AddPortalContent
add_permission
=
Permissions
.
AddPortalContent
...
...
product/ERP5/Document/InventoryLine.py
View file @
4ee585d8
...
@@ -39,7 +39,6 @@ class InventoryLine(DeliveryLine):
...
@@ -39,7 +39,6 @@ class InventoryLine(DeliveryLine):
"""
"""
An Inventory Line describe the inventory of a resource, by variations.
An Inventory Line describe the inventory of a resource, by variations.
"""
"""
meta_type
=
'ERP5 Inventory Line'
meta_type
=
'ERP5 Inventory Line'
portal_type
=
'Inventory Line'
portal_type
=
'Inventory Line'
add_permission
=
Permissions
.
AddPortalContent
add_permission
=
Permissions
.
AddPortalContent
...
@@ -62,7 +61,6 @@ class InventoryLine(DeliveryLine):
...
@@ -62,7 +61,6 @@ class InventoryLine(DeliveryLine):
,
PropertySheet
.
ItemAggregation
,
PropertySheet
.
ItemAggregation
)
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTotalInventory'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTotalInventory'
)
def
getTotalInventory
(
self
):
def
getTotalInventory
(
self
):
"""
"""
...
...
product/ERP5/Document/OrderCell.py
View file @
4ee585d8
...
@@ -37,7 +37,6 @@ class OrderCell(DeliveryCell):
...
@@ -37,7 +37,6 @@ class OrderCell(DeliveryCell):
A OrderCell allows to define specific quantities
A OrderCell allows to define specific quantities
for each variation of a resource in a delivery line.
for each variation of a resource in a delivery line.
"""
"""
meta_type
=
'ERP5 Order Cell'
meta_type
=
'ERP5 Order Cell'
portal_type
=
'Order Cell'
portal_type
=
'Order Cell'
isCell
=
1
isCell
=
1
...
@@ -88,4 +87,3 @@ class OrderCell(DeliveryCell):
...
@@ -88,4 +87,3 @@ class OrderCell(DeliveryCell):
if
not
self
.
isMovement
():
if
not
self
.
isMovement
():
return
default
return
default
return
DeliveryCell
.
getTotalQuantity
(
self
,
default
=
default
,
*
args
,
**
kw
)
return
DeliveryCell
.
getTotalQuantity
(
self
,
default
=
default
,
*
args
,
**
kw
)
\ No newline at end of file
product/ERP5/Document/OrderLine.py
View file @
4ee585d8
...
@@ -35,7 +35,6 @@ class OrderLine(DeliveryLine):
...
@@ -35,7 +35,6 @@ class OrderLine(DeliveryLine):
"""
"""
A order line defines quantity and price
A order line defines quantity and price
"""
"""
meta_type
=
'ERP5 Order Line'
meta_type
=
'ERP5 Order Line'
portal_type
=
'Order Line'
portal_type
=
'Order Line'
...
...
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