diff --git a/dev/scripts/interfaces/sst01_portal_create_partner.py b/dev/scripts/interfaces/sst01_portal_create_company.py similarity index 73% rename from dev/scripts/interfaces/sst01_portal_create_partner.py rename to dev/scripts/interfaces/sst01_portal_create_company.py index 1b9ee558..e6d9362b 100755 --- a/dev/scripts/interfaces/sst01_portal_create_partner.py +++ b/dev/scripts/interfaces/sst01_portal_create_company.py @@ -12,9 +12,8 @@ odoo = odoorpc.ODOO(host, port=port) odoo.login(db, user, pw) values = { - "firstname": "Max", - "midname": "middle", - "lastname": "Musterman", + "name": "Bier AG", + "name2": "Bier2 AG", "street": "Strasse 11", "street2": "Zusatz 1", "zip": "1145", @@ -25,21 +24,18 @@ values = { "mobile": "+43 677 564564", "endkunde": True, "portal_id": "9", - "company": "Bier AG", "info_uid": "habe keine", "info_kundennr": "K1234", "email": "max@musterman.at", - "line_ids": ["12345"], + "line_ids": ["0000"], "opt_out": True, "lang": "de", - "collective_bill": False, "retailer": True, - "incoterm": "EXW", } res_partner_obj = odoo.env['res.partner'] -result = res_partner_obj.portal_create_partner(values) +result = res_partner_obj.portal_create_company(values) print(result) diff --git a/dev/scripts/interfaces/sst14_portal_create_contact.py b/dev/scripts/interfaces/sst14_portal_create_contact.py new file mode 100755 index 00000000..200f4908 --- /dev/null +++ b/dev/scripts/interfaces/sst14_portal_create_contact.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import odoorpc + +host = 'localhost' +port = 8080 +db = 'tz-austria_1' +user = 'tz-admin' +pw = 'x' + +odoo = odoorpc.ODOO(host, port=port) +odoo.login(db, user, pw) + +values = { + "firstname": "Max2", + "lastname": "Mustemann2", + "midname": "M.", + "email": "max@musterman.at", + "company_odoo_id": "6056", + "portal_id": "5556705", + "opt_out": True, +} + +res_partner_obj = odoo.env['res.partner'] + + +result = res_partner_obj.portal_create_contact(values) + +print(result) diff --git a/ext/custom-addons/dp_custom/__manifest__.py b/ext/custom-addons/dp_custom/__manifest__.py index e8c52a18..00c03128 100644 --- a/ext/custom-addons/dp_custom/__manifest__.py +++ b/ext/custom-addons/dp_custom/__manifest__.py @@ -40,6 +40,7 @@ 'data': [ 'views/commission_account.xml', 'wizards/wizard_confirm_production.xml', + 'wizards/portal_assign_company.xml', 'security/security.xml', 'data/dp_custom_data.xml', 'data/glaser_company_data.xml', diff --git a/ext/custom-addons/dp_custom/models/account.py b/ext/custom-addons/dp_custom/models/account.py index 4d2ff001..305c26ce 100644 --- a/ext/custom-addons/dp_custom/models/account.py +++ b/ext/custom-addons/dp_custom/models/account.py @@ -26,7 +26,7 @@ class AccountInvoiceLine(models.Model): _inherit = 'account.invoice.line' intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code', - compute="_compute_intrastat_id", inverse='_set_intrastat_id') + compute="_compute_intrastat_id", inverse='_inverse_intrastat_id') lot_id = fields.Many2one(comodel_name='stock.production.lot', string='Lot') weight = fields.Float(string='Gewicht', compute='_compute_weight') @@ -54,7 +54,7 @@ class AccountInvoiceLine(models.Model): for record in self: record.intrastat_id = record.lot_id.intrastat_id.id or record.product_id.intrastat_id.id - def _set_intrastat_id(self): + def _inverse_intrastat_id(self): for record in self: if record.lot_id: record.lot_id.intrastat_id = record.intrastat_id.id diff --git a/ext/custom-addons/dp_custom/models/dp_custom.py b/ext/custom-addons/dp_custom/models/dp_custom.py index 74a76b8d..7720f3bf 100644 --- a/ext/custom-addons/dp_custom/models/dp_custom.py +++ b/ext/custom-addons/dp_custom/models/dp_custom.py @@ -44,4 +44,4 @@ class AbstractHelper(models.AbstractModel): @api.model def _get_specified_fields(self): raise ValidationError( - _('Method \'%s\' isn\'t Implemented in model \'%s\'' % (self._get_specified_fields.__name__, self._name))) + _('Method \'%s\' isn\'t Implemented in model \'%s\'') % (self._get_specified_fields.__name__, self._name)) diff --git a/ext/custom-addons/dp_custom/models/product.py b/ext/custom-addons/dp_custom/models/product.py index d75839d2..f65bba12 100644 --- a/ext/custom-addons/dp_custom/models/product.py +++ b/ext/custom-addons/dp_custom/models/product.py @@ -61,6 +61,11 @@ class ProductTemplate(models.Model): @api.model def create_product(self, vals): + """ + SST-10 + :param vals: + :return: + """ vals = self.remove_not_specified_fields(vals) vals = self.correct_values(vals) product_template = self.with_context(active_test=False).search([('default_code', '=', vals['default_code'])]) @@ -78,7 +83,7 @@ class ProductTemplate(models.Model): vals['xcat_id'] = xcat.id else: raise ValidationError( - _("X-Kategorie \'%s\' kann nicht zugeordnet werden" % vals['xcat_id'])) + _("X-Kategorie \'%s\' kann nicht zugeordnet werden") % vals['xcat_id']) if vals.get('categ_id', False): categ_id = self.env['product.category'].search([('code', '=', vals['categ_id'])]) @@ -86,7 +91,7 @@ class ProductTemplate(models.Model): vals['categ_id'] = categ_id.id else: raise ValidationError( - _("Kategorie \'%s\' kann nicht zugeordnet werden" % vals['categ_id'])) + _("Kategorie \'%s\' kann nicht zugeordnet werden") % vals['categ_id']) if vals.get('material_type_id', False): material_type = self.env['material.type'].search([('name', '=', vals['material_type_id'])]) @@ -94,7 +99,7 @@ class ProductTemplate(models.Model): vals['material_type_id'] = material_type.id else: raise ValidationError( - _("Materialtyp \'%s\' kann nicht zugeordnet werden" % vals['material_type_id'])) + _("Materialtyp \'%s\' kann nicht zugeordnet werden") % vals['material_type_id']) if vals.get('intrastat_id', False): intrastat = self.env['report.intrastat.code'].search([('name', '=', vals['intrastat_id'])]) @@ -102,7 +107,7 @@ class ProductTemplate(models.Model): vals['intrastat_id'] = intrastat.id else: raise ValidationError( - _("Intrastat-Code \'%s\' kann nicht zugeordnet werden" % vals['intrastat_id'])) + _("Intrastat-Code \'%s\' kann nicht zugeordnet werden") % vals['intrastat_id']) if vals.get('assembly_line_ids', False): assembly_line_ids = [] @@ -112,7 +117,7 @@ class ProductTemplate(models.Model): assembly_line_ids.append(assembly_line.id) else: raise ValidationError( - _("Produktionslinie \'%s\' kann nicht zugeordnet werden" % assembly_line_code)) + _("Produktionslinie \'%s\' kann nicht zugeordnet werden") % assembly_line_code) vals['assembly_line_ids'] = [(6, 0, assembly_line_ids)] return vals diff --git a/ext/custom-addons/dp_custom/models/res_partner.py b/ext/custom-addons/dp_custom/models/res_partner.py index 53143d03..3e7671a9 100644 --- a/ext/custom-addons/dp_custom/models/res_partner.py +++ b/ext/custom-addons/dp_custom/models/res_partner.py @@ -19,14 +19,14 @@ # ############################################################################## import json + import requests +from odoo.addons.component.core import Component +from odoo.addons.queue_job.job import job from odoo import tools, api, fields, models, _ from odoo.exceptions import ValidationError -from odoo.addons.queue_job.job import job -from odoo.addons.component.core import Component - class PartnerEventListener(Component): _name = 'res.partner.listener' @@ -55,10 +55,13 @@ class Partner(models.Model): def _default_country_id(self): return self.env.ref('base.at') - company = fields.Char(string='Unternehmen') + name2 = fields.Char('Unternehmensname 2') info_kundennr = fields.Char(string='Info-Kundennr.') info_uid = fields.Char(string='Info-UID') endkunde = fields.Boolean(string='Endkunde', help='Beschreibt, ob es ein Endkunde ist') + portal_pending = fields.Boolean('Erwarte Zuordnung', help='Wird vom Portal bei neuen Unternehmen gesetzt. ' + 'Sobald das Unternehmen manuell zugewiesen wurde, ' + 'wird das Flag wieder entfernt') line_ids = fields.Many2many(comodel_name='res.line', string='Produktionslinien') portal_id = fields.Char(string='Portal-ID') partner_sector_id = fields.Many2one(comodel_name='res.partner.sector', string='Branche') @@ -74,35 +77,62 @@ class Partner(models.Model): ('portal_id_uniq', 'unique(portal_id)', 'Die Portal-ID muss eindeutig sein') ] - @api.one + @api.multi @api.constrains('is_company', 'vat') def _check_unique_vat(self): - if not self.vat or (not self.is_company and self.parent_id): - return - partners = self.search([('is_company', '=', True), - ('vat', '=', self.vat), - ('id', '!=', self.id)]) - if partners: - raise ValidationError(_("UID-Exists: Es sind bereits folgende Unternehmen mit der selben USt. ID vorhanden: %s") % [p.name for p in partners]) + for record in self: + if not record.vat or (not record.is_company and record.parent_id): + continue + partners = self.search([('is_company', '=', True), + ('vat', '=', self.vat), + ('id', '!=', self.id)]) + if partners: + raise ValidationError(_("UID-Exists: Es sind bereits folgende Unternehmen mit der selben USt. ID " + "vorhanden: %s") % [p.name for p in partners]) @api.model - def portal_create_partner(self, vals): + def portal_create_company(self, vals): + """ + SST-01 + :param vals: + :return: + """ vals = self.with_context(sst_1=True).remove_not_specified_fields(vals) vals = self.correct_values(vals) if not vals.get('active', False): vals['active'] = False + vals['is_company'] = True + vals['portal_pending'] = True self.create(vals) return True + @api.model + def portal_create_contact(self, vals): + """ + SST-14 + :param vals: + :return: + """ + vals = self.with_context(sst_14=True).remove_not_specified_fields(vals) + vals = self.correct_values(vals) + if not vals.get('active', False): + vals['active'] = False + return self.create(vals).id + @api.model def pg_create_company(self, vals): + """ + SST-11 + :param vals: + :return: + """ vals = self.with_context(sst_11=True).remove_not_specified_fields(vals) vals = self.correct_values(vals) partner = self.with_context(active_test=False).search([('ref', '=', vals['ref'])]) if partner: if not partner.is_company: raise ValidationError( - _("Der Partner mit der Internen Referenz '%s' ist kein Unternehmen" % vals['ref'])) + _("Der Partner mit der Internen Referenz '%s' ist kein Unternehmen") % vals['ref']) partner.write(vals) else: if not vals.get('is_company', False): @@ -120,7 +150,7 @@ class Partner(models.Model): vals['country_id'] = country.id else: raise ValidationError( - _("Das Land mit dem ISO-Code \'%s\' kann nicht zugeordnet werden" % vals['country_id'])) + _("Das Land mit dem ISO-Code \'%s\' kann nicht zugeordnet werden") % vals['country_id']) if vals.get('line_ids', False): line_ids = self.env['res.line'].search([('name', 'in', vals['line_ids'])]) @@ -128,7 +158,7 @@ class Partner(models.Model): vals['line_ids'] = [(6, 0, line_ids.ids)] else: raise ValidationError( - _("Die Produktionslinie mit dem Code \'%s\' kann nicht zugeordnet werden" % vals['line_ids'])) + _("Die Produktionslinie mit dem Code \'%s\' kann nicht zugeordnet werden") % vals['line_ids']) if vals.get('lang', False): temp = vals['lang'] @@ -138,7 +168,7 @@ class Partner(models.Model): vals['lang'] = selection[0] break if not vals['lang']: - raise ValidationError(_("Die Sprache mit dem Code \'%s\' kann nicht zugeordnet werden" % temp)) + raise ValidationError(_("Die Sprache mit dem Code \'%s\' kann nicht zugeordnet werden") % temp) if vals.get('partner_sector_id', False): branche = self.env['res.partner.sector'].search( @@ -146,7 +176,7 @@ class Partner(models.Model): if branche: vals['partner_sector_id'] = branche.id else: - raise ValidationError(_("Die Branche \'%s\' kann nicht zugeordnet werden" % vals['partner_sector_id'])) + raise ValidationError(_("Die Branche \'%s\' kann nicht zugeordnet werden") % vals['partner_sector_id']) if vals.get('property_payment_term_id', False): payment_term = self.env['account.payment.term'].search( @@ -154,8 +184,9 @@ class Partner(models.Model): if payment_term: vals['property_payment_term_id'] = payment_term.id else: - raise ValidationError(_("Die Zahlungsbedingung mit dem Code \'%s\' kann nicht zugeordnet werden" % vals[ - 'property_payment_term_id'])) + raise ValidationError( + _("Die Zahlungsbedingung mit dem Code \'%s\' kann nicht zugeordnet werden") % vals[ + 'property_payment_term_id']) if vals.get('property_product_pricelist', False): product_pricelist = self.env['product.pricelist'].search( @@ -163,8 +194,8 @@ class Partner(models.Model): if product_pricelist: vals['property_product_pricelist'] = product_pricelist[0].id else: - raise ValidationError(_("Die Preisliste mit der Währung \'%s\' kann nicht zugeordnet werden" % vals[ - 'property_product_pricelist'])) + raise ValidationError(_("Die Preisliste mit der Währung \'%s\' kann nicht zugeordnet werden") % vals[ + 'property_product_pricelist']) if vals.get('retail_partner_id', False): retail_partner = self.env['res.partner'].search( @@ -172,8 +203,9 @@ class Partner(models.Model): if retail_partner: vals['retail_partner_id'] = retail_partner.id else: - raise ValidationError(_("Der Händler mit der Internen Referenz \'%s\' kann nicht zugeordnet werden" % vals[ - 'retail_partner_id'])) + raise ValidationError( + _("Der Händler mit der Internen Referenz \'%s\' kann nicht zugeordnet werden") % vals[ + 'retail_partner_id']) if vals.get('incoterm', False): incoterm = self.env['stock.incoterms'].search( @@ -182,8 +214,24 @@ class Partner(models.Model): vals['sale_incoterm_id'] = incoterm.id del vals['incoterm'] else: - raise ValidationError(_("Die Lieferbedingung mit dem Code \'%s\' kann nicht zugeordnet werden" % vals[ - 'incoterm'])) + raise ValidationError( + _("Die Lieferbedingung mit dem Code \'%s\' kann nicht zugeordnet werden") % vals['incoterm']) + + if vals.get('company_odoo_id', False): + parent_id = self.env['res.partner'].search([('id', '=', vals['company_odoo_id'])]) + if parent_id: + vals['parent_id'] = parent_id.id + vals['street'] = parent_id.street + vals['street2'] = parent_id.street2 + vals['city'] = parent_id.city + vals['zip'] = parent_id.zip + vals['country_id'] = parent_id.country_id.id + vals['supplier'] = parent_id.supplier + vals['customer'] = parent_id.customer + vals['lang'] = parent_id.lang + del vals['company_odoo_id'] + else: + raise ValidationError(_("Unternehmen mit Odoo-ID \'%s\' existiert nicht") % vals['company_odoo_id']) return vals @@ -192,13 +240,14 @@ class Partner(models.Model): common_list = ['street', 'street2', 'zip', 'city', 'country_id', 'fax', 'phone', 'mobile', 'endkunde', 'line_ids', 'lang', 'portal_id', 'email', 'opt_out'] if self.env.context.get('sst_1', False): - common_list.extend(['firstname', 'lastname', 'midname', 'company', 'info_kundennr', - 'info_uid', 'collective_bill', 'retailer', 'incoterm']) + common_list.extend(['name', 'name2', 'info_kundennr', 'info_uid', 'retailer']) return common_list elif self.env.context.get('sst_11', False): common_list.extend(['name', 'ref', 'partner_sector_id', 'comment', 'vat', 'property_payment_term_id', 'property_pricelist_id', 'date_vat_check', 'active', 'property_product_pricelist', 'retail_partner_id', 'retailer', 'info_uid']) + elif self.env.context.get('sst_14', False): + common_list.extend(['firstname', 'lastname', 'midname', 'company_odoo_id', 'portal_id']) return common_list else: return super(Partner, self)._get_specified_fields() @@ -215,7 +264,7 @@ class Partner(models.Model): @job def job_export_portal_price(self, partner_id): if not partner_id.portal_id: - raise ValidationError(_("Der Partner mit der ID %s hat keine Portal-ID" % partner_id.id)) + raise ValidationError(_("Der Partner mit der ID %s hat keine Portal-ID") % partner_id.id) pricelist = partner_id.property_product_pricelist data = [] for item in pricelist.item_ids: diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index c6a905be..52f1050e 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -94,6 +94,13 @@ class SaleOrder(models.Model): @api.model def pg_get_orders(self, line, state, limit): + """ + SST-4 + :param line: + :param state: + :param limit: + :return: + """ line_id = self.env['res.line'].search([('name', '=', line)]) orders = self.search([('line_id', '=', line_id.id), ('assembly_state', '=', state)], order='id ASC', limit=limit) @@ -127,13 +134,22 @@ class SaleOrder(models.Model): @api.model def pg_create_quotation(self, vals): + """ + SST-3 + :param vals: + :return: + """ if not vals.get('portal_id', False): raise ValidationError( - _("Der Kunde mit der Portal-ID \'%s\' kann nicht zugeordnet werden" % vals['portal_id'])) + _("Der Kunde mit der Portal-ID \'%s\' kann nicht zugeordnet werden") % vals['portal_id']) partner = self.env['res.partner'].search([('portal_id', '=', vals['portal_id'])]) + if not partner.parent_id: + raise ValidationError( + _('Zu dem Kontakt mit der portal-ID %s existiert kein Unternehmen') % vals['portal_id']) + vals['partner_id'] = partner.parent_id.id if not partner: raise ValidationError( - _("Der Kunde mit der Portal-ID \'%s\' kann nicht zugeordnet werden" % vals['portal_id'])) + _("Der Kunde mit der Portal-ID \'%s\' kann nicht zugeordnet werden") % vals['portal_id']) delivery_partner = self.env['res.partner'] delivery_vals = {} if vals.get('portal_delivery_id', False): @@ -236,7 +252,7 @@ class SaleOrder(models.Model): vals['line_id'] = line_id.id else: raise ValidationError( - _("Produktionslinie \'%s\' kann nicht zugeordnet werden" % vals['line_id'])) + _("Produktionslinie \'%s\' kann nicht zugeordnet werden") % vals['line_id']) return vals @api.model @@ -351,7 +367,7 @@ class SaleOrderLine(models.Model): vals['product_id'] = product_id.id else: raise ValidationError( - _("Produkt \'%s\' kann nicht zugeordnet werden" % vals['product_id'])) + _("Produkt \'%s\' kann nicht zugeordnet werden") % vals['product_id']) return vals @api.multi diff --git a/ext/custom-addons/dp_custom/views/res_partner_views.xml b/ext/custom-addons/dp_custom/views/res_partner_views.xml index 59533b65..844e9ee9 100644 --- a/ext/custom-addons/dp_custom/views/res_partner_views.xml +++ b/ext/custom-addons/dp_custom/views/res_partner_views.xml @@ -1,35 +1,27 @@ - - view_partner_address_form - res.partner - - - - - - - - view_partner_form res.partner - - + +
+
+
+ +

+ +

- - - - @@ -52,6 +44,7 @@ + @@ -68,7 +61,7 @@ Neue Portalkunden ir.actions.act_window res.partner - [('active','=',False), ('portal_id','!=',False), ('is_company','=',False)] + [('active','=',False), ('portal_pending','=',True)] current form tree,form diff --git a/ext/custom-addons/dp_custom/wizards/__init__.py b/ext/custom-addons/dp_custom/wizards/__init__.py index a0ef024d..25fb3622 100644 --- a/ext/custom-addons/dp_custom/wizards/__init__.py +++ b/ext/custom-addons/dp_custom/wizards/__init__.py @@ -1 +1,2 @@ from . import wizard_confirm_production +from . import portal_assign_company diff --git a/ext/custom-addons/dp_custom/wizards/portal_assign_company.py b/ext/custom-addons/dp_custom/wizards/portal_assign_company.py new file mode 100644 index 00000000..262c7a46 --- /dev/null +++ b/ext/custom-addons/dp_custom/wizards/portal_assign_company.py @@ -0,0 +1,71 @@ +# Copyright 2018-Today datenpol gmbh () +# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses). +import json + +import requests + +from odoo import tools, api, fields, models, _ +from odoo.exceptions import ValidationError + + +class PortalAssignCompany(models.TransientModel): + _name = 'portal.assign_company' + _description = 'Unternehmen zuordnen' + + main_partner_id = fields.Many2one('res.partner', 'Zugewiesenes Unternehmen', domain=[('is_company', '=', True)]) + + @api.onchange('main_partner_id') + def _onchange_main_partner_id(self): + for record in self: + if record.main_partner_id and record.main_partner_id.portal_id: + return { + 'warning': { + 'title': _('Warning!'), + 'message': _('Achtung: Das ausgewählte Unternehmen ist bereits mit dem Portal verknüpft. ' + 'Wenn Sie das Unternehmen zuweisen, dann könnte es zu Problemen im Portal kommen'), + } + } + + def send_to_portal(self, portal_id, odoo_id): + """ + SST-15 + :param portal_id: + :param odoo_id: + :return: + """ + self.ensure_one() + portal_url = tools.config.get('portal_url') + application_id = tools.config.get('portal_secret') + data = { + 'portal_id': int(portal_id), + 'company_odoo_id': odoo_id + } + response = requests.post(portal_url + '/api/v1/set-odoo-id/?secret=' + application_id, + data=json.dumps(data)) + if response.status_code != 200: + raise ValidationError(_('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.')) + + partner.write({'portal_pending': False, 'active': True}) + + return self.send_to_portal(partner.portal_id, partner.id) + + def button_assign(self): + self.ensure_one() + 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.')) + if not self.main_partner_id.portal_id: + self.main_partner_id.portal_id = partner.portal_id + self.send_to_portal(self.main_partner_id.portal_id, self.main_partner_id.id) + partner.unlink() + + return self.env.ref('base.action_partner_form').read()[0] + return {'type': 'ir.actions.act_window_close'} diff --git a/ext/custom-addons/dp_custom/wizards/portal_assign_company.xml b/ext/custom-addons/dp_custom/wizards/portal_assign_company.xml new file mode 100644 index 00000000..b7a262ce --- /dev/null +++ b/ext/custom-addons/dp_custom/wizards/portal_assign_company.xml @@ -0,0 +1,41 @@ + + + + + + + portal_assign_company_form_view + portal.assign_company + +
+ +

Sobald das Unternehmen aus dem Portal zugewiesen bzw. aktiviert wurde, + wird die Kunde-Preisliste an das Portal übergeben und Aufträge aus dem Portal + können durchgeführt werden. +

+
+ + + +
+
+
+
+
+ + + Unternehmen zuordnen + portal.assign_company + form + {} + new + + + +
diff --git a/ext/custom-addons/dp_custom/wizards/wizard_confirm_production.py b/ext/custom-addons/dp_custom/wizards/wizard_confirm_production.py index 6aa2cf49..9ab109c1 100644 --- a/ext/custom-addons/dp_custom/wizards/wizard_confirm_production.py +++ b/ext/custom-addons/dp_custom/wizards/wizard_confirm_production.py @@ -21,7 +21,7 @@ class WizardConfirmProduction(models.TransientModel): if so.assembly_state == 'created' and so.state == 'sale': so.assembly_state = 'approved' else: - raise ValidationError(_('Auftrag %s: Bitte prüfen Sie den PG-Status und/oder Auftragsstatus.' % so.name)) + raise ValidationError(_('Auftrag %s: Bitte prüfen Sie den PG-Status und/oder Auftragsstatus.') % so.name) action = self.env.ref('sale.action_orders').read()[0] action['domain'] = [('id', 'in', active_ids)] return action diff --git a/ext/custom-addons/dp_reports_account/models/report_helper.py b/ext/custom-addons/dp_reports_account/models/report_helper.py index b8421be7..6f18af7c 100644 --- a/ext/custom-addons/dp_reports_account/models/report_helper.py +++ b/ext/custom-addons/dp_reports_account/models/report_helper.py @@ -44,4 +44,3 @@ class AccountInvoiceWithIntrastat(models.AbstractModel): 'field_set_in_lines': self._field_set_in_lines, 'formatLang': self._formatLang, } -