mirror of
https://github.com/bringout/oca-edi.git
synced 2026-04-21 01:12:10 +02:00
Initial commit: OCA Edi packages (42 packages)
This commit is contained in:
commit
df976c03db
2184 changed files with 571602 additions and 0 deletions
|
|
@ -0,0 +1,45 @@
|
|||
# Despatch Advice Import Ubl
|
||||
|
||||
Odoo addon: despatch_advice_import_ubl
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-edi-framework-despatch_advice_import_ubl
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- despatch_advice_import
|
||||
- base_ubl
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: Despatch Advice Import Ubl
|
||||
- **Version**: 16.0.1.1.0
|
||||
- **Category**: N/A
|
||||
- **License**: AGPL-3
|
||||
- **Installable**: True
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/edi-framework](https://github.com/OCA/edi-framework) branch 16.0, addon `despatch_advice_import_ubl`.
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original AGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
==========================
|
||||
Despatch Advice Import Ubl
|
||||
==========================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:6ae472dfcc668af3f2110436922e8e8bd70161ccafe62bddad3d5d297ba08acd
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Beta
|
||||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/edi/tree/16.0/despatch_advice_import_ubl
|
||||
:alt: OCA/edi
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-despatch_advice_import_ubl
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=16.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module support for the import of Despatch Advice File.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/edi/issues/new?body=module:%20despatch_advice_import_ubl%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
* ACSONE SA/NV
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
* `Trobz <https://trobz.com>`_:
|
||||
|
||||
* Thien <thienvh@trobz.com>
|
||||
* Simone Orsi <simone.orsi@camptocamp.com>
|
||||
* Jacques-Etienne Baudoux <je@bcim.be>
|
||||
|
||||
Other credits
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The migration of this module from 10.0 to 16.0 was financially supported by Camptocamp
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: https://odoo-community.org
|
||||
|
||||
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.
|
||||
|
||||
This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/16.0/despatch_advice_import_ubl>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import wizard
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# Copyright 2020 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Despatch Advice Import Ubl",
|
||||
"summary": """
|
||||
Import Despatch Advice files""",
|
||||
"version": "16.0.1.1.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/edi",
|
||||
"depends": ["despatch_advice_import", "base_ubl"],
|
||||
"data": [],
|
||||
"demo": [],
|
||||
"installable": True,
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * despatch_advice_import_ubl
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#: model:ir.model,name:despatch_advice_import_ubl.model_despatch_advice_import
|
||||
msgid "Despatch Advice Import from Files"
|
||||
msgstr "Uvoz otpremnog savjeta iz datoteka"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#. odoo-python
|
||||
#: code:addons/despatch_advice_import_ubl/wizard/despatch_advice_import.py:0
|
||||
#, python-format
|
||||
msgid "Missing line ID in the Despatch Advice."
|
||||
msgstr "Nedostaje ID linije u otpremnom savjetu."
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * despatch_advice_import_ubl
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#: model:ir.model,name:despatch_advice_import_ubl.model_despatch_advice_import
|
||||
msgid "Despatch Advice Import from Files"
|
||||
msgstr ""
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#. odoo-python
|
||||
#: code:addons/despatch_advice_import_ubl/wizard/despatch_advice_import.py:0
|
||||
#, python-format
|
||||
msgid "Missing line ID in the Despatch Advice."
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * despatch_advice_import_ubl
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-02-15 21:35+0000\n"
|
||||
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.17\n"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#: model:ir.model,name:despatch_advice_import_ubl.model_despatch_advice_import
|
||||
msgid "Despatch Advice Import from Files"
|
||||
msgstr "Aviso de Expedición Importación desde Ficheros"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#. odoo-python
|
||||
#: code:addons/despatch_advice_import_ubl/wizard/despatch_advice_import.py:0
|
||||
#, python-format
|
||||
msgid "Missing line ID in the Despatch Advice."
|
||||
msgstr "Falta ID de línea en el Aviso de Expedición."
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * despatch_advice_import_ubl
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-05-01 15:34+0000\n"
|
||||
"Last-Translator: c2cdidier <didier.donze@camptocamp.com>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 4.17\n"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#: model:ir.model,name:despatch_advice_import_ubl.model_despatch_advice_import
|
||||
msgid "Despatch Advice Import from Files"
|
||||
msgstr "Importer l'avis d'expédition à partir des fichiers"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#. odoo-python
|
||||
#: code:addons/despatch_advice_import_ubl/wizard/despatch_advice_import.py:0
|
||||
#, python-format
|
||||
msgid "Missing line ID in the Despatch Advice."
|
||||
msgstr "ID de ligne manquant dans l'avis d'expédition."
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * despatch_advice_import_ubl
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-05-13 10:34+0000\n"
|
||||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.17\n"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#: model:ir.model,name:despatch_advice_import_ubl.model_despatch_advice_import
|
||||
msgid "Despatch Advice Import from Files"
|
||||
msgstr "Importazione di avvisi di spedizione da file"
|
||||
|
||||
#. module: despatch_advice_import_ubl
|
||||
#. odoo-python
|
||||
#: code:addons/despatch_advice_import_ubl/wizard/despatch_advice_import.py:0
|
||||
#, python-format
|
||||
msgid "Missing line ID in the Despatch Advice."
|
||||
msgstr "ID riga mancante nell'avviso di spedizione."
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
* `Trobz <https://trobz.com>`_:
|
||||
|
||||
* Thien <thienvh@trobz.com>
|
||||
* Simone Orsi <simone.orsi@camptocamp.com>
|
||||
* Jacques-Etienne Baudoux <je@bcim.be>
|
||||
|
|
@ -0,0 +1 @@
|
|||
The migration of this module from 10.0 to 16.0 was financially supported by Camptocamp
|
||||
|
|
@ -0,0 +1 @@
|
|||
This module support for the import of Despatch Advice File.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,437 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||
<title>Despatch Advice Import Ubl</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* 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 }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="despatch-advice-import-ubl">
|
||||
<h1 class="title">Despatch Advice Import Ubl</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:6ae472dfcc668af3f2110436922e8e8bd70161ccafe62bddad3d5d297ba08acd
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/edi/tree/16.0/despatch_advice_import_ubl"><img alt="OCA/edi" src="https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-despatch_advice_import_ubl"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module support for the import of Despatch Advice File.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#other-credits" id="toc-entry-5">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/edi/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/edi/issues/new?body=module:%20despatch_advice_import_ubl%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>ACSONE SA/NV</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
|
||||
<ul>
|
||||
<li><p class="first">Laurent Mignon <<a class="reference external" href="mailto:laurent.mignon@acsone.eu">laurent.mignon@acsone.eu</a>></p>
|
||||
</li>
|
||||
<li><p class="first"><a class="reference external" href="https://trobz.com">Trobz</a>:</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Thien <<a class="reference external" href="mailto:thienvh@trobz.com">thienvh@trobz.com</a>></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first">Simone Orsi <<a class="reference external" href="mailto:simone.orsi@camptocamp.com">simone.orsi@camptocamp.com</a>></p>
|
||||
</li>
|
||||
<li><p class="first">Jacques-Etienne Baudoux <<a class="reference external" href="mailto:je@bcim.be">je@bcim.be</a>></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Other credits</a></h2>
|
||||
<p>The migration of this module from 10.0 to 16.0 was financially supported by Camptocamp</p>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/edi/tree/16.0/despatch_advice_import_ubl">OCA/edi</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
from . import test_despatch_advice_import
|
||||
from . import test_despatch_advice_mix
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<DespatchAdvice:DespatchAdvice
|
||||
xmlns:DespatchAdvice="urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2"
|
||||
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
>
|
||||
<cbc:ID>{picking_name}</cbc:ID>
|
||||
<cbc:IssueDate>2020-11-16</cbc:IssueDate>
|
||||
<cbc:DespatchAdviceTypeCode>scheduled</cbc:DespatchAdviceTypeCode>
|
||||
<cac:OrderReference>
|
||||
</cac:OrderReference>
|
||||
<cac:DespatchSupplierParty>
|
||||
<cac:Party>
|
||||
<cac:PartyIdentification>
|
||||
<cbc:ID schemeName="BE:VAT">BE0477472701</cbc:ID>
|
||||
</cac:PartyIdentification>
|
||||
<cac:PostalAddress>
|
||||
<cbc:StreetName>STREET</cbc:StreetName>
|
||||
<cbc:CityName>CITY</cbc:CityName>
|
||||
<cbc:PostalZone>0000</cbc:PostalZone>
|
||||
<cac:Country>
|
||||
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
|
||||
</cac:Country>
|
||||
</cac:PostalAddress>
|
||||
<cac:PartyLegalEntity>
|
||||
<cbc:RegistrationName>S.A. SOCIETY</cbc:RegistrationName>
|
||||
</cac:PartyLegalEntity>
|
||||
</cac:Party>
|
||||
</cac:DespatchSupplierParty>
|
||||
<cac:DeliveryCustomerParty>
|
||||
<cac:Party>
|
||||
<cac:PartyIdentification>
|
||||
<cbc:ID schemeName="BE:VAT">BE0421801233</cbc:ID>
|
||||
</cac:PartyIdentification>
|
||||
<cac:PartyLegalEntity>
|
||||
<cbc:RegistrationName>COMPANY</cbc:RegistrationName>
|
||||
</cac:PartyLegalEntity>
|
||||
</cac:Party>
|
||||
</cac:DeliveryCustomerParty>
|
||||
<cac:Shipment>
|
||||
<cbc:ID>0987654321</cbc:ID>
|
||||
<cac:Delivery>
|
||||
<cac:EstimatedDeliveryPeriod>
|
||||
<cbc:EndDate>2020-11-17</cbc:EndDate>
|
||||
</cac:EstimatedDeliveryPeriod>
|
||||
</cac:Delivery>
|
||||
</cac:Shipment>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>{line_1_id}</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="BG">{line_1_qty}</cbc:DeliveredQuantity>
|
||||
<cbc:OutstandingQuantity
|
||||
unitCode="BG"
|
||||
>{line_1_backorder_qty}</cbc:OutstandingQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_1_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{line_1_order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>PRODUCT1</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>1234567</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-03-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>1234890</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>{line_2_id}</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">{line_2_qty}</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_2_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{line_2_order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>PRODUCT2</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>2345678</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2021-12-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>876540</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
</DespatchAdvice:DespatchAdvice>
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<DespatchAdvice:DespatchAdvice
|
||||
xmlns:DespatchAdvice="urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2"
|
||||
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
>
|
||||
<cbc:ID>{picking_name}</cbc:ID>
|
||||
<cbc:IssueDate>2020-11-16</cbc:IssueDate>
|
||||
<cbc:DespatchAdviceTypeCode>scheduled</cbc:DespatchAdviceTypeCode>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
<cac:DespatchSupplierParty>
|
||||
<cac:Party>
|
||||
<cac:PartyIdentification>
|
||||
<cbc:ID schemeName="BE:VAT">BE0477472701</cbc:ID>
|
||||
</cac:PartyIdentification>
|
||||
<cac:PostalAddress>
|
||||
<cbc:StreetName>STREET</cbc:StreetName>
|
||||
<cbc:CityName>CITY</cbc:CityName>
|
||||
<cbc:PostalZone>0000</cbc:PostalZone>
|
||||
<cac:Country>
|
||||
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
|
||||
</cac:Country>
|
||||
</cac:PostalAddress>
|
||||
<cac:PartyLegalEntity>
|
||||
<cbc:RegistrationName>S.A. SOCIETY</cbc:RegistrationName>
|
||||
</cac:PartyLegalEntity>
|
||||
</cac:Party>
|
||||
</cac:DespatchSupplierParty>
|
||||
<cac:DeliveryCustomerParty>
|
||||
<cac:Party>
|
||||
<cac:PartyIdentification>
|
||||
<cbc:ID schemeName="BE:VAT">BE0421801233</cbc:ID>
|
||||
</cac:PartyIdentification>
|
||||
<cac:PartyLegalEntity>
|
||||
<cbc:RegistrationName>COMPANY</cbc:RegistrationName>
|
||||
</cac:PartyLegalEntity>
|
||||
</cac:Party>
|
||||
</cac:DeliveryCustomerParty>
|
||||
<cac:Shipment>
|
||||
<cbc:ID>0987654321</cbc:ID>
|
||||
<cac:Delivery>
|
||||
<cac:EstimatedDeliveryPeriod>
|
||||
<cbc:EndDate>2020-11-17</cbc:EndDate>
|
||||
</cac:EstimatedDeliveryPeriod>
|
||||
</cac:Delivery>
|
||||
</cac:Shipment>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>{line_1_id}</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="BG">{line_1_qty}</cbc:DeliveredQuantity>
|
||||
<cbc:OutstandingQuantity
|
||||
unitCode="BG"
|
||||
>{line_1_backorder_qty}</cbc:OutstandingQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_1_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>PRODUCT1</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>1234567</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-03-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>1234890</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>{line_2_id}</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">{line_2_qty}</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_2_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>PRODUCT2</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>2345678</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2021-12-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>876540</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
</DespatchAdvice:DespatchAdvice>
|
||||
|
|
@ -0,0 +1,358 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<DespatchAdvice:DespatchAdvice
|
||||
xmlns:DespatchAdvice="urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2"
|
||||
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
>
|
||||
<cbc:ID>0811960660</cbc:ID>
|
||||
<cbc:IssueDate>2021-04-01</cbc:IssueDate>
|
||||
<cbc:DespatchAdviceTypeCode>scheduled</cbc:DespatchAdviceTypeCode>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
<cac:DespatchSupplierParty>
|
||||
<cac:Party>
|
||||
<cac:PartyIdentification>
|
||||
<cbc:ID schemeName="BE:VAT">BE0401953350</cbc:ID>
|
||||
</cac:PartyIdentification>
|
||||
<cac:PostalAddress>
|
||||
<cbc:StreetName>RUE TEST, 1</cbc:StreetName>
|
||||
<cbc:CityName>CITY</cbc:CityName>
|
||||
<cbc:PostalZone>0000</cbc:PostalZone>
|
||||
<cac:Country>
|
||||
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
|
||||
</cac:Country>
|
||||
</cac:PostalAddress>
|
||||
<cac:PartyLegalEntity>
|
||||
<cbc:RegistrationName>S.A. SOCIETY</cbc:RegistrationName>
|
||||
</cac:PartyLegalEntity>
|
||||
</cac:Party>
|
||||
</cac:DespatchSupplierParty>
|
||||
<cac:DeliveryCustomerParty>
|
||||
<cac:Party>
|
||||
<cac:PartyIdentification>
|
||||
<cbc:ID schemeName="BE:VAT">BE0421801233</cbc:ID>
|
||||
</cac:PartyIdentification>
|
||||
<cac:PartyLegalEntity>
|
||||
<cbc:RegistrationName>COMPANY</cbc:RegistrationName>
|
||||
</cac:PartyLegalEntity>
|
||||
</cac:Party>
|
||||
</cac:DeliveryCustomerParty>
|
||||
<cac:Shipment>
|
||||
<cbc:ID>0811960660</cbc:ID>
|
||||
<cac:Delivery>
|
||||
<cac:EstimatedDeliveryPeriod>
|
||||
<cbc:EndDate>2021-04-02</cbc:EndDate>
|
||||
</cac:EstimatedDeliveryPeriod>
|
||||
</cac:Delivery>
|
||||
</cac:Shipment>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000010</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">60</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_1_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>CYDECTIN 0,1% ORAL DRENCH 1L</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10007444</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-09-30</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>475932</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000020</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">40</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_2_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>CYDECTIN TRICLAMOX OVIN 1 L</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10005578</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-05-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>446320</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000030</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">96</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_4_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>APOQUEL 5,4MG 100CP</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10022152</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-07-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>475409</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000040</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">10</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_7_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>MODERIN 32MG 30CP</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10005211</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2023-03-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>EC0920</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000050</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">40</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_8_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>CIDR 1,38gr BOITE DE 10</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10002949</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2021-07-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>Y073071</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000060</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">1</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_12_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>WITNESS LH 6x1 TEST</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10012140</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-01-22</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>461003</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000070</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">2</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_13_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>WITNESS RELAXIN 5x1 TEST GESTATION</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10010958</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-05-26</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>476920</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000080</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">4</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_14_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>ACEGON 10x6ML</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10010146</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2021-07-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>0029-72</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000090</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">480</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_15_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>EQUEST GEL ORAL 700kg</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10009831</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-11-30</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>483001</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000100</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">1</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_16_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>WITNESS GIARDIA 5 TESTS</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10009407</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-09-30</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>AT37.11</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000110</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">400</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_17_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>CATMINTH PATE SERINGUE 3GR</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10003022</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2023-10-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>477663</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000120</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="BB">30</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_18_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>FENDOV 1250 12 BOLI</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10006920</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2024-12-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>6089402</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000130</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">2</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_29_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>WITNESS FELV-FIV 10x1 TEST</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10009061</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-05-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>21ZLAE064</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000140</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">2</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_30_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>WITNESS FELV-FIV 5x1 TEST</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10006252</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-05-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>20ZLAD038</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
</DespatchAdvice:DespatchAdvice>
|
||||
|
|
@ -0,0 +1,424 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<DespatchAdvice:DespatchAdvice
|
||||
xmlns:DespatchAdvice="urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2"
|
||||
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
>
|
||||
<cbc:ID>0811960665</cbc:ID>
|
||||
<cbc:IssueDate>2021-04-01</cbc:IssueDate>
|
||||
<cbc:DespatchAdviceTypeCode>scheduled</cbc:DespatchAdviceTypeCode>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
<cac:DespatchSupplierParty>
|
||||
<cac:Party>
|
||||
<cac:PartyIdentification>
|
||||
<cbc:ID schemeName="BE:VAT">BE0401953350</cbc:ID>
|
||||
</cac:PartyIdentification>
|
||||
<cac:PostalAddress>
|
||||
<cbc:StreetName>RUE TEST, 1</cbc:StreetName>
|
||||
<cbc:CityName>CITY</cbc:CityName>
|
||||
<cbc:PostalZone>0000</cbc:PostalZone>
|
||||
<cac:Country>
|
||||
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
|
||||
</cac:Country>
|
||||
</cac:PostalAddress>
|
||||
<cac:PartyLegalEntity>
|
||||
<cbc:RegistrationName>S.A. COMPANY</cbc:RegistrationName>
|
||||
</cac:PartyLegalEntity>
|
||||
</cac:Party>
|
||||
</cac:DespatchSupplierParty>
|
||||
<cac:DeliveryCustomerParty>
|
||||
<cac:Party>
|
||||
<cac:PartyIdentification>
|
||||
<cbc:ID schemeName="BE:VAT">BE0421801233</cbc:ID>
|
||||
</cac:PartyIdentification>
|
||||
<cac:PartyLegalEntity>
|
||||
<cbc:RegistrationName>COMPANY</cbc:RegistrationName>
|
||||
</cac:PartyLegalEntity>
|
||||
</cac:Party>
|
||||
</cac:DeliveryCustomerParty>
|
||||
<cac:Shipment>
|
||||
<cbc:ID>0811960665</cbc:ID>
|
||||
<cac:Delivery>
|
||||
<cac:EstimatedDeliveryPeriod>
|
||||
<cbc:EndDate>2021-04-02</cbc:EndDate>
|
||||
</cac:EstimatedDeliveryPeriod>
|
||||
</cac:Delivery>
|
||||
</cac:Shipment>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000010</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">24</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_3_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VANGUARD DA2PI-CPV 25X1D</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10001458</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-11-25</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>471881</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000020</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">20</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_6_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>RISPOVAL IBR INACT 100ML</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10001112</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-12-25</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>455269</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000030</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="TY">0</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_9_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSICAN PLS BB ORAL VACX1DS VLX10_BE/NL</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10022422</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cac:LotIdentification>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000040</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">20</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_10_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSICAN+ BBPi IN 10x1d</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10023409</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-06-25</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>04582703</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000050</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">120</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_11_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>CONVENIA SOL INJ 10ml</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10007669</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2023-03-31</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>43224706</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000060</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="BB">160</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_19_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>FEVAXYN PENTOFEL 10X1D</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10004344</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-04-26</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>474662</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000070</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">5</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_20_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VANGUARD CPV-LEPTO 25x1D</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10001455</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2024-07-02</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>473338</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000080</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">25</cbc:DeliveredQuantity>
|
||||
<cbc:OutstandingQuantity unitCode="C62">5</cbc:OutstandingQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_21_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VANGUARD DA2PI-CPV-LEPTO 25x1D (7)</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10001457</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-06-29</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>456322</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000090</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">10</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_22_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VANGUARD LEPTO 25x1D</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10001459</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-10-11</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>347340</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000100</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">30</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_23_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSICAN+ DHPPI 25x1d</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10011717</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-08-11</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>42602703</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000110</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">132</cbc:DeliveredQuantity>
|
||||
<cbc:OutstandingQuantity unitCode="C62">68</cbc:OutstandingQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_24_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSICAN+ DHPPI/L4 25x1d</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10011718</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-06-08</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>95602701</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000120</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">60</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_25_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSICAN+ L4 25x1d</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10011728</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-04-20</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>445427A01</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000130</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">40</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_26_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSICAN+ PI 25x1d</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10011736</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-09-06</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>39602702</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000140</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="BB">15</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_27_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSIFEL FELV 25x1d</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10009541</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-12-06</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>491233</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000150</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">30</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_28_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSIGUARD RABIES 10x1d</cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10016049</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2022-08-13</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>405827A04</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000030</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">18</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_9_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSICAN+ BB ORAL 10x1d </cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10022422</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2021-08-12</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>401463</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
<cac:DespatchLine>
|
||||
<cbc:ID>000030</cbc:ID>
|
||||
<cbc:DeliveredQuantity unitCode="C62">2</cbc:DeliveredQuantity>
|
||||
<cac:OrderLineReference>
|
||||
<cbc:LineID>{line_9_id}</cbc:LineID>
|
||||
<cac:OrderReference>
|
||||
<cbc:ID>{order_id}</cbc:ID>
|
||||
</cac:OrderReference>
|
||||
</cac:OrderLineReference>
|
||||
<cac:Item>
|
||||
<cbc:Name>VERSICAN+ BB ORAL 10x1d </cbc:Name>
|
||||
<cac:SellersItemIdentification>
|
||||
<cbc:ID>10022422</cbc:ID>
|
||||
</cac:SellersItemIdentification>
|
||||
<cac:ItemInstance>
|
||||
<cbc:BestBeforeDate>2021-08-12</cbc:BestBeforeDate>
|
||||
<cac:LotIdentification>
|
||||
<cbc:LotNumberID>401464</cbc:LotNumberID>
|
||||
</cac:LotIdentification>
|
||||
</cac:ItemInstance>
|
||||
</cac:Item>
|
||||
</cac:DespatchLine>
|
||||
</DespatchAdvice:DespatchAdvice>
|
||||
|
|
@ -0,0 +1,205 @@
|
|||
# Copyright 2020 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from base64 import b64decode, b64encode
|
||||
|
||||
from odoo import fields
|
||||
from odoo.tests.common import TransactionCase
|
||||
from odoo.tools import file_open
|
||||
|
||||
|
||||
class TestDespatchAdviceImport(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.supplier = cls.env.ref("base.res_partner_12")
|
||||
cls.supplier.vat = "BE0477472701"
|
||||
cls.env.user.company_id.partner_id.vat = "BE0421801233"
|
||||
cls.product_1 = cls.env["product.product"].create(
|
||||
{
|
||||
"name": "Product 1",
|
||||
"default_code": "1234567",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "P1"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.product_2 = cls.env["product.product"].create(
|
||||
{
|
||||
"name": "Product 2",
|
||||
"default_code": "2345678",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "P2"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.purchase_order = cls.env["purchase.order"].create(
|
||||
{
|
||||
"partner_id": cls.supplier.id,
|
||||
"date_order": fields.Datetime.now(),
|
||||
"date_planned": fields.Datetime.now(),
|
||||
}
|
||||
)
|
||||
cls.line1 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.product_1.id,
|
||||
"name": cls.product_2.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 24,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 15,
|
||||
}
|
||||
)
|
||||
cls.line2 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.product_2.id,
|
||||
"name": cls.product_2.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 15,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 25,
|
||||
}
|
||||
)
|
||||
cls.DespatchAdviceImport = cls.env["despatch.advice.import"]
|
||||
# cls.ProcurementOrder = cls.env["procurement.order"]
|
||||
|
||||
with file_open(
|
||||
"despatch_advice_import_ubl/tests/files/despatch_advice_tmpl.xml", "rb"
|
||||
) as f:
|
||||
cls.despatch_advice_xml1 = f.read()
|
||||
|
||||
with file_open(
|
||||
"despatch_advice_import_ubl/tests/files/despatch_advice_2.xml", "rb"
|
||||
) as f:
|
||||
cls.despatch_advice_xml2 = f.read()
|
||||
|
||||
def test_xml_convert_to_internal_data_01(self):
|
||||
"""
|
||||
Data:
|
||||
An UBL DespatchAdvice with all the information expected by the
|
||||
parser
|
||||
Test case:
|
||||
Convert to xml document to the internal data structure
|
||||
Expected result:
|
||||
All the fields are filled into the internal data structure.
|
||||
"""
|
||||
xml_content = self.despatch_advice_xml1.decode("utf-8").format(
|
||||
picking_name="0810805774",
|
||||
order_id=self.purchase_order.name,
|
||||
line_1_id=self.line1.id,
|
||||
line_1_qty=self.line1.product_qty,
|
||||
line_1_product_ref=self.product_1.default_code,
|
||||
line_1_backorder_qty=12,
|
||||
line_2_id=self.line2.id,
|
||||
line_2_qty=self.line2.product_qty,
|
||||
line_2_product_ref=self.product_2.default_code,
|
||||
line_2_backorder_qty=0,
|
||||
)
|
||||
xml_content = b64encode(xml_content.encode("utf-8"))
|
||||
default = {"despatch_advice_type_code": "delivery"}
|
||||
result = self.DespatchAdviceImport.with_context(
|
||||
despatch_advice_import__default_vals=dict(despatch_advice=default)
|
||||
).parse_despatch_advice(b64decode(xml_content), "test.xml")
|
||||
attachments = result.pop("attachments")
|
||||
self.assertTrue(attachments.get("test.xml"))
|
||||
expected = {
|
||||
"chatter_msg": [],
|
||||
"company": {"vat": "BE0421801233"},
|
||||
"date": "2020-11-16",
|
||||
"despatch_advice_type_code": "delivery",
|
||||
"estimated_delivery_date": "2020-11-17",
|
||||
"id": "0810805774",
|
||||
"lines": [
|
||||
{
|
||||
"backorder_qty": 12.0,
|
||||
"line_id": str(self.line1.id),
|
||||
"order_line_id": str(self.line1.id),
|
||||
"product_lot": "1234890",
|
||||
"product_ref": str(self.product_1.default_code),
|
||||
"qty": self.line1.product_qty,
|
||||
"ref": str(self.purchase_order.name),
|
||||
"uom": {"unece_code": "BG"},
|
||||
},
|
||||
{
|
||||
"backorder_qty": 0,
|
||||
"line_id": str(self.line2.id),
|
||||
"order_line_id": str(self.line2.id),
|
||||
"product_lot": "876540",
|
||||
"product_ref": str(self.product_2.default_code),
|
||||
"qty": self.line2.product_qty,
|
||||
"ref": str(self.purchase_order.name),
|
||||
"uom": {"unece_code": "C62"},
|
||||
},
|
||||
],
|
||||
"ref": str(self.purchase_order.name),
|
||||
"supplier": {"vat": "BE0477472701"},
|
||||
}
|
||||
self.maxDiff = None
|
||||
self.assertEqual(expected, result)
|
||||
|
||||
def test_xml_convert_to_internal_data_02(self):
|
||||
"""
|
||||
Data:
|
||||
An UBL DespatchAdvice with all the information expected by the
|
||||
parser -- The orderReference is at the orderLineLevel
|
||||
Test case:
|
||||
Convert to xml document to the internal data structure
|
||||
Expected result:
|
||||
All the fields are filled into the internal data structure.
|
||||
"""
|
||||
xml_content = self.despatch_advice_xml2.decode("utf-8").format(
|
||||
picking_name="0810805774",
|
||||
line_1_id=self.line1.id,
|
||||
line_1_order_id=self.purchase_order.name,
|
||||
line_1_qty=self.line1.product_qty,
|
||||
line_1_product_ref=self.product_1.default_code,
|
||||
line_1_backorder_qty=12,
|
||||
line_2_id=self.line2.id,
|
||||
line_2_order_id=self.purchase_order.name,
|
||||
line_2_qty=self.line2.product_qty,
|
||||
line_2_product_ref=self.product_2.default_code,
|
||||
line_2_backorder_qty=0,
|
||||
)
|
||||
xml_content = b64encode(xml_content.encode("utf-8"))
|
||||
result = self.DespatchAdviceImport.parse_despatch_advice(
|
||||
b64decode(xml_content), "test2.xml"
|
||||
)
|
||||
attachments = result.pop("attachments")
|
||||
self.assertTrue(attachments.get("test2.xml"))
|
||||
expected = {
|
||||
"chatter_msg": [],
|
||||
"company": {"vat": "BE0421801233"},
|
||||
"date": "2020-11-16",
|
||||
"despatch_advice_type_code": "scheduled",
|
||||
"estimated_delivery_date": "2020-11-17",
|
||||
"id": "0810805774",
|
||||
"lines": [
|
||||
{
|
||||
"backorder_qty": 12.0,
|
||||
"line_id": str(self.line1.id),
|
||||
"order_line_id": str(self.line1.id),
|
||||
"product_lot": "1234890",
|
||||
"product_ref": str(self.product_1.default_code),
|
||||
"qty": self.line1.product_qty,
|
||||
"ref": str(self.purchase_order.name),
|
||||
"uom": {"unece_code": "BG"},
|
||||
},
|
||||
{
|
||||
"backorder_qty": 0,
|
||||
"line_id": str(self.line2.id),
|
||||
"order_line_id": str(self.line2.id),
|
||||
"product_lot": "876540",
|
||||
"product_ref": str(self.product_2.default_code),
|
||||
"qty": self.line2.product_qty,
|
||||
"ref": str(self.purchase_order.name),
|
||||
"uom": {"unece_code": "C62"},
|
||||
},
|
||||
],
|
||||
"ref": "",
|
||||
"supplier": {"vat": "BE0477472701"},
|
||||
}
|
||||
self.maxDiff = None
|
||||
self.assertEqual(expected, result)
|
||||
|
|
@ -0,0 +1,751 @@
|
|||
# Copyright 2021 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
|
||||
from base64 import b64encode
|
||||
|
||||
from odoo import fields
|
||||
from odoo.tests.common import TransactionCase
|
||||
from odoo.tools import file_open
|
||||
|
||||
|
||||
class TestDespatchAdviceMix(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""
|
||||
Semi integration test : grab several DO for one PO
|
||||
and check that everything is created properly:
|
||||
Backorders, cancelled moves, etc
|
||||
"""
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
|
||||
Product = cls.env["product.product"]
|
||||
cls.supplier = cls.env.ref("base.res_partner_12")
|
||||
cls.supplier.vat = "BE0477472701"
|
||||
cls.env.user.company_id.partner_id.vat = "BE0421801233"
|
||||
cls.purchase_order = cls.env["purchase.order"].create(
|
||||
{
|
||||
"partner_id": cls.supplier.id,
|
||||
"date_order": fields.Datetime.now(),
|
||||
"date_planned": fields.Datetime.now(),
|
||||
}
|
||||
)
|
||||
|
||||
cls.p1 = Product.create(
|
||||
{
|
||||
"name": "CYDECTIN 0,1% ORAL DRENCH 1L",
|
||||
"default_code": "1354307",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "P1"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line1 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p1.id,
|
||||
"name": cls.p1.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 60,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 51.4,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p2 = Product.create(
|
||||
{
|
||||
"name": "CYDECTIN TRICLAMOX OVIN 1 L",
|
||||
"default_code": "10005578",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p2"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line2 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p2.id,
|
||||
"name": cls.p2.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 40,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 78.65,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p3 = Product.create(
|
||||
{
|
||||
"name": "VANGUARD DA2PI-CPV 25X1D",
|
||||
"default_code": "10001458",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p3"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line3 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p3.id,
|
||||
"name": cls.p3.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 24,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 96.32,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p4 = Product.create(
|
||||
{
|
||||
"name": "APOQUEL 5,4MG 100CP",
|
||||
"default_code": "10022152",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p4"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line4 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p4.id,
|
||||
"name": cls.p4.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 96,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 73.86,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p5 = Product.create(
|
||||
{
|
||||
"name": "DOGMINTH PATE TUBE 24GR",
|
||||
"default_code": "10002655",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p5"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line5 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p5.id,
|
||||
"name": cls.p5.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 280,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 7.2,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p6 = Product.create(
|
||||
{
|
||||
"name": "RISPOVAL IBR INACT 100ML",
|
||||
"default_code": "10001112",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p6"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line6 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p6.id,
|
||||
"name": cls.p6.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 20,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 114.36,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p7 = Product.create(
|
||||
{
|
||||
"name": "MODERIN 32MG 30CP",
|
||||
"default_code": "10005211",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p7"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line7 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p7.id,
|
||||
"name": cls.p7.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 10,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 47.62,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p8 = Product.create(
|
||||
{
|
||||
"name": "CIDR 1,38gr BOITE DE 10",
|
||||
"default_code": "10002949",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p8"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line8 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p8.id,
|
||||
"name": cls.p8.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 40,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 116.83,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p9 = Product.create(
|
||||
{
|
||||
"name": "VERSICAN+ BB ORAL 10x1d",
|
||||
"default_code": "10022422",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p9"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line9 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p9.id,
|
||||
"name": cls.p9.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 20,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 93.08,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p10 = Product.create(
|
||||
{
|
||||
"name": "VERSICAN+ BBPi IN 10x1d",
|
||||
"default_code": "10023409",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p10"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line10 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p10.id,
|
||||
"name": cls.p10.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 20,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 97.68,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p11 = Product.create(
|
||||
{
|
||||
"name": "CONVENIA SOL INJ 10ml",
|
||||
"default_code": "10007669",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p11"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line11 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p11.id,
|
||||
"name": cls.p11.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 120,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 150.27,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p12 = Product.create(
|
||||
{
|
||||
"name": "WITNESS LH 6x1 TEST",
|
||||
"default_code": "10012140",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p12"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line12 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p12.id,
|
||||
"name": cls.p12.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 1,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 134.32,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p13 = Product.create(
|
||||
{
|
||||
"name": "WITNESS RELAXIN 5x1 TEST GESTATION",
|
||||
"default_code": "10010958",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p13"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line13 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p13.id,
|
||||
"name": cls.p13.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 2,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 92.37,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p14 = Product.create(
|
||||
{
|
||||
"name": "ACEGON 10x6ML",
|
||||
"default_code": "10010146",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p14"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line14 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p14.id,
|
||||
"name": cls.p14.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 4,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 99.13,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p15 = Product.create(
|
||||
{
|
||||
"name": "EQUEST GEL ORAL 700kg",
|
||||
"default_code": "10009831",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p15"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line15 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p15.id,
|
||||
"name": cls.p15.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 480,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 16.62,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p16 = Product.create(
|
||||
{
|
||||
"name": "WITNESS GIARDIA 5 TESTS",
|
||||
"default_code": "10009407",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p16"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line16 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p16.id,
|
||||
"name": cls.p16.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 1,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 58.12,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p17 = Product.create(
|
||||
{
|
||||
"name": "CATMINTH PATE SERINGUE 3GR",
|
||||
"default_code": "10003022",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p17"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line17 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p17.id,
|
||||
"name": cls.p17.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 400,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 6.07,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p18 = Product.create(
|
||||
{
|
||||
"name": "FENDOV 1250 12 BOLI",
|
||||
"default_code": "10006920",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p18"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line18 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p18.id,
|
||||
"name": cls.p18.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 30,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 232.56,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p19 = Product.create(
|
||||
{
|
||||
"name": "FEVAXYN PENTOFEL 10X1D",
|
||||
"default_code": "10004344",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p19"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line19 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p19.id,
|
||||
"name": cls.p19.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 160,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 164.05,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p20 = Product.create(
|
||||
{
|
||||
"name": "VANGUARD CPV-LEPTO 25x1D",
|
||||
"default_code": "10001455",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p20"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line20 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p20.id,
|
||||
"name": cls.p20.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 5,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 88.73,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p21 = Product.create(
|
||||
{
|
||||
"name": "VANGUARD DA2PI-CPV-LEPTO 25x1D (7)",
|
||||
"default_code": "10001457",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p21"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line21 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p21.id,
|
||||
"name": cls.p21.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 30,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 123.60,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p22 = Product.create(
|
||||
{
|
||||
"name": "VANGUARD LEPTO 25x1D",
|
||||
"default_code": "10001459",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p22"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line22 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p22.id,
|
||||
"name": cls.p22.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 10,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 37.79,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p23 = Product.create(
|
||||
{
|
||||
"name": "VERSICAN+ DHPPI 25x1d",
|
||||
"default_code": "10011717",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p23"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line23 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p23.id,
|
||||
"name": cls.p23.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 30,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 94.93,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p24 = Product.create(
|
||||
{
|
||||
"name": "VERSICAN+ DHPPI/L4 25x1d",
|
||||
"default_code": "10011718",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p24"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line24 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p24.id,
|
||||
"name": cls.p24.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 200,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 156.90,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p25 = Product.create(
|
||||
{
|
||||
"name": "VERSICAN+ L4 25x1d",
|
||||
"default_code": "10011728",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p25"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line25 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p25.id,
|
||||
"name": cls.p25.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 60,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 65.41,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p26 = Product.create(
|
||||
{
|
||||
"name": "VERSICAN+ PI 25x1d",
|
||||
"default_code": "10011736",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p26"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line26 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p26.id,
|
||||
"name": cls.p26.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 40,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 53.73,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p27 = Product.create(
|
||||
{
|
||||
"name": "VERSIFEL FELV 25x1d",
|
||||
"default_code": "10009541",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p27"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line27 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p27.id,
|
||||
"name": cls.p27.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 15,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 277.55,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p28 = Product.create(
|
||||
{
|
||||
"name": "VERSIGUARD RABIES 10x1d",
|
||||
"default_code": "10016049",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p28"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line28 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p28.id,
|
||||
"name": cls.p28.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 30,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 24.14,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p29 = Product.create(
|
||||
{
|
||||
"name": "WITNESS FELV-FIV 10x1 TEST",
|
||||
"default_code": "10009061",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p29"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line29 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p29.id,
|
||||
"name": cls.p29.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 2,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 154.00,
|
||||
}
|
||||
)
|
||||
|
||||
cls.p30 = Product.create(
|
||||
{
|
||||
"name": "WITNESS FELV-FIV 5x1 TEST",
|
||||
"default_code": "10006252",
|
||||
"seller_ids": [
|
||||
(0, 0, {"partner_id": cls.supplier.id, "product_code": "p30"})
|
||||
],
|
||||
}
|
||||
)
|
||||
cls.line30 = cls.purchase_order.order_line.create(
|
||||
{
|
||||
"order_id": cls.purchase_order.id,
|
||||
"product_id": cls.p30.id,
|
||||
"name": cls.p30.name,
|
||||
"date_planned": fields.Datetime.now(),
|
||||
"product_qty": 2,
|
||||
"product_uom": cls.env.ref("uom.product_uom_unit").id,
|
||||
"price_unit": 80.87,
|
||||
}
|
||||
)
|
||||
cls.purchase_order.button_confirm()
|
||||
cls.picking = cls.purchase_order.picking_ids
|
||||
|
||||
cls.DespatchAdviceImport = cls.env["despatch.advice.import"]
|
||||
|
||||
with file_open("despatch_advice_import_ubl/tests/files/do_mix1.xml", "rb") as f:
|
||||
cls.despatch_advice_xml1 = f.read()
|
||||
|
||||
with file_open("despatch_advice_import_ubl/tests/files/do_mix2.xml", "rb") as f:
|
||||
cls.despatch_advice_xml2 = f.read()
|
||||
|
||||
def test_despatch_advice_import(self):
|
||||
|
||||
xml_content1 = self.despatch_advice_xml1.decode("utf-8").format(
|
||||
order_id=self.purchase_order.name,
|
||||
line_1_id=self.line1.id,
|
||||
line_2_id=self.line2.id,
|
||||
line_4_id=self.line4.id,
|
||||
line_7_id=self.line7.id,
|
||||
line_8_id=self.line8.id,
|
||||
line_12_id=self.line12.id,
|
||||
line_13_id=self.line13.id,
|
||||
line_14_id=self.line14.id,
|
||||
line_15_id=self.line15.id,
|
||||
line_16_id=self.line16.id,
|
||||
line_17_id=self.line17.id,
|
||||
line_18_id=self.line18.id,
|
||||
line_29_id=self.line29.id,
|
||||
line_30_id=self.line30.id,
|
||||
)
|
||||
|
||||
xml_encoded_doc1 = b64encode(xml_content1.encode("utf-8"))
|
||||
despatch_import = self.DespatchAdviceImport.create(
|
||||
{"document": xml_encoded_doc1, "filename": "do_mix1.xml"}
|
||||
)
|
||||
despatch_import.process_document()
|
||||
|
||||
po_moves = self.line21.move_ids.filtered(
|
||||
lambda m: m.state not in ("cancel", "done")
|
||||
)
|
||||
|
||||
self.assertTrue(po_moves)
|
||||
|
||||
xml_content2 = self.despatch_advice_xml2.decode("utf-8").format(
|
||||
picking_name="0810805774",
|
||||
order_id=self.purchase_order.name,
|
||||
line_3_id=self.line3.id,
|
||||
line_6_id=self.line6.id,
|
||||
line_9_id=self.line9.id,
|
||||
line_10_id=self.line10.id,
|
||||
line_11_id=self.line11.id,
|
||||
line_19_id=self.line19.id,
|
||||
line_20_id=self.line20.id,
|
||||
line_21_id=self.line21.id,
|
||||
line_22_id=self.line22.id,
|
||||
line_23_id=self.line23.id,
|
||||
line_24_id=self.line24.id,
|
||||
line_25_id=self.line25.id,
|
||||
line_26_id=self.line26.id,
|
||||
line_27_id=self.line27.id,
|
||||
line_28_id=self.line28.id,
|
||||
)
|
||||
|
||||
xml_encoded_doc2 = b64encode(xml_content2.encode("utf-8"))
|
||||
despatch_import = self.DespatchAdviceImport.create(
|
||||
{"document": xml_encoded_doc2, "filename": "do_mix2.xml"}
|
||||
)
|
||||
despatch_import.process_document()
|
||||
|
||||
backorder = self.purchase_order.picking_ids.filtered(lambda p: p.backorder_id)
|
||||
initial_pick = self.purchase_order.picking_ids.filtered(
|
||||
lambda p: not p.backorder_id
|
||||
)
|
||||
|
||||
self.assertEqual(len(backorder), 2)
|
||||
self.assertEqual(len(initial_pick), 1)
|
||||
|
||||
po_moves = self.line21.move_ids.filtered(
|
||||
lambda m: m.state not in ("cancel", "done")
|
||||
)
|
||||
|
||||
self.assertTrue(po_moves)
|
||||
|
||||
move_for_backorder_pick2 = backorder.move_ids.filtered(
|
||||
lambda m: m.product_id.id == self.p24.id
|
||||
)
|
||||
|
||||
self.assertEqual(len(move_for_backorder_pick2), 2)
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import despatch_advice_import
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
# Copyright 2020 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
|
||||
from odoo import _, api, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DespatchAdviceImport(models.TransientModel):
|
||||
|
||||
_name = "despatch.advice.import"
|
||||
_inherit = ["despatch.advice.import", "base.ubl"]
|
||||
|
||||
@api.model
|
||||
def parse_xml_despatch_advice(self, xml_root):
|
||||
start_tag = "{urn:oasis:names:specification:ubl:schema:xsd:"
|
||||
if xml_root.tag == start_tag + "DespatchAdvice-2}DespatchAdvice":
|
||||
return self.parse_ubl_despatch_advice(xml_root)
|
||||
else:
|
||||
return super(DespatchAdviceImport, self).parse_xml_despatch_advice(xml_root)
|
||||
|
||||
@api.model
|
||||
def parse_ubl_despatch_advice(self, xml_root):
|
||||
ns = xml_root.nsmap
|
||||
# Get main xmlns
|
||||
if None in ns:
|
||||
main_xmlns = ns.pop(None)
|
||||
else:
|
||||
main_xmlns = ns.pop("DespatchAdvice")
|
||||
ns["main"] = main_xmlns
|
||||
date_el = xml_root.xpath("/main:DespatchAdvice/cbc:IssueDate", namespaces=ns)
|
||||
estimated_delivery_date_el = xml_root.xpath(
|
||||
"/main:DespatchAdvice/cac:Shipment/cac:Delivery/"
|
||||
"cac:EstimatedDeliveryPeriod/cbc:EndDate",
|
||||
namespaces=ns,
|
||||
)
|
||||
order_id_el = xml_root.xpath("/main:DespatchAdvice/cbc:ID", namespaces=ns)
|
||||
order_reference_el = xml_root.xpath(
|
||||
"/main:DespatchAdvice/cac:OrderReference/cbc:ID", namespaces=ns
|
||||
)
|
||||
|
||||
despatch_advice_type_code_el = xml_root.xpath(
|
||||
"/main:DespatchAdvice/cbc:DespatchAdviceTypeCode", namespaces=ns
|
||||
)
|
||||
|
||||
supplier_el = xml_root.xpath(
|
||||
"/main:DespatchAdvice/cac:DespatchSupplierParty/cac:Party", namespaces=ns
|
||||
)
|
||||
# We only take the "official references" for supplier_dict
|
||||
supplier_dict = self.ubl_parse_party(supplier_el[0], ns)
|
||||
supplier_dict = {
|
||||
"vat": supplier_dict.get("vat"),
|
||||
}
|
||||
customer_el = xml_root.xpath(
|
||||
"/main:DespatchAdvice/cac:DeliveryCustomerParty/cac:Party", namespaces=ns
|
||||
)
|
||||
customer_dict = self.ubl_parse_party(customer_el[0], ns)
|
||||
|
||||
customer_dict = {"vat": customer_dict.get("vat")}
|
||||
lines_el = xml_root.xpath(
|
||||
"/main:DespatchAdvice/cac:DespatchLine", namespaces=ns
|
||||
)
|
||||
res_lines = []
|
||||
for line in lines_el:
|
||||
res_lines.append(self.parse_ubl_despatch_advice_line(line, ns))
|
||||
res = {
|
||||
"id": order_id_el[0].text if order_id_el else "",
|
||||
"ref": order_reference_el[0].text if order_reference_el else "",
|
||||
"supplier": supplier_dict,
|
||||
"company": customer_dict,
|
||||
"despatch_advice_type_code": (
|
||||
despatch_advice_type_code_el[0].text
|
||||
if len(despatch_advice_type_code_el) > 0
|
||||
else ""
|
||||
),
|
||||
"date": len(date_el) and date_el[0].text,
|
||||
"estimated_delivery_date": len(estimated_delivery_date_el)
|
||||
and estimated_delivery_date_el[0].text,
|
||||
"lines": res_lines,
|
||||
}
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def parse_ubl_despatch_advice_line(self, line, ns):
|
||||
line_id_el = line.xpath("cbc:ID", namespaces=ns)
|
||||
qty_el = line.xpath("cbc:DeliveredQuantity", namespaces=ns)
|
||||
qty = float(qty_el[0].text)
|
||||
backorder_qty_el = line.xpath("cbc:OutstandingQuantity", namespaces=ns)
|
||||
backorder_qty = None
|
||||
if backorder_qty_el and len(backorder_qty_el):
|
||||
backorder_qty = float(backorder_qty_el[0].text)
|
||||
else:
|
||||
backorder_qty = 0
|
||||
|
||||
product_ref_el = line.xpath(
|
||||
"cac:Item/cac:SellersItemIdentification/cbc:ID", namespaces=ns
|
||||
)
|
||||
|
||||
if len(product_ref_el) == 0:
|
||||
product_ref_el = line.xpath(
|
||||
"cac:Item/cac:BuyersItemIdentification/cbc:ID", namespaces=ns
|
||||
)
|
||||
|
||||
product_lot_el = line.xpath(
|
||||
"cac:Item/cac:ItemInstance/cac:LotIdentification/cbc:LotNumberID",
|
||||
namespaces=ns,
|
||||
)
|
||||
order_reference_el = line.xpath(
|
||||
"cac:OrderLineReference/cac:OrderReference/cbc:ID", namespaces=ns
|
||||
)
|
||||
|
||||
order_line_id_el = line.xpath(
|
||||
"cac:OrderLineReference/cbc:LineID", namespaces=ns
|
||||
)
|
||||
|
||||
if not order_line_id_el:
|
||||
raise UserError(_("Missing line ID in the Despatch Advice."))
|
||||
|
||||
res_line = {
|
||||
"line_id": line_id_el[0].text,
|
||||
"order_line_id": order_line_id_el[0].text,
|
||||
"ref": order_reference_el[0].text if order_reference_el else "",
|
||||
"qty": qty,
|
||||
"product_ref": product_ref_el[0].text,
|
||||
"product_lot": product_lot_el[0].text if product_lot_el else "",
|
||||
"uom": {"unece_code": qty_el[0].attrib.get("unitCode")},
|
||||
"backorder_qty": backorder_qty,
|
||||
}
|
||||
|
||||
package_id_el = line.xpath(
|
||||
"cac:Shipment/cac:TransportHandlingUnit/cac:ActualPackage/cbc:ID",
|
||||
namespaces=ns,
|
||||
)
|
||||
package_type_el = line.xpath(
|
||||
"cac:Shipment/cac:TransportHandlingUnit/cbc:TransportHandlingUnitTypeCode",
|
||||
namespaces=ns,
|
||||
)
|
||||
package_weight_el = line.xpath(
|
||||
"cac:Shipment/cac:GrossWeightMeasure/cbc:Measure", namespaces=ns
|
||||
)
|
||||
if package_id_el or package_type_el:
|
||||
res_line["package"] = {
|
||||
"name": package_id_el[0].text if package_id_el else "",
|
||||
"type": package_type_el[0].text if package_type_el else "",
|
||||
"weight": package_weight_el[0].text if package_weight_el else "",
|
||||
}
|
||||
|
||||
defaults = self.env.context.get("despatch_advice_import__default_vals", {}).get(
|
||||
"lines", {}
|
||||
)
|
||||
res_line.update(defaults)
|
||||
return res_line
|
||||
|
||||
@api.model
|
||||
def ubl_parse_party(self, party_node, ns):
|
||||
partner_name_el = party_node.xpath("cac:PartyName/cbc:Name", namespaces=ns)
|
||||
if not partner_name_el:
|
||||
partner_name_el = party_node.xpath(
|
||||
"cac:PartyLegalEntity/cbc:RegistrationName", namespaces=ns
|
||||
)
|
||||
|
||||
vat_el = party_node.xpath("cac:PartyIdentification/cbc:ID", namespaces=ns)
|
||||
partner_dict = {
|
||||
"vat": (
|
||||
vat_el[0].text
|
||||
if vat_el and vat_el[0].attrib.get("schemeName").upper()
|
||||
else False
|
||||
),
|
||||
"name": partner_name_el[0].text,
|
||||
}
|
||||
address_el = party_node.xpath("cac:PostalAddress", namespaces=ns)
|
||||
if address_el:
|
||||
address_dict = self.ubl_parse_address(address_el[0], ns)
|
||||
partner_dict.update(address_dict)
|
||||
return partner_dict
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
# Architecture
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
U[Users] -->|HTTP| V[Views and QWeb Templates]
|
||||
V --> C[Controllers]
|
||||
V --> W[Wizards – Transient Models]
|
||||
C --> M[Models and ORM]
|
||||
W --> M
|
||||
M --> R[Reports]
|
||||
DX[Data XML] --> M
|
||||
S[Security – ACLs and Groups] -. enforces .-> M
|
||||
|
||||
subgraph Despatch_advice_import_ubl Module - despatch_advice_import_ubl
|
||||
direction LR
|
||||
M:::layer
|
||||
W:::layer
|
||||
C:::layer
|
||||
V:::layer
|
||||
R:::layer
|
||||
S:::layer
|
||||
DX:::layer
|
||||
end
|
||||
|
||||
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
|
||||
```
|
||||
|
||||
Notes
|
||||
- Views include tree/form/kanban templates and report templates.
|
||||
- Controllers provide website/portal routes when present.
|
||||
- Wizards are UI flows implemented with `models.TransientModel`.
|
||||
- Data XML loads data/demo records; Security defines groups and access.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Configuration
|
||||
|
||||
Refer to Odoo settings for despatch_advice_import_ubl. Configure related models, access rights, and options as needed.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Controllers
|
||||
|
||||
This module does not define custom HTTP controllers.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Dependencies
|
||||
|
||||
This addon depends on:
|
||||
|
||||
- [despatch_advice_import](../../odoo-bringout-oca-edi-framework-despatch_advice_import)
|
||||
- [base_ubl](../../odoo-bringout-oca-edi-framework-base_ubl)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# FAQ
|
||||
|
||||
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
|
||||
- Q: How to enable? A: Start server with --addon despatch_advice_import_ubl or install in UI.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Install
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-edi-framework-despatch_advice_import_ubl"
|
||||
# or
|
||||
uv pip install odoo-bringout-oca-edi-framework-despatch_advice_import_ubl"
|
||||
```
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# Models
|
||||
|
||||
Detected core models and extensions in despatch_advice_import_ubl.
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
```
|
||||
|
||||
Notes
|
||||
- Classes show model technical names; fields omitted for brevity.
|
||||
- Items listed under _inherit are extensions of existing models.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Overview
|
||||
|
||||
Packaged Odoo addon: despatch_advice_import_ubl. Provides features documented in upstream Odoo 16 under this addon.
|
||||
|
||||
- Source: OCA/OCB 16.0, addon despatch_advice_import_ubl
|
||||
- License: LGPL-3
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Reports
|
||||
|
||||
This module does not define custom reports.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# Security
|
||||
|
||||
This module does not define custom security rules or access controls beyond Odoo defaults.
|
||||
|
||||
Default Odoo security applies:
|
||||
- Base user access through standard groups
|
||||
- Model access inherited from dependencies
|
||||
- No custom row-level security rules
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# Troubleshooting
|
||||
|
||||
- Ensure Python and Odoo environment matches repo guidance.
|
||||
- Check database connectivity and logs if startup fails.
|
||||
- Validate that dependent addons listed in DEPENDENCIES.md are installed.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Usage
|
||||
|
||||
Start Odoo including this addon (from repo root):
|
||||
|
||||
```bash
|
||||
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon despatch_advice_import_ubl
|
||||
```
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# Wizards
|
||||
|
||||
Transient models exposed as UI wizards in despatch_advice_import_ubl.
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class DespatchAdviceImport
|
||||
```
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-edi-framework-despatch_advice_import_ubl"
|
||||
version = "16.0.0"
|
||||
description = "Despatch Advice Import Ubl -
|
||||
Import Despatch Advice files"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-edi-framework-despatch_advice_import>=16.0.0",
|
||||
"odoo-bringout-oca-edi-framework-base_ubl>=16.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">= 3.11"
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://github.com/bringout/0"
|
||||
repository = "https://github.com/bringout/0"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.metadata]
|
||||
allow-direct-references = true
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["despatch_advice_import_ubl"]
|
||||
|
||||
[tool.rye]
|
||||
managed = true
|
||||
dev-dependencies = [
|
||||
"pytest>=8.4.1",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue