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
Paul Graydon
erp5
Commits
2f143d52
Commit
2f143d52
authored
Mar 16, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
invoicing: fix pylint messages and enable coding style test
parent
680fdcf9
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
17 deletions
+13
-17
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_asCellRange.py
...em/portal_skins/erp5_invoicing/InvoiceLine_asCellRange.py
+3
-3
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGeneration.py
...skins/erp5_invoicing/InvoiceTransaction_postGeneration.py
+0
-1
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_selectDelivery.py
...skins/erp5_invoicing/InvoiceTransaction_selectDelivery.py
+1
-1
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_createCreditNoteInvoice.py
...l_skins/erp5_invoicing/Invoice_createCreditNoteInvoice.py
+1
-7
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_getODTDataDict.py
...tem/portal_skins/erp5_invoicing/Invoice_getODTDataDict.py
+2
-2
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_isAdvanced.py
...ateItem/portal_skins/erp5_invoicing/Invoice_isAdvanced.py
+4
-2
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_printAsODT.py
...ateItem/portal_skins/erp5_invoicing/Invoice_printAsODT.py
+2
-0
bt5/erp5_invoicing/bt/skip_coding_style_test
bt5/erp5_invoicing/bt/skip_coding_style_test
+0
-1
No files found.
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceLine_asCellRange.py
View file @
2f143d52
...
...
@@ -4,12 +4,12 @@ if resource is not None:
base_category_list
=
resource
.
getVariationBaseCategoryList
(
omit_optional_variation
=
1
)
for
base_category
in
base_category_list
:
if
matrixbox
==
1
:
if
matrixbox
:
# XXX matrixbox is right_display (not as listfield) => invert display and value in item
cell_range
.
append
(
map
(
lambda
x
:
(
x
[
1
],
x
[
0
]),
context
.
getVariationCategoryItemList
(
base_category_list
=
(
base_category
,)
)
)
)
cell_range
.
append
(
[(
x
[
1
],
x
[
0
])
for
x
in
context
.
getVariationCategoryItemList
(
base_category_list
=
(
base_category
,))]
)
else
:
cell_range
.
append
(
context
.
getVariationCategoryList
(
base_category_list
=
(
base_category
,)
)
)
cell_range
=
filter
(
lambda
x
:
x
!=
[],
cell_range
)
cell_range
=
[
x
for
x
in
cell_range
if
x
!=
[]]
return
cell_range
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGeneration.py
View file @
2f143d52
"""This script is called on the Invoice after the delivery builder has created
the new Invoice.
"""
from
Products.ERP5Type.Message
import
translateString
if
related_simulation_movement_path_list
is
None
:
raise
RuntimeError
,
'related_simulation_movement_path_list is missing. Update ERP5 Product.'
...
...
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_selectDelivery.py
View file @
2f143d52
...
...
@@ -24,4 +24,4 @@ for movement in movement_list:
if
line
is
not
None
:
deliveries_keys
[
line
.
getExplanationValue
()]
=
1
return
filter
(
lambda
x
:
x
is
not
None
,
deliveries_keys
.
keys
())
return
[
x
for
x
in
deliveries_keys
.
keys
()
if
x
is
not
None
]
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_createCreditNoteInvoice.py
View file @
2f143d52
...
...
@@ -17,14 +17,8 @@ def recursiveCopyLine(to_document, from_document):
recursiveCopyLine
(
reverse_line
,
line
)
newCell
=
reverse_line
.
newContent
for
cell
in
line
.
objectValues
(
portal_type
=
'Invoice Cell'
):
raise
NotImplementedError
newCell
(
# TODO: what properties ?
portal_type
=
cell
.
getPortalType
(),
category_list
=
cell
.
getCategoryList
(),
)
raise
NotImplementedError
(
"NotImplemented: Should do something with %s and %s"
%
(
cell
,
newCell
))
portal
=
context
.
getPortalObject
()
reverse_invoice
=
context
.
getParentValue
().
newContent
(
portal_type
=
context
.
getPortalType
(),
created_by_builder
=
1
,
# tell init script to not create lines
...
...
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_getODTDataDict.py
View file @
2f143d52
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_isAdvanced.py
View file @
2f143d52
...
...
@@ -2,5 +2,7 @@
If the business template 'erp5_advanced_invoicing' is installed, returns True.
If it is not, returns False.
"""
business_template_list
=
context
.
portal_templates
.
getInstalledBusinessTemplateList
()
return
filter
(
lambda
x
:
x
.
getTitle
()
==
"erp5_advanced_invoicing"
,
business_template_list
,
False
)
for
bt
in
context
.
portal_templates
.
getInstalledBusinessTemplateList
():
if
bt
.
getTitle
()
==
"erp5_advanced_invoicing"
:
return
True
return
False
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_printAsODT.py
View file @
2f143d52
# This script uses format= argument
# pylint: disable=redefined-builtin
if
target_language
:
container
.
REQUEST
[
'AcceptLanguage'
].
set
(
target_language
,
10
)
...
...
bt5/erp5_invoicing/bt/skip_coding_style_test
deleted
100644 → 0
View file @
680fdcf9
1
\ No newline at end of file
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