diff --git a/ext/3rd-party-addons/global_discount/models/sale.py b/ext/3rd-party-addons/global_discount/models/sale.py index 250b25fa..25b3d9f9 100755 --- a/ext/3rd-party-addons/global_discount/models/sale.py +++ b/ext/3rd-party-addons/global_discount/models/sale.py @@ -6,11 +6,11 @@ from odoo.exceptions import UserError class SaleOrder(models.Model): _inherit = "sale.order" - global_discount = fields.Boolean("Add Global Discount", readonly=True, states={'draft': [('readonly', False)]},) + global_discount = fields.Boolean("Add Global Discount", readonly=True, states={'draft': [('readonly', False),],'sent': [('readonly', False)]},) discount_type = fields.Selection([('fixed','Fixed'),('percentage','Percentage')], - "Discount Type", readonly=True, states={'draft': [('readonly', False)]}, default='fixed') - discount_amount = fields.Float("Discount Amount", readonly=True, states={'draft': [('readonly', False)]},) - discount_percentage = fields.Float("Discount Percentage", readonly=True, states={'draft': [('readonly', False)]},) + "Discount Type", readonly=True, states={'draft': [('readonly', False)],'sent': [('readonly', False)]}, default='percentage') + discount_amount = fields.Float("Discount Amount", readonly=True, states={'draft': [('readonly', False)],'sent': [('readonly', False)]},) + discount_percentage = fields.Float("Discount Percentage", readonly=True, states={'draft': [('readonly', False)],'sent': [('readonly', False)]},) @api.multi def _discount_unset(self): diff --git a/ext/3rd-party-addons/global_discount/views/sale_view.xml b/ext/3rd-party-addons/global_discount/views/sale_view.xml index 05c41ae7..aade8ac0 100755 --- a/ext/3rd-party-addons/global_discount/views/sale_view.xml +++ b/ext/3rd-party-addons/global_discount/views/sale_view.xml @@ -9,14 +9,14 @@ - diff --git a/ext/3rd-party-addons/wk_debrand_odoo/models/res_config.py b/ext/3rd-party-addons/wk_debrand_odoo/models/res_config.py index a561511d..96417107 100644 --- a/ext/3rd-party-addons/wk_debrand_odoo/models/res_config.py +++ b/ext/3rd-party-addons/wk_debrand_odoo/models/res_config.py @@ -46,7 +46,7 @@ class ResConfigSettings(models.TransientModel): def set_values(self): super(ResConfigSettings, self).set_values() IrDefault = self.env['ir.default'].sudo() - IrDefault.set('res.config.settings', "wk_favicon", self.wk_favicon.decode("utf-8")) + IrDefault.set('res.config.settings', "wk_favicon", self.wk_favicon.decode("utf-8") if self.wk_favicon else False) IrDefault.set('res.config.settings', "title_brand", self.title_brand) IrDefault.set('res.config.settings', "odoo_text_replacement", self.odoo_text_replacement) @@ -62,4 +62,4 @@ class ResConfigSettings(models.TransientModel): title_brand = title_brand, odoo_text_replacement = odoo_text_replacement, ) - return res \ No newline at end of file + return res diff --git a/ext/custom-addons/dp_custom/__manifest__.py b/ext/custom-addons/dp_custom/__manifest__.py index 00ce1b1c..dfe1a2f9 100644 --- a/ext/custom-addons/dp_custom/__manifest__.py +++ b/ext/custom-addons/dp_custom/__manifest__.py @@ -49,11 +49,9 @@ 'wizards/wizard_confirm_print_invoice.xml', 'security/security.xml', 'data/dp_custom_data.xml', - 'data/glaser_company_data.xml', 'data/tz_austria_company_data.xml', 'data/product_data.xml', 'data/tz_tax_data.xml', - 'data/glaser_tax_data.xml', 'data/cron_job.xml', 'views/dp_custom_views.xml', 'views/res_line_views.xml', diff --git a/ext/custom-addons/dp_custom/data/cron_job.xml b/ext/custom-addons/dp_custom/data/cron_job.xml index 9b39351e..aa324976 100644 --- a/ext/custom-addons/dp_custom/data/cron_job.xml +++ b/ext/custom-addons/dp_custom/data/cron_job.xml @@ -14,17 +14,4 @@ - - Export Portal Prices Glaser - - - - 1 - days - -1 - - code - model.cron_export_portal_prices() - - diff --git a/ext/custom-addons/dp_custom/data/tz_austria_company_data.xml b/ext/custom-addons/dp_custom/data/tz_austria_company_data.xml index 4da4b591..b1f1adcb 100644 --- a/ext/custom-addons/dp_custom/data/tz_austria_company_data.xml +++ b/ext/custom-addons/dp_custom/data/tz_austria_company_data.xml @@ -18,12 +18,6 @@ (4,ref('dp_custom.group_allow_delete_so_attachments'))]"/> - - - - 70.00 - - diff --git a/ext/custom-addons/dp_custom/models/account.py b/ext/custom-addons/dp_custom/models/account.py index 661410bf..5167c948 100644 --- a/ext/custom-addons/dp_custom/models/account.py +++ b/ext/custom-addons/dp_custom/models/account.py @@ -62,8 +62,8 @@ class AccountInvoiceLine(models.Model): self.env['stock.production.lot'].browse([lot_id.id]).write({ 'intrastat_id': vals.get('intrastat_id') }) - elif vals.get('intrastat_id', False) and not lot_id: - raise UserError(_('Der Intrastrat Code kann nur gesetzt werden wenn ein Lot angegeben wurde.')) + # elif vals.get('intrastat_id', False) and not lot_id: + # raise UserError(_('Der Intrastrat Code kann nur gesetzt werden wenn ein Lot angegeben wurde.')) return res diff --git a/ext/custom-addons/dp_custom/models/product.py b/ext/custom-addons/dp_custom/models/product.py index e2e95aee..1f8f4e1b 100644 --- a/ext/custom-addons/dp_custom/models/product.py +++ b/ext/custom-addons/dp_custom/models/product.py @@ -29,7 +29,7 @@ class ProductXCategory(models.Model): _description = 'X-Kategorie' _order = 'name' - name = fields.Char(string='Bezaichnung', required=True) + name = fields.Char(string='Bezeichnung', required=True) _sql_constraints = [ ('name_uniq', 'unique(name)', 'Die Bezeichnung muss eindeutig sein') diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index dab56ebf..d8932ca1 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -66,6 +66,14 @@ class SaleOrder(models.Model): pg9_call_D = fields.Char(string='PG9-Auftrag_D', compute='_pg9_call', store=False) pg9_call_T = fields.Char(string='PG9-Auftrag_T', compute='_pg9_call', store=False) + @api.multi + def _reset_sequence(self): + for rec in self: + current_sequence = 1 + for line in rec.order_line: + line.sequence = current_sequence + current_sequence += 1 + @api.multi def _pg9_call(self): for record in self: @@ -347,6 +355,8 @@ class SaleOrder(models.Model): if vals.get('message_post',False): self.message_post(body=vals.get('message_post')) + self._reset_sequence() + return res @api.multi @@ -493,6 +503,23 @@ class SaleOrderLine(models.Model): product_id = fields.Many2one(domain=_get_product_id_domain) weight = fields.Float(string='Gewicht', compute='_compute_weight') intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code') + sequence = fields.Integer(string='Sequence', default=9999) + + @api.multi + @api.onchange('product_id') + def product_id_change(self): + result = super(SaleOrderLine,self).product_id_change() + product = self.product_id.with_context( + lang=self.order_id.partner_id.lang, + partner=self.order_id.partner_id.id + ) + + name = product.name + if product.description_sale: + name = product.description_sale + self.name = name + + return result @api.model def create(self, vals): 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 0282dc15..971457b9 100644 --- a/ext/custom-addons/dp_custom/views/res_partner_views.xml +++ b/ext/custom-addons/dp_custom/views/res_partner_views.xml @@ -74,6 +74,7 @@ + diff --git a/ext/custom-addons/dp_custom/views/sale_views.xml b/ext/custom-addons/dp_custom/views/sale_views.xml index f4c2c919..006131c6 100644 --- a/ext/custom-addons/dp_custom/views/sale_views.xml +++ b/ext/custom-addons/dp_custom/views/sale_views.xml @@ -29,8 +29,12 @@ + + + +
+ - diff --git a/ext/custom-addons/dp_glaser_company/__init__.py b/ext/custom-addons/dp_glaser_company/__init__.py new file mode 100644 index 00000000..aa7ed683 --- /dev/null +++ b/ext/custom-addons/dp_glaser_company/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# datenpol gmbh +# Copyright (C) 2013-TODAY datenpol gmbh () +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## diff --git a/ext/custom-addons/dp_glaser_company/__manifest__.py b/ext/custom-addons/dp_glaser_company/__manifest__.py new file mode 100644 index 00000000..43cbc71e --- /dev/null +++ b/ext/custom-addons/dp_glaser_company/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# datenpol gmbh +# Copyright (C) 2013-TODAY datenpol gmbh () +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +# noinspection PyStatementEffect +{ + 'name': 'Unternehmen Glaser Daten', + 'category': 'Custom', + 'version': '11.0.1.0.0', + 'description': """Fügt alle Daten für das Unternehmen Glaser & Co hinzu""", + 'author': 'datenpol gmbh', + 'website': 'http://www.datenpol.at/', + 'depends': [ + 'base', + 'account', + 'sale_stock', + 'queue_job', + 'website', + 'dp_custom' + ], + 'data': [ + 'data/glaser_company_data.xml', + 'data/glaser_tax_data.xml', + 'data/cron_job.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/ext/custom-addons/dp_glaser_company/data/cron_job.xml b/ext/custom-addons/dp_glaser_company/data/cron_job.xml new file mode 100644 index 00000000..c1cadd2b --- /dev/null +++ b/ext/custom-addons/dp_glaser_company/data/cron_job.xml @@ -0,0 +1,17 @@ + + + + + Export Portal Prices Glaser + + + + 1 + days + -1 + + code + model.cron_export_portal_prices() + + + diff --git a/ext/custom-addons/dp_custom/data/glaser_company_data.xml b/ext/custom-addons/dp_glaser_company/data/glaser_company_data.xml similarity index 59% rename from ext/custom-addons/dp_custom/data/glaser_company_data.xml rename to ext/custom-addons/dp_glaser_company/data/glaser_company_data.xml index b5d12075..48d8bb3c 100644 --- a/ext/custom-addons/dp_custom/data/glaser_company_data.xml +++ b/ext/custom-addons/dp_glaser_company/data/glaser_company_data.xml @@ -1,6 +1,6 @@ - + Glaser & Co. Neugasse 36 Spannberg @@ -15,21 +15,21 @@ - - + + -