KD-Nr: 
                       /  P-ID: 
diff --git a/ext/custom-addons/dp_custom/wizards/__init__.py b/ext/custom-addons/dp_custom/wizards/__init__.py
index ddbef7c2..158afb89 100644
--- a/ext/custom-addons/dp_custom/wizards/__init__.py
+++ b/ext/custom-addons/dp_custom/wizards/__init__.py
@@ -2,3 +2,5 @@ from . import wizard_confirm_production
 from . import wizard_import_tzbox
 from . import wizard_confirm_print_invoice
 from . import portal_assign_company
+from . import wizard_reset_order
+
diff --git a/ext/custom-addons/dp_custom/wizards/portal_assign_company.py b/ext/custom-addons/dp_custom/wizards/portal_assign_company.py
index a87ed3ab..eebf2bb0 100644
--- a/ext/custom-addons/dp_custom/wizards/portal_assign_company.py
+++ b/ext/custom-addons/dp_custom/wizards/portal_assign_company.py
@@ -53,14 +53,14 @@ class PortalAssignCompany(models.TransientModel):
             if error_content and error_msg.get('errors'):
                 raise UserError(_('%s') % (error_msg.get('errors')[0]))
             else:
-                raise UserError(_('Die Odoo id konnte für den partner nicht gesetzt werden. '
+                raise UserError(_('Die Odoo id konnte für den Partner nicht gesetzt werden. '
                                   'Status Code: %s, Reason: %s') % (response.status_code, response.reason))
 
     def button_activate(self):
         self.ensure_one()
         partner = self.env['res.partner'].browse(self.env.context.get('active_ids', []))
         if not partner:
-            raise ValidationError(_('Der Partner konnte nicht gefuden werden.'))
+            raise ValidationError(_('Der Partner konnte nicht gefunden werden.'))
 
         # Wichtig hier ist, dass dieser Call vor dem ersten Write stattfindet, da das Portal
         # parallel einen Call absetzt, dann dann blockieren würde.
@@ -74,7 +74,7 @@ class PortalAssignCompany(models.TransientModel):
         if self.main_partner_id:
             partner = self.env['res.partner'].browse(self.env.context.get('active_ids', []))
             if not partner:
-                raise ValidationError(_('Der Partner konnte nicht gefuden werden.'))
+                raise ValidationError(_('Der Partner konnte nicht gefunden werden.'))
             portal_id = partner.portal_id
 
             # Wichtig hier ist, dass dieser Call vor dem ersten Write stattfindet, da das Portal
diff --git a/ext/custom-addons/dp_custom/wizards/wizard_reset_order.py b/ext/custom-addons/dp_custom/wizards/wizard_reset_order.py
new file mode 100644
index 00000000..740d7d7e
--- /dev/null
+++ b/ext/custom-addons/dp_custom/wizards/wizard_reset_order.py
@@ -0,0 +1,90 @@
+# Copyright 2018-Today datenpol gmbh (
)
+# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses).
+
+from odoo import tools, api, fields, models, _
+from odoo.exceptions import ValidationError, UserError, Warning
+
+import json
+import requests
+
+class WizardResetOrder(models.TransientModel):
+    _name = 'wizard.reset_order'
+    _description = 'Reset imos-Order'
+
+    # name = fields.Char()
+    #
+    # @api.onchange('name')
+    # def _onchange_name(self):
+    #     return {
+    #         'warning': {
+    #             'title': _('Warning!'),
+    #             'message': _("Achtung, es gab Fehler"),
+    #         }
+    #     }
+
+    @api.multi
+    def button_reset_order(self):
+        for wizard in self:
+            error_at_quotation = False
+            info = 'Bitte prüfen Sie den Angebotsstatus & Auftragsart folgender Angebote:'
+            active_ids = self.env.context.get('active_ids', [])
+            sale_orders = self.env['sale.order'].browse(active_ids)
+            if sale_orders.exists():
+                for so in sale_orders:
+                    if so.state == 'cancel' and so.order_type == 'D':
+                        info += "\n %s -- OK" % so.name
+                    else:
+                        info += "\n %s state='%s',order_type='%s'" % (so.name,so.state,so.order_type)
+                        error_at_quotation = True
+                if error_at_quotation:
+                    raise ValidationError(_(info))
+
+                info = 'Mindestens ein Warenkorb konnte nicht zurückgesetzt werden:'
+                for so in sale_orders:
+                    order_info = self.reset_order_status(so.origin)
+                    if order_info != '':
+                        error_at_quotation = True
+                        info += "\n%s" % order_info
+                        so.message_post(body='Warenkorb konnte im DesignBox-Portal nicht zurückgesetzt werden!\n %s' % order_info)
+                    else:
+                        info += "\n%s --> OK" % so.name
+                        so.message_post(body='Warenkorb im DesignBox-Portal zurückgesetzt!\n%s --> OK' % so.origin)
+
+                if error_at_quotation:
+                    raise Warning(_(info))
+#                    self.name = _(info)
+
+                action = self.env.ref('sale.action_orders').read()[0]
+                action['domain'] = [('id', 'in', active_ids)]
+            return action
+
+    def reset_order_status(self, order_id):
+        self.ensure_one()
+        imos_base_url = tools.config.get('imos_base_url')
+        imos_pass = tools.config.get('imos_pass')
+        imos_url = imos_base_url + r'&tx_imosnetpublic_api[controller]=Basket&tx_imosnetpublic_api[action]=update'
+        idata = {"uid" : int(order_id[-6:]), "status" : 0}
+        data = {
+            'pass' : imos_pass,
+            'user' : 'publicapiuser',
+            'pid' : 5,
+            'logintype' : 'login',
+            'tx_imosnetpublic_api[data]' : json.dumps(idata)
+        }
+        response = requests.post(imos_url, data=data)
+
+        info = ''
+        try:
+            lRes = json.loads(response.content.decode())
+        except Exception as e:
+            info = 'unexpected error %s' % e
+            raise ValidationError(_(info))
+
+        if response.status_code == 200:
+            if lRes.get('status') != 0:
+                info = "Warenkorb: %s, Fehler='%s'" % (order_id,lRes)
+        else:
+            if lRes.get('status') != 0:
+                info = "Warenkorb: %s, Fehler='%s'" % (order_id,lRes.get('data'))
+
+        return info
diff --git a/ext/custom-addons/dp_custom/wizards/wizard_reset_order.xml b/ext/custom-addons/dp_custom/wizards/wizard_reset_order.xml
new file mode 100644
index 00000000..cbe639d3
--- /dev/null
+++ b/ext/custom-addons/dp_custom/wizards/wizard_reset_order.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+    
+        view_wizard_reset_order_form
+        wizard.reset_order
+        
+            
+        
+    
+
+    
+
diff --git a/ext/custom-addons/dp_line_comment_template/__init__.py b/ext/custom-addons/dp_line_comment_template/__init__.py
index 0650744f..aee8895e 100644
--- a/ext/custom-addons/dp_line_comment_template/__init__.py
+++ b/ext/custom-addons/dp_line_comment_template/__init__.py
@@ -1 +1,2 @@
 from . import models
+from . import wizards
diff --git a/ext/custom-addons/dp_line_comment_template/__manifest__.py b/ext/custom-addons/dp_line_comment_template/__manifest__.py
index 96787ce6..5821177e 100644
--- a/ext/custom-addons/dp_line_comment_template/__manifest__.py
+++ b/ext/custom-addons/dp_line_comment_template/__manifest__.py
@@ -3,7 +3,7 @@
 
 # noinspection PyStatementEffect
 {
-    'name': 'dp Order line comments',
+    'name': 'dp line comments',
     'summary': 'Comments templates on invoice and sale lines',
     'version': '11.0.1.0.0',
     'license': 'OPL-1',
@@ -17,6 +17,7 @@
     'data': [
         'views/account_invoice_view.xml',
         'views/sale_order_view.xml',
+        'wizards/wizard_add_line_comment.xml',
     ],
     'installable': True,
     'auto_install': False,
diff --git a/ext/custom-addons/dp_line_comment_template/models/account_invoice.py b/ext/custom-addons/dp_line_comment_template/models/account_invoice.py
index 29b238a8..7afbc14d 100644
--- a/ext/custom-addons/dp_line_comment_template/models/account_invoice.py
+++ b/ext/custom-addons/dp_line_comment_template/models/account_invoice.py
@@ -15,3 +15,14 @@ class AccountInvoice(models.Model):
         comment = self.comment_line_template_id
         if comment:
             self.note_line = comment.get_value(self.partner_id.id)
+
+
+class AccountInvoiceLine(models.Model):
+    _inherit = "account.invoice.line"
+
+    @api.multi
+    def add_line_comment(self):
+        self.ensure_one()
+        action = self.env.ref('dp_line_comment_template.action_wizard_line_comment').read()[0]
+        action['context'] = str({"model_name": 'account.invoice.line', "model_id": self.id})
+        return action
diff --git a/ext/custom-addons/dp_line_comment_template/models/sale_order.py b/ext/custom-addons/dp_line_comment_template/models/sale_order.py
index 2b901659..5e0d22a1 100644
--- a/ext/custom-addons/dp_line_comment_template/models/sale_order.py
+++ b/ext/custom-addons/dp_line_comment_template/models/sale_order.py
@@ -24,3 +24,14 @@ class SaleOrder(models.Model):
             'note_line': self.note_line,
         })
         return values
+
+
+class SaleOrderLine(models.Model):
+    _inherit = "sale.order.line"
+
+    @api.multi
+    def add_line_comment(self):
+        self.ensure_one()
+        action = self.env.ref('dp_line_comment_template.action_wizard_line_comment').read()[0]
+        action['context'] = str({"model_name": 'sale.order.line', "model_id": self.id})
+        return action
diff --git a/ext/custom-addons/dp_line_comment_template/views/account_invoice_view.xml b/ext/custom-addons/dp_line_comment_template/views/account_invoice_view.xml
index b15e3467..dc0c8449 100644
--- a/ext/custom-addons/dp_line_comment_template/views/account_invoice_view.xml
+++ b/ext/custom-addons/dp_line_comment_template/views/account_invoice_view.xml
@@ -16,6 +16,10 @@
                     
                 
             
+            
+                
+                
+            
         
     
 
diff --git a/ext/custom-addons/dp_line_comment_template/views/sale_order_view.xml b/ext/custom-addons/dp_line_comment_template/views/sale_order_view.xml
index 69c4af44..ab7a996a 100644
--- a/ext/custom-addons/dp_line_comment_template/views/sale_order_view.xml
+++ b/ext/custom-addons/dp_line_comment_template/views/sale_order_view.xml
@@ -16,6 +16,10 @@
                     
                 
             
+            
+                
+                
+            
         
     
 
diff --git a/ext/custom-addons/dp_line_comment_template/wizards/__init__.py b/ext/custom-addons/dp_line_comment_template/wizards/__init__.py
new file mode 100644
index 00000000..c618b93a
--- /dev/null
+++ b/ext/custom-addons/dp_line_comment_template/wizards/__init__.py
@@ -0,0 +1 @@
+from . import wizard_add_line_comment
diff --git a/ext/custom-addons/dp_line_comment_template/wizards/wizard_add_line_comment.py b/ext/custom-addons/dp_line_comment_template/wizards/wizard_add_line_comment.py
new file mode 100644
index 00000000..f2216e03
--- /dev/null
+++ b/ext/custom-addons/dp_line_comment_template/wizards/wizard_add_line_comment.py
@@ -0,0 +1,33 @@
+# Copyright 2018-Today datenpol gmbh ()
+# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses).
+
+import re
+
+from odoo import fields, models, api
+
+
+class AddLineComment(models.TransientModel):
+    _name = 'wizard.add_line_comment'
+    _description = 'Zeilentextbaustein hinzufügen'
+
+    comment_line_template_id = fields.Many2one('base.comment.template', string='Line Comment Template')
+    note_line = fields.Html('Line Comment')
+
+    @api.onchange('comment_line_template_id')
+    def _onchange_note_line(self):
+        comment = self.comment_line_template_id
+        if comment:
+            model_name = self.env.context.get('model_name')
+            model_id = self.env.context.get('model_id')
+            if model_name == 'sale.order.line':
+                self.note_line = comment.get_value(self.env[model_name].browse([model_id]).order_id.partner_id.id)
+            if model_name == 'account.invoice.line':
+                self.note_line = comment.get_value(self.env[model_name].browse([model_id]).invoice_id.partner_id.id)
+
+    def add_line_comment(self):
+        self.ensure_one()
+        regex = re.compile(r"(?i)<[^>]*>", re.IGNORECASE)
+        name = regex.sub('', self.note_line)
+        self.env[self.env.context.get('model_name')].browse([self.env.context.get('model_id')]).name += "\n" + name
+
+        return {'type': 'ir.actions.act_window_close'}
diff --git a/ext/custom-addons/dp_line_comment_template/wizards/wizard_add_line_comment.xml b/ext/custom-addons/dp_line_comment_template/wizards/wizard_add_line_comment.xml
new file mode 100644
index 00000000..f17a2388
--- /dev/null
+++ b/ext/custom-addons/dp_line_comment_template/wizards/wizard_add_line_comment.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+    
+
+    
+
+
diff --git a/ext/custom-addons/dp_reports_account/reports/invoice.xml b/ext/custom-addons/dp_reports_account/reports/invoice.xml
index 0fed4b76..47727205 100644
--- a/ext/custom-addons/dp_reports_account/reports/invoice.xml
+++ b/ext/custom-addons/dp_reports_account/reports/invoice.xml
@@ -273,6 +273,9 @@
                         
                         
                     
+                    
+                        Dies ist eine steuerfreie innergemeinschaftliche Lieferung
+