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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
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
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.MappedValue
import
MappedValue
from
Products.ERP5.Document.ImmobilisationMovement
import
ImmobilisationMovement
...
...
@@ -45,7 +44,6 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
A DeliveryCell allows to define specific quantities
for each variation of a resource in a delivery line.
"""
meta_type
=
'ERP5 Delivery Cell'
portal_type
=
'Delivery Cell'
isCell
=
1
...
...
@@ -117,16 +115,14 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'notifyAfterUpdateRelatedContent'
)
def
notifyAfterUpdateRelatedContent
(
self
,
previous_category_url
,
new_category_url
):
def
notifyAfterUpdateRelatedContent
(
self
,
previous_category_url
,
new_category_url
):
"""
Membership Crirerions and Category List are same in DeliveryCell
Must update it (or change implementation to remove data duplication)
"""
update_method
=
self
.
portal_categories
.
updateRelatedCategory
predicate_value
=
self
.
getPredicateValueList
()
new_predicate_value
=
map
(
lambda
c
:
update_method
(
c
,
previous_category_url
,
new_category_url
),
predicate_value
)
new_predicate_value
=
[
update_method
(
c
,
previous_category_url
,
new_category_url
)
for
c
in
self
.
getPredicateValueList
()]
self
.
_setPredicateValueList
(
new_predicate_value
)
# No reindex needed since uid stable
...
...
product/ERP5/Document/DeliveryLine.py
View file @
4ee585d8
...
...
@@ -48,7 +48,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
It may include a price (for insurance, for customs, for invoices,
for orders)
"""
meta_type
=
'ERP5 Delivery Line'
portal_type
=
'Delivery Line'
...
...
@@ -152,7 +151,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
else: return quantity
if fast argument is true, inventory API will be used.
"""
if
fast
:
kw
=
{}
kw
[
'section_uid'
]
=
self
.
getDestinationSectionUid
()
...
...
@@ -404,8 +402,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
raise
ValueError
(
'No builder found'
)
self
.
edit
(
quantity
=
0
)
# adoption have to 'rebuild' delivery line
movement_type_list
=
(
delivery_builder
.
getDeliveryLinePortalType
(),
delivery_builder
.
getDeliveryCellPortalType
())
# Collect
root_group_node
=
delivery_builder
.
collectMovement
(
simulation_movement_list
)
...
...
@@ -476,7 +472,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
"""
simulation_tool
=
self
.
getPortalObject
().
portal_simulation
solveMovement
=
simulation_tool
.
solveMovement
solve_result_list
=
[]
# accept + split
for
decision
in
[
q
for
q
in
decision_list
if
q
.
decision
!=
'adopt'
]:
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
from
Products.ERP5.Document.DeliveryCell
import
DeliveryCell
class
InventoryCell
(
DeliveryCell
):
"""
An InventoryCell allows to define specific inventory
for each variation of a resource in an inventory line.
"""
meta_type
=
'ERP5 Inventory Cell'
portal_type
=
'Inventory Cell'
add_permission
=
Permissions
.
AddPortalContent
...
...
product/ERP5/Document/InventoryLine.py
View file @
4ee585d8
...
...
@@ -39,7 +39,6 @@ class InventoryLine(DeliveryLine):
"""
An Inventory Line describe the inventory of a resource, by variations.
"""
meta_type
=
'ERP5 Inventory Line'
portal_type
=
'Inventory Line'
add_permission
=
Permissions
.
AddPortalContent
...
...
@@ -62,7 +61,6 @@ class InventoryLine(DeliveryLine):
,
PropertySheet
.
ItemAggregation
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getTotalInventory'
)
def
getTotalInventory
(
self
):
"""
...
...
product/ERP5/Document/OrderCell.py
View file @
4ee585d8
...
...
@@ -37,7 +37,6 @@ class OrderCell(DeliveryCell):
A OrderCell allows to define specific quantities
for each variation of a resource in a delivery line.
"""
meta_type
=
'ERP5 Order Cell'
portal_type
=
'Order Cell'
isCell
=
1
...
...
@@ -88,4 +87,3 @@ class OrderCell(DeliveryCell):
if
not
self
.
isMovement
():
return
default
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):
"""
A order line defines quantity and price
"""
meta_type
=
'ERP5 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