Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Premin
premin_purchase_custom
Merge requests
!35
[T-3579] [IMP] Add invoiced_minus_received to search view
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[T-3579] [IMP] Add invoiced_minus_received to search view
T-3579
into
15.0-stage
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Facundo Barral
requested to merge
T-3579
into
15.0-stage
10 months ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
15.0-stage
15.0-stage (base)
and
latest version
latest version
96a18732
1 commit,
10 months ago
2 files
+
15
−
3
Expand all files
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
Search (e.g. *.vue) (Ctrl+P)
models/purchase_order_line.py
+
2
−
1
Options
@@ -21,7 +21,7 @@ class PurchaseOrderLine(models.Model):
deliveries_ids
=
fields
.
Char
(
compute
=
"
_get_associated_deliveries
"
)
invoiced_minus_received
=
fields
.
Float
(
compute
=
"
_compute_invoiced_minus_received
"
,
string
=
"
QFact.-QRecv.
"
compute
=
"
_compute_invoiced_minus_received
"
,
string
=
"
QFact.-QRecv.
"
,
store
=
True
)
name
=
fields
.
Text
(
string
=
"
Description
"
,
required
=
True
)
@@ -36,6 +36,7 @@ class PurchaseOrderLine(models.Model):
self
.
price_unit
=
0
# Set price_unit to 0 on new purchase order line
return
@api.depends
(
"
qty_invoiced
"
,
"
qty_received
"
)
def
_compute_invoiced_minus_received
(
self
):
for
rec
in
self
:
rec
.
invoiced_minus_received
=
rec
.
qty_invoiced
-
rec
.
qty_received
Menu
Explore
Projects
Groups
Topics
Snippets