diff --git a/ext/custom-addons/dp_custom/models/account.py b/ext/custom-addons/dp_custom/models/account.py index e31ccb93..98231b1d 100644 --- a/ext/custom-addons/dp_custom/models/account.py +++ b/ext/custom-addons/dp_custom/models/account.py @@ -28,6 +28,7 @@ class AccountInvoiceLine(models.Model): intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code') lot_id = fields.Many2one(comodel_name='stock.production.lot', string='Lot') weight = fields.Float(string='Gewicht', compute='_compute_weight') + hide_intrastat_code = fields.Boolean('ZV', help='Zolltarifnummer verbergen') @api.model def create(self, vals): @@ -131,7 +132,7 @@ class AccountInvoice(models.Model): intrastrat_not_set = False for invoice_line in self.invoice_line_ids: if invoice_line.product_id and invoice_line.product_id.type != 'service': - if not invoice_line.intrastat_id: + if not invoice_line.intrastat_id and not invoice_line.hide_intrastat_code: info += invoice_line.name + "\n" intrastrat_not_set = True if intrastrat_not_set: diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 5ed7f88d..90b762cf 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -503,6 +503,7 @@ class SaleOrderLine(models.Model): 'price_unit': -invoice_lines.price_subtotal * (discount / 100), 'uom_id': self.env.ref('product.product_uom_unit').id, 'name': 'Händlerrabatt {}%'.format(discount), + 'hide_intrastat_code': True }) del vals['discount'] invoice_lines |= self.env['account.invoice.line'].create(vals) diff --git a/ext/custom-addons/dp_custom/views/account_views.xml b/ext/custom-addons/dp_custom/views/account_views.xml index 72478100..7140f1de 100644 --- a/ext/custom-addons/dp_custom/views/account_views.xml +++ b/ext/custom-addons/dp_custom/views/account_views.xml @@ -18,6 +18,9 @@ + + + diff --git a/ext/custom-addons/dp_reports_account/reports/invoice.xml b/ext/custom-addons/dp_reports_account/reports/invoice.xml index 1c0678de..9e8e6981 100644 --- a/ext/custom-addons/dp_reports_account/reports/invoice.xml +++ b/ext/custom-addons/dp_reports_account/reports/invoice.xml @@ -158,7 +158,7 @@
- + Zolltarif Nr.:
diff --git a/ext/custom-addons/dp_sale_hide_discount/models/account.py b/ext/custom-addons/dp_sale_hide_discount/models/account.py index 2c461a13..dff71c4a 100644 --- a/ext/custom-addons/dp_sale_hide_discount/models/account.py +++ b/ext/custom-addons/dp_sale_hide_discount/models/account.py @@ -87,7 +87,7 @@ class AccountInvoiceLine(models.Model): compute='_compute_price_reduce', required=True, store=True, help='Rabattierter Einzelpreis, inkludiert bereits den Rabatt und ist auf 2 Stellen ' 'kaufmännisch gerundet.') - hide_discount = fields.Boolean(string='RV') + hide_discount = fields.Boolean(string='RV', help='Rabatt verbergen') @api.multi @api.depends('price_unit', 'discount') diff --git a/ext/custom-addons/dp_sale_hide_discount/models/sale.py b/ext/custom-addons/dp_sale_hide_discount/models/sale.py index c691526c..0146a9b3 100644 --- a/ext/custom-addons/dp_sale_hide_discount/models/sale.py +++ b/ext/custom-addons/dp_sale_hide_discount/models/sale.py @@ -25,7 +25,7 @@ from odoo.tools import float_round class SaleOrderLine(models.Model): _inherit = 'sale.order.line' - hide_discount = fields.Boolean(string='RV') + hide_discount = fields.Boolean(string='RV', help='Rabatt verbergen') @api.multi @api.depends('product_uom_qty', 'discount', 'price_unit', 'tax_id')