Skip to content

Commit

Permalink
[IMP] base_wamas_ubl dict item default value
Browse files Browse the repository at this point in the history
  • Loading branch information
santostelmo committed Sep 12, 2024
1 parent 9a311d7 commit 90297de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions base_wamas_ubl/lib/wamas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ def generate_wamas_dict(dict_item, grammar, **kwargs): # noqa: C901
if isinstance(ubl_path, list):
lst_val = []
for _item in ubl_path:
lst_val.append(dict_item.get(_item, ""))
lst_val.append(dict_item.get(_item) or "")
if lst_val:
val = " ".join(lst_val)
val = " ".join(lst_val).strip()
elif isinstance(ubl_path, dict):
for _key in ubl_path:
if dict_item.get(_key, False):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
<cbc:ID>130377</cbc:ID>
<cac:Delivery>
<cac:PromiseDeliveryPeriod>
<cbc:EndDate>2023-05-01</cbc:EndDate>
<cbc:EndTime>14:00:00</cbc:EndTime>
<cbc:EndDate>2023-05-02</cbc:EndDate>
<cbc:EndTime>15:00:00</cbc:EndTime>
</cac:PromiseDeliveryPeriod>
<cac:EstimatedDeliveryPeriod>
<cbc:EndDate>2023-05-01</cbc:EndDate>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ODOO WAMAS 00000120230501020000WEAK00050000WH/IN/000377 ODOO PO001040 STDMAN0001040 MyCompany Department StreetName AdditionalStreetName 95380 Turlock US (623)-853-7197 [email protected] 20230501160000
ODOO WAMAS 00000120230501020000WEAK00050000WH/IN/000377 ODOO PO001040 STDMAN0001040 MyCompany Department StreetName AdditionalStreetName 95380 Turlock US (623)-853-7197 [email protected] 20230502170000
ODOO WAMAS 00000220230501020000WEAP00045000WH/IN/000377 ODOO PO001040 0000010001151 00000 NDISPONIBLE 000001536000BOUT NORMAL 20230501020000 202305011600007910063 NNLG
ODOO WAMAS 00000320230501020000WEAP00045000WH/IN/000377 ODOO PO001040 0000020001156 00000 NDISPONIBLE 000005184000PET NORMAL 20230501020000 202305011600007910105 NNLG
ODOO WAMAS 00000420230501020000WEAP00045000WH/IN/000377 ODOO PO001040 0000030001160 00000 NDISPONIBLE 000003840000BOUT NORMAL 20230501020000 202305011600007910004 NNLG
Expand Down

0 comments on commit 90297de

Please sign in to comment.