diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index bb02f153..1e139348 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -389,9 +389,13 @@ class SaleOrder(models.Model): class SaleOrderLine(models.Model): _inherit = 'sale.order.line' + @api.model + def _get_product_id_domain(self): + return [('sale_ok', '=', True), '|', ('can_be_sold_unconfigured', '=', True), ('type', '=', 'service')] + lot_id = fields.Many2one(comodel_name='stock.production.lot', string='Lot') from_designbox = fields.Boolean(string='I', readonly=True, help='Import von externem System') - product_id = fields.Many2one(domain=[('sale_ok', '=', True), ('can_be_sold_unconfigured', '=', True)]) + 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')