Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Romain Courteaud
slapos.core
Commits
36f09f81
Commit
36f09f81
authored
Jan 20, 2025
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: do not block non automated Sale Invoices
parent
646d5bf5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_isTotalPriceMatchingSalePackingList.py
...InvoiceTransaction_isTotalPriceMatchingSalePackingList.py
+2
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_isTradeModelCorrect.py
..._accounting/SaleInvoiceTransaction_isTradeModelCorrect.py
+4
-0
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_isTotalPriceMatchingSalePackingList.py
View file @
36f09f81
invoice
=
context
if
invoice
.
getLedger
()
!=
'automated'
:
return
False
# Non automated invoices can be used
return
True
delivery_list
=
invoice
.
getCausalityValueList
(
portal_type
=
'Sale Packing List'
)
amount
=
len
(
delivery_list
)
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_isTradeModelCorrect.py
View file @
36f09f81
if
context
.
getLedger
()
!=
'automated'
:
# Non automated invoices can be used
return
True
specialise
=
context
.
getSpecialiseValue
(
portal_type
=
'Sale Trade Condition'
)
if
specialise
is
None
or
specialise
.
getSpecialiseValue
()
is
None
:
# The trade model don't applies if the Trade Condition isn't attached to
...
...
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