Feedback 1640: Dienstleistung Darf unkonfiguriert verkauft werden
							parent
							
								
									d80affb501
								
							
						
					
					
						commit
						e6721fc285
					
				|  | @ -389,9 +389,13 @@ class SaleOrder(models.Model): | ||||||
| class SaleOrderLine(models.Model): | class SaleOrderLine(models.Model): | ||||||
|     _inherit = 'sale.order.line' |     _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') |     lot_id = fields.Many2one(comodel_name='stock.production.lot', string='Lot') | ||||||
|     from_designbox = fields.Boolean(string='I', readonly=True, help='Import von externem System') |     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') |     weight = fields.Float(string='Gewicht', compute='_compute_weight') | ||||||
|     intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code') |     intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue