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
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
Roque
slapos.core
Commits
139173b4
Commit
139173b4
authored
Apr 21, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
slapos_accounting: Ignore constraint on non-slapos related Invoices
See merge request
nexedi/slapos.core!519
parents
0e770859
3ee01bfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_isTotalPriceEqualAccounting.py
...ing/SaleInvoiceTransaction_isTotalPriceEqualAccounting.py
+9
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_isTradeModelCorrect.py
..._accounting/SaleInvoiceTransaction_isTradeModelCorrect.py
+1
-1
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_isTotalPriceEqualAccounting.py
View file @
139173b4
invoice
=
context
invoice
=
context
specialise
=
context
.
getSpecialiseValue
(
portal_type
=
'Sale Trade Condition'
)
if
specialise
is
None
or
specialise
.
getSpecialiseValue
()
is
None
:
if
not
len
(
invoice
.
objectValues
(
portal_type
=
"Invoice Line"
)):
# The trade model don't applies if the Trade Condition isn't attached to
# A business process
return
True
total_price
=
invoice
.
getTotalPrice
()
total_price
=
invoice
.
getTotalPrice
()
if
invoice
.
getTotalPrice
()
<
0
:
if
invoice
.
getTotalPrice
()
<
0
:
# For a negative total is from the Reversal transactions
# For a negative total is from the Reversal transactions
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_isTradeModelCorrect.py
View file @
139173b4
specialise
=
context
.
getSpecialiseValue
(
portal_type
=
'Sale Trade Condition'
)
specialise
=
context
.
getSpecialiseValue
(
portal_type
=
'Sale Trade Condition'
)
if
specialise
.
getSpecialiseValue
()
is
None
:
if
specialise
is
None
or
specialise
.
getSpecialiseValue
()
is
None
:
# The trade model don't applies if the Trade Condition isn't attached to
# The trade model don't applies if the Trade Condition isn't attached to
# A business process
# A business process
return
True
return
True
...
...
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