Skip to content

Commit

Permalink
[ADD] base_edifact: Add method get description
Browse files Browse the repository at this point in the history
  • Loading branch information
thienvh332 committed Oct 23, 2023
1 parent 066e7dc commit 0263c69
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion base_edifact/models/edifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,16 @@ def map2odoo_unit_price(self, seg = None):
# TODO: Add price calculation formula
if pri[0] == "AAB":
return float(pri[1])
return 0.0
return 0.0

@api.model
def map2odoo_description(self, seg):
"""
'IMD' EDI segment: ['F', '79', ['', '', '', 'Description']]
F: Label
79: Other description
"""
if seg:
description = seg[2][3]
return description
return None

0 comments on commit 0263c69

Please sign in to comment.