Transport 1

This commit is contained in:
jopster
2025-04-04 09:20:26 +02:00
parent 894d428c04
commit 4de4aeac4b
287 changed files with 145 additions and 137 deletions
+1 -1
View File
@@ -45,7 +45,7 @@
'views/dss_zahlungen.xml', 'views/dss_zahlungen.xml',
'views/dss_web_contracts.xml', 'views/dss_web_contracts.xml',
'views/dss_invoices.xml', 'views/dss_invoices.xml',
'views/dss_m2mmail.xml', 'views/dss_m2mmail_views.xml',
'views/mainsystem_view.xml', 'views/mainsystem_view.xml',
'views/dss_importinvoicelist.xml', 'views/dss_importinvoicelist.xml',
'views/menu.xml', 'views/menu.xml',
View File
Regular → Executable
View File
Regular → Executable
View File
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+1 -1
View File
@@ -27,4 +27,4 @@ from . import dss_invoices
from . import dss_importinvoicelist from . import dss_importinvoicelist
from . import dss_web_contracts from . import dss_web_contracts
from . import dss_m2mmail from . import dss_m2mmail
from . import dsslogger
Binary file not shown.
View File
BIN
View File
Binary file not shown.
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File
View File
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
View File
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File
View File
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Regular → Executable
View File
Regular → Executable
View File
+3
View File
@@ -8,6 +8,7 @@ import datetime
import json import json
import re import re
import uuid import uuid
from .dsslogger import OdooCustomLogger
import logging import logging
import base64 import base64
import subprocess import subprocess
@@ -31,6 +32,8 @@ from tuya_connector import TuyaOpenAPI, TUYA_LOGGER
import sys import sys
TUYA_LOGGER.setLevel(logging.DEBUG) TUYA_LOGGER.setLevel(logging.DEBUG)
# logging.setLoggerClass(OdooCustomLogger)
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
class dsscontracts(models.Model): class dsscontracts(models.Model):
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
+40
View File
@@ -1,15 +1,55 @@
import uuid import uuid
import logging
from odoo import api, fields, models, _ from odoo import api, fields, models, _
from odoo import tools from odoo import tools
_logger = logging.getLogger(__name__)
class dssm2mvalues(models.Model): class dssm2mvalues(models.Model):
@api.model
def analyze_emails(self):
# Prüfe, ob der Datensatz ein Email-Objekt ist
email_text = self.website_message_ids.body
# Prüfe, ob der Text "ProjektID:" enthält
if "ProjektID:" in email_text:
# Finde die Position von "ProjektID:"
pos = email_text.find("ProjektID:")
_logger.info("Import M2M Emails - Get ID. File - Message : pos "+str(pos))
# Extrahiere die nächsten 3 Ziffern
project_id = email_text[pos + 11:pos + 14].strip()
self.project_id = project_id
self.analyzed = True
@api.model
def create(self, vals):
result = super(dssm2mvalues, self).create(vals)
settings = self.env['dss.settings'].search([],limit=1)
cron_job = settings.m2mcron
if cron_job:
_logger.info("Import M2M Emails - Create - Cron activating : "+str(cron_job))
cron_job._trigger()
return result
_name = "dss.m2mmail" _name = "dss.m2mmail"
_description = "DigitalSignage M2M Rückmeldungen" _description = "DigitalSignage M2M Rückmeldungen"
# _rec_name = "statusname" # _rec_name = "statusname"
_inherit = ['mail.thread', 'mail.activity.mixin'] _inherit = ['mail.thread', 'mail.activity.mixin']
uuid = fields.Char(default=lambda self: self._default_uuid(), required=True, readonly=True, copy=False, string='UUID') uuid = fields.Char(default=lambda self: self._default_uuid(), required=True, readonly=True, copy=False, string='UUID')
analyzed = fields.Boolean('Analysiert', default=False, tracking=True)
project_id = fields.Char(string='Projekt-ID',tracking=True)
project = fields.Many2one('dss.projects', string='Projekt', compute='_compute_project')
@api.depends('project_id')
def _compute_project(self):
self.project = False
for record in self:
if record.project_id:
project = self.env['dss.projects'].search([('projectid', '=', int(record.project_id))])
if project:
record.project = project
# ... andere Methoden ...
@api.model @api.model
def _default_uuid(self): def _default_uuid(self):
return str(uuid.uuid4()) return str(uuid.uuid4())
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+6 -1
View File
@@ -2,8 +2,9 @@ import ast
import datetime import datetime
import json import json
import re import re
import uuid from .dsslogger import OdooCustomLogger
import logging import logging
import uuid
import base64 import base64
import subprocess import subprocess
import tempfile import tempfile
@@ -31,10 +32,14 @@ from tuya_connector import TuyaOpenAPI, TUYA_LOGGER
import sys import sys
TUYA_LOGGER.setLevel(logging.DEBUG) TUYA_LOGGER.setLevel(logging.DEBUG)
logging.setLoggerClass(OdooCustomLogger)
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
class dssprojects(models.Model): class dssprojects(models.Model):
_name = "dss.projects" _name = "dss.projects"
_description = "DigitalSignage Projekte" _description = "DigitalSignage Projekte"
_rec_name = "projektname" _rec_name = "projektname"
Regular → Executable
View File
Regular → Executable
View File
+2 -1
View File
@@ -61,7 +61,8 @@ class dssSettings(models.Model):
rporturl = fields.Char('RPort URL',tracking=True) rporturl = fields.Char('RPort URL',tracking=True)
rportusername = fields.Char('RPort Username',tracking=True) rportusername = fields.Char('RPort Username',tracking=True)
rporttoken = fields.Char('RPort API Token',tracking=True) rporttoken = fields.Char('RPort API Token',tracking=True)
showdebug = fields.Boolean('Debug',help='Debug Informationen aktivieren ',tracking=True)
m2mcron = fields.Many2one('ir.cron',string='M2M Cron',tracking=True)
def _get_settingvalue(self,valuename): def _get_settingvalue(self,valuename):
settings = (self.env['dss.settings'].search([],limit=1)) settings = (self.env['dss.settings'].search([],limit=1))
Regular → Executable
+4 -3
View File
@@ -138,6 +138,7 @@ class dsstriggergroups(models.Model):
def run_triggers(self, changes, Dataset, triggers): def run_triggers(self, changes, Dataset, triggers):
_logger.info("Trigger in run_triggers ! - start count :"+str(len(triggers)) ) _logger.info("Trigger in run_triggers ! - start count :"+str(len(triggers)) )
for trig in triggers: for trig in triggers:
if trig.trigger_active:
_logger.info("Trigger in run_triggers - Working on : "+str(trig.triggername)+'('+str(trig.id)+')') _logger.info("Trigger in run_triggers - Working on : "+str(trig.triggername)+'('+str(trig.id)+')')
dochecktrigger = False dochecktrigger = False
@@ -193,9 +194,9 @@ class dsstriggergroups(models.Model):
Wert = "" Wert = ""
if field_type=="many2one": if field_type=="many2one":
Wert = str(Dataset[fieldname].id) Wert = str(Dataset[fieldname].id)
# Dataset[fieldname].model # Dataset[fieldname].model
# SubWertDB = self.env[].search([('id', '=', field.id)]) # SubWertDB = self.env[].search([('id', '=', field.id)])
# Wert = SubWertDB.id # Wert = SubWertDB.id
if field_type=="char": if field_type=="char":
Wert = str(Dataset[fieldname]) Wert = str(Dataset[fieldname])
_logger.info("Trigger in run_triggers - specific value : "+str(changes)+" ("+str(Wert)+') -> '+str(trig.trigger_value)+' - '+str(field)+' / '+str(field_type)) _logger.info("Trigger in run_triggers - specific value : "+str(changes)+" ("+str(Wert)+') -> '+str(trig.trigger_value)+' - '+str(field)+' / '+str(field_type))
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File
View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File
View File
View File
View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Regular → Executable
View File
View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Regular → Executable
View File
View File
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Some files were not shown because too many files have changed in this diff Show More