Feedback 1640: Dienstleistung Darf unkonfiguriert verkauft werden

develop
Ahmed Aly 2018-04-19 13:59:57 +02:00
parent d80affb501
commit e6721fc285
1 changed files with 5 additions and 1 deletions

View File

@ -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')