[FIX] sale: only propose services for pay advances

When creating an invoice from a sale order, if the user choose to invoice a fixed price (deposit), he has the possibility to choose an advance product. As described in the help message, this product should be a service product. Therefore, we add a domain so only services are displayed in the dropdown list
This commit is contained in:
Denis Ledoux 2014-07-18 17:26:48 +02:00
parent c58bf1e3bc
commit ae678d9e05
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ class sale_advance_payment_inv(osv.osv_memory):
Use Some Order Lines to invoice a selection of the sales order lines."""),
'qtty': fields.float('Quantity', digits=(16, 2), required=True),
'product_id': fields.many2one('product.product', 'Advance Product',
domain=[('type', '=', 'service')],
help="""Select a product of type service which is called 'Advance Product'.
You may have to create it and set it as a default value on this field."""),
'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Account'),