Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jenck/service
1 result
Show changes
Commits on Source (2)
......@@ -995,8 +995,11 @@ class service_order(osv.osv):
res = True
for order in self.browse(cr, uid, ids, context):
inv_ids = []
for sale in order.sale_order_ids:
if not sale.invoiced and sale.state != 'cancel':
inv_ids += [invoice for invoice in sale.invoice_ids]
invoices_ok = all([invoice.state in ('paid', 'cancel') for invoice in inv_ids])
if not invoices_ok and sale.state != 'cancel':
raise osv.except_osv(
_("Cannot finish"),
_("All quotation should be paid or cancelled"))
......