Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lefilament_sales
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
lefilament_sales
Commits
d3ca729d
Commit
d3ca729d
authored
6 years ago
by
Rémi - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
Invert calculation to get sale order amount - invoiced lines
parent
9f43e64f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/sale.py
+2
-2
2 additions, 2 deletions
models/sale.py
with
2 additions
and
2 deletions
models/sale.py
+
2
−
2
View file @
d3ca729d
...
@@ -19,9 +19,9 @@ class SaleOrder(models.Model):
...
@@ -19,9 +19,9 @@ class SaleOrder(models.Model):
for
order
in
self
:
for
order
in
self
:
line_to_invoice
=
[
line
for
line
in
order
.
order_line
if
line
.
invoice_status
==
'
to invoice
'
]
line_to_invoice
=
[
line
for
line
in
order
.
order_line
if
line
.
invoice_status
==
'
to invoice
'
]
untaxed_amount_to_invoice
=
0.0
untaxed_amount_to_invoice
=
self
.
amount_untaxed
for
line
in
line_to_invoice
:
for
line
in
line_to_invoice
:
untaxed_amount_to_invoice
+
=
line
.
qty_
to_
invoice
*
line
.
price_unit
untaxed_amount_to_invoice
-
=
line
.
qty_invoice
d
*
line
.
price_unit
order
.
update
({
order
.
update
({
'
untaxed_amount_to_invoice
'
:
untaxed_amount_to_invoice
'
untaxed_amount_to_invoice
'
:
untaxed_amount_to_invoice
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment