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
Otros
customer_purchase_order
Merge requests
!176
[FIX][T4552] Invoice address is now branch; minor fix
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[FIX][T4552] Invoice address is now branch; minor fix
T4552
into
12.0
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Hermes
requested to merge
T4552
into
12.0
8 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
12.0
12.0 (base)
and
latest version
latest version
88a72acd
1 commit,
8 months ago
1 file
+
4
−
4
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
models/customer_purchase_order_importer.py
+
4
−
4
Options
@@ -546,7 +546,7 @@ class CustomerPurchaseOrderImporter(models.Model):
order_data
=
{
'
name
'
:
'
ORD
'
+
order_number
,
'
partner
'
:
partner
.
id
,
'
partner_invoice_id
'
:
address
[
'
invoice
'
]
,
'
partner_invoice_id
'
:
branch
.
id
,
'
partner_shipping_id
'
:
branch
.
id
,
'
price_type
'
:
'
gross
'
,
'
date_order
'
:
date_order
,
@@ -748,12 +748,12 @@ class CustomerPurchaseOrderImporter(models.Model):
return
config_lines
def
_get_product
(
self
,
product
,
description
=
''
):
def
_get_product
(
self
,
data
,
description
=
''
):
errors
=
[]
code
=
list
(
product
.
keys
())[
0
]
code
=
list
(
data
.
keys
())[
0
]
product
=
product
[
code
][
'
product
'
]
product
=
data
[
code
][
'
product
'
]
if
not
product
:
errors
.
append
(
_
(
'
~ Product %s with code %s not found.
\n
'
)
%
(
description
,
code
))
elif
len
(
product
)
>
1
:
Menu
Explore
Projects
Groups
Topics
Snippets