diff --git a/base_edifact/README.rst b/base_edifact/README.rst index 0cbb9e6da4..f5f1f2d0a3 100644 --- a/base_edifact/README.rst +++ b/base_edifact/README.rst @@ -104,6 +104,7 @@ Contributors * Rafa Morant (www.albasoft.com) * Marc Poch * Duong (Tran Quoc) +* Tris Doan Maintainers ~~~~~~~~~~~ diff --git a/base_edifact/models/edifact.py b/base_edifact/models/edifact.py index 30563d3b4e..a384eb9c8b 100644 --- a/base_edifact/models/edifact.py +++ b/base_edifact/models/edifact.py @@ -199,14 +199,15 @@ def map2odoo_product(self, seg, pia=None): ['5', ['1276', 'SA', '', '9']] SA. Supplier's Article Number """ + res = {} + # Set default code based on SA if given + if pia is not None and pia[1][0]: + res["code"] = pia[1][0] code = seg[2][0] if len(list(seg)) > 2 else False if code: field = "code" if seg[2][1] == "SRV" else "barcode" - return {field: code} - # Fallback on SA if no EAN given - if pia is not None and pia[1][0]: - return {"code": pia[1][0]} - return {} + res[field] = code + return res @api.model def map2odoo_qty(self, seg): diff --git a/base_edifact/readme/CONTRIBUTORS.rst b/base_edifact/readme/CONTRIBUTORS.rst index a7a744310a..74ed30ec88 100644 --- a/base_edifact/readme/CONTRIBUTORS.rst +++ b/base_edifact/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Rafa Morant (www.albasoft.com) * Marc Poch * Duong (Tran Quoc) +* Tris Doan diff --git a/base_edifact/static/description/index.html b/base_edifact/static/description/index.html index 0df539d1bd..5026270339 100644 --- a/base_edifact/static/description/index.html +++ b/base_edifact/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -448,12 +449,15 @@

Contributors

  • Rafa Morant <rmorant@albasoft.com> (www.albasoft.com)
  • Marc Poch <mpoch@planetatic.com>
  • Duong (Tran Quoc) <duongtq@trobz.com>
  • +
  • Tris Doan <tridm@trobz.com>
  • Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.